Re: Application starts too soon
- From: "Slobodan Brcin \(eMVP\)" <sbrcin@xxxxxx>
- Date: Fri, 15 Apr 2005 17:56:07 +0200
Steve,
Books, are ok but what you really need is to use google groups to search
through this NG.
You will find all that you need here:
http://groups-beta.google.com/group/microsoft.public.windowsxp.embedded/search?group=microsoft.public.windowsxp.embedded&q=CMP_WaitNoPendingInstallEvents&qt_g=1
Few hints:
1. Do not start bat file but start you small launch exe.
2. Do PnP Wait + Sleep method that I have described.
3. When all is loaded start your application.
BTW there is no way for OS to know when shell is started, this is concern of
each shell internal implementation. You here should use launch application
as shell.
Regards,
Slobodan
"SteveS" <SteveS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CE9632FA-058B-4A29-9B12-7FEC4C74F6CD@xxxxxxxxxxxxxxxx
> Evidently I will need to do something similiar. What I don't get is why is
> there not a method in XPE to wait to run an application until the OS is
> fully loaded and the command shell is up and running? I've searched around
> Windows XPE site and looked thru the two XPE books and found nothing on
> this
> topic. It seems like once they walk you thru the getting a shell up, they
> figure the job is done. Oh oh, I'm starting to rant.....
>
> I've got several third party add-ons in my software, it may be difficult
> to
> tell which is hanging up, how it's hanging up, and what do do to fix it.
>
> - SteveS
>
>
> "William Sullivan" wrote:
>
>> 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
- Re: Application starts too soon
- From: William Sullivan
- Re: Application starts too soon
- From: SteveS
- Application starts too soon
- Prev by Date: clarification please
- Next by Date: Re: windows update for many computers
- Previous by thread: Re: Application starts too soon
- Next by thread: Re: Application starts too soon
- Index(es):
Relevant Pages
|
Loading