My program creates a second desktop using CreateDesktop and then launches
explorer. Something like:
CreateDesktop( DESKTOP_VIRTUAL_NAME, NULL, NULL, DF_ALLOWOTHERACCOUNTHOOK,
MAXIMUM_ALLOWED, NULL );
CreateProcess( "C:\\WINNT\\Explorer.exe", NULL, NULL, NULL, FALSE, 0, NULL,
NULL, &si, &pi );
Sometimes (5% of the cases), the new explorer relaunches all programs from
the run HKCU and HKLM keys and from the start menu. What is it happening
sometimes and not "never or all the time"? What does explorer (or winlogon
or I-don't-know-what) loose which forces the new explorer to relaunch
everything?
Many thanks by advance,
Gregoire
Explorer runs the startup items unless it finds the subkey 'StartupHasBeenRun' under
HKEY_CURRENT_USER
Software
Microsoft
Windows
CurrentVersion
Explorer
SessionInfo
<SessionID>
where <SessionID> is what GetTokenInformation returns in the AuthenticationId member of the TOKEN_STATISTICS structure. At this point I'm not sure why Explorer would sometimes run the startup items and sometimes not.
--
Jim Barry, MVP for Windows SDK
Gregoire
"Jim Barry" <j...@mvps.org> wrote in message
news:OaACXF2P...@TK2MSFTNGP10.phx.gbl...
Gregoire
"Jim Barry" <j...@mvps.org> wrote in message
news:OaACXF2P...@TK2MSFTNGP10.phx.gbl...