Re: Application starts too soon
- From: "William Sullivan" <WilliamSullivan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Apr 2005 07:31:01 -0700
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
.
- Follow-Ups:
- Re: Application starts too soon
- From: SteveS
- Re: Application starts too soon
- References:
- Application starts too soon
- From: SteveS
- Re: Application starts too soon
- From: KM
- Re: Application starts too soon
- From: SteveS
- Application starts too soon
- Prev by Date: custom shell - video capture - problems
- Next by Date: Re: Dependency walker for components?
- Previous by thread: Re: Application starts too soon
- Next by thread: Re: Application starts too soon
- Index(es):
Relevant Pages
|