Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CreateDesktop and Explorer

0 views
Skip to first unread message

Gregoire Gentil

unread,
Jun 28, 2003, 8:07:42 PM6/28/03
to
Hello,

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


Jim Barry

unread,
Jun 30, 2003, 7:42:57 PM6/30/03
to
Gregoire Gentil wrote:
> 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?

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 Gentil

unread,
Jun 30, 2003, 9:56:53 PM6/30/03
to
Right. That answers my question. Many thanks for your help.

Gregoire


"Jim Barry" <j...@mvps.org> wrote in message
news:OaACXF2P...@TK2MSFTNGP10.phx.gbl...

Gregoire Gentil

unread,
Jul 1, 2003, 6:17:42 PM7/1/03
to
Interesting also to notice that this key is volatile...

Gregoire

"Jim Barry" <j...@mvps.org> wrote in message
news:OaACXF2P...@TK2MSFTNGP10.phx.gbl...

0 new messages