Re: depend and launch in init registry

From: bsqr_TSAT (TSatagaj)
Date: 10/28/04


Date: Thu, 28 Oct 2004 09:34:13 -0700


To run a file at startup (after starting the file-system), the WinCE kernel
looks for a special registry entries.
Example.
     [HKEY_LOCAL_MACHINE]\Init
     "Launch95"="MyStartScreen.exe"
     "Depends95"=hex:1E,00

Launch95 tells the kernel to run "MyStartScreen.exe" at startup.
Depends95 tells the kernel to run "MyStartScreen.exe" to run only after
everything labelled 'Launch30' has already started.
Launch30 is our trigger because Depends95 = hex:1E,00 and 0x1E = 30.

Note that in COMMON.REG, Launch30 is used for GWES.EXE. So in effect, we
are telling the kernel to run "MyStartScreen.exe" only after GWES.EXE has
already started. Also note that this only ensures that GWES will be
started; there's no guarantee that its fully initialized, ready, completed,
etc. We must still use a call to "IsAPIReady()" in "MyStartScreen.exe" to
see if GWES is ready for us.

Finally, the 95 in Launch95 is chosen at random as an integer greater than
the final LaunchXX integer in the registry.

BSQR_TSAT

"Kursad" <Kursad@discussions.microsoft.com> wrote in message
news:47E7B5C2-EE30-408F-AA18-79CD276BF5E6@microsoft.com...
> Hi,
> Can anyone explain the semantics of "dependXX" and "launchXX" in the
> registry key HKEY_LOCAL_MACHINE/init? Specifically:
> 1. LaunchXX tells the order to launch these applications, is that correct?
> 2. DependXX says "If the dependent application doesn't exist, don't launch
> this one either". Is that correct?
>
> Basically, the problem I'm trying to solve is this: The video driver has a
> problem with resetting. As a workaround, I need to launch an application
> during startup that will reset the video. However, this application has to
> run after the video driver finishes its initialization. The windows screen
> comes up after the initialization is complete, so I made my video reset
> application to run after (and it is dependent on) explorer.exe. Is there a
> better way to do this? Is there a way to find out if the video driver has
> completed its initialization?
> Thanks a lot!