Re: Application starts too soon



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
>>


.



Relevant Pages

  • Re: custom shell starts before all services loaded
    ... I created a small app for my custom shell which then starts my main app, ... > Then you should look at WaitForInputIdle API. ...
    (microsoft.public.windowsxp.embedded)
  • Re: custom shell starts before all services loaded
    ... Shell to run the script file. ... > I created a small app for my custom shell which then starts my main app, ... because my main app comes up on the custom display. ... As far as WaitForInputIdle(), ...
    (microsoft.public.windowsxp.embedded)
  • Re: WaitForAPIReady CE 6.0
    ... As for the serial port, of course, you can catch the ... Running with the shell but with the task bar ... serial code to start, ... based app will be able to run because it depends on what underlying ...
    (microsoft.public.windowsce.platbuilder)
  • Re: hide taskbar
    ... I assume you have included all the dependencies of your app in to your image. ... I also assume you have properly set your app to be the shell. ... search for Custom shell in the XPe docs. ... > background, no taskbar and no programm running, with no error message. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Environment Space in XP
    ... As soon as you 'run' your batch file the 'Shell' containing those settings ... You cannot set up a DOS environment like that unless you execute an app ... When I executed a DOS box, it again showed 'Out of environment space' but I ...
    (comp.lang.clipper)

Loading