Re: Application starts too soon



I'm a bit surprised a Run item is processed when you're not running an
explorer shell. Maybe I'm thinking about RunOnce... But as to your problem,
I had a similar one. The machine was booting into a custom shell that was
expecting a network connection to exist. What we had was a sort-of race
condition where the program was competing with network services, and when the
program won, it would exit because there wasn't any network available. What
we did was create a batch file (later replaced with an MFC program) that
would check for the network for a predetermined time. If the network was
found, it would continue and execute the shell. If not, it would handle the
situation more gracefully. You might want to see if you can figure out what
your program is not fiding (resources, services, whatever) and do the same
thing.

"SteveS" wrote:

> 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

.



Relevant Pages

  • Re: Application starts too soon
    ... Windows XPE site and looked thru the two XPE books and found nothing on this ... >> The application runs froma a batch file. ... >> The batch file has my exe followed by a Shutdown command ... >> think the app tries to run, encounters an error, and exits. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Problem when executing application from batch file
    ... >buffer and execute one by one ... >that the comands (multi-commands from batch file) are sent. ... >multi-commands, then the first command will invoke the application and the ... If you write a tiny stripped down loader for your App and use: ...
    (microsoft.public.vb.general.discussion)
  • Re: Automatically Logon To Network Share
    ... logon to the share and then manually run them. ... How can I get an automatic logon to the network share when each user ... I use a batch file with the command NET USE as follows: ... The ping command inserts a delay of about 20 seconds after the batch ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Automatically login to network share?
    ... logon to the share and then manually run them. ... How can I get an automatic logon to the network share when each user ... I use a batch file with the command NET USE as follows: ... The ping command inserts a delay of about 20 seconds after the batch ...
    (microsoft.public.windowsxp.basics)
  • Re: Software Updates
    ... A batch file sounds like a good escape for me. ... where using a peer to peer network. ... Microsoft Access MVP ... I am trying to find a way to update the existing installation of my app ...
    (microsoft.public.access.formscoding)