Re: Application starts too soon



The application runs froma a batch file.
The batch file is called out in the Run registry entry
The batch file has my exe followed by a Shutdown command

After booting, during the Welcome screen, it appears that the Run item is
processed, the batch file executed, and the exe is run. I believe this
because my exe has a frame grabber and the video window comes up. The rest of
the app does not appear. Then the shutdown window comes up. This all during
the welcome screen. Finally the command prompt arrives, but soon after the
shutdown command times out and the computer is ready to be turned off. I
think the app tries to run, encounters an error, and exits. The batch file
then runs the shutdown command.

So, I think my app is being run way too soon. I agree with the sleep
command comment - I was just trying to see if I could delay the launch long
enough to get my app to run.

Oh yeah, the app runs fine if I manually launch it after the command prompt
appears. I'm sure it's a timing issue.

I think your idea with the cmd.exe may be the ticket. I think now that is
how I ddi it in Embedded NT - although even with that I still had to delay my
program from launching for 5 seconds. I went around and around on this with
the Windows NTE guys and they could never explain it. So that app still has
the sleep kludge.

One question - how do I implement the cmd.exe command style? Maybe it
should be obvious but my brain is fried from too many late nights.....

It's odd, the only thing that makes XPE have any value is if it runs and
supports your app. I don't think they do a good job of getting that last
step to work easily.

- SteveS





"KM" wrote:

> SteveS,
>
> It sounded like your application is a batch file (or you call the application form a batch file)? How do you start the batch?
> If it is the batch file that does not start, use "cmd.exe /C <your_batch.bat>" command style to launch it.
> If it is the application (exe), then you would need to understand why the application fails to run (dependencies, etc.). Can you
> launch the exe from the command prompt?
> Since we don't know anything about your app, it is hard to advise.
>
> --
> Regards,
> KM, BSquare Corp.
>
> PS. I wouldn't use "sleep" patch. It is always unreliable solution and will fail time to time when things (OS, hardware, software)
> change.
>
>
> > First off thanks for all the help that got me this far! Got EWF working with
> > CF, sized the image down to fit the CF, etc. I now have an XPE image that can
> > boot to a command prompt (dosn't sound like much, but it took a while to get
> > there).
> >
> > Anyway, my hope is to have the application start up after the command prompt
> > appears. I used the RunOnce Resource (put a batch file under the Run
> > registry value). Problem is it seems to start up before the command prompt
> > appears, and it fails since, when the prompt arrives, no application is
> > running. I know it tries to start since I have a video frame grabber and it's
> > window pops up during the "Welcome" screen. I had a similar problem with
> > Embedded NT, and a short sleep command (5 secs) in the batch file worked.
> > Doesn't seem to help here - tried up to 60 seconds!
> >
> > So what do I do? I would like to keep the command prompt shell (at least
> > for now) so I can exit my program and run some commands to copy files etc.
> >
> > Thanks,
> >
> > SteveS
> >
> >
> >
> >
>
>
>
.



Relevant Pages

  • Re: How to deploy real cert in packaged .exe (VS 2005, .net cf 2.0 sp2, WM 5.0)
    ... ..exe for the mobile device I developed an app for. ... You can run a batch file after you've built your project/solution or as part ... Or do I do the signing using the the tools they send me? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Close application for update
    ... >>replace the main exe i need to close it first. ... copy the files and open it again in the batch file ... Now i am building an other app that would kill the Main ...
    (alt.comp.lang.borland-delphi)
  • Re: DOS Environment not working
    ... It just shows the variables set by windows on startup, ... The batch file does not fail because I ... installed a errorlevel statement to echo a message.... ... I run the batchfile at the command prompt, but when I check the variables: ...
    (microsoft.public.windowsxp.general)
  • Re: How to program Enable, Disable drivers?
    ... Use this batch file to enable or disable a device ... setlocal enabledelayedexpansion ... echo Syntax: Device enable / disable ... Open a Command Prompt. ...
    (microsoft.public.windowsxp.general)
  • Re: Problem when executing application from batch file
    ... To force the batch file to not wait for your app and return immediately, ... > is a single command from command prompt or it is part of batch file ... >> It appears that outside a batch file, i.e., in Command Prompt, the app is ...
    (microsoft.public.vb.general.discussion)