Index: base/shell/explorer-new/explorer.c =================================================================== --- base/shell/explorer-new/explorer.c (revision 58171) +++ base/shell/explorer-new/explorer.c (working copy) @@ -387,6 +387,13 @@ /* FIXME - initialize SSO Thread */ + /* WinXP: Notify msgina to hide the welcome screen */ + if (!SetShellReadyEvent(TEXT("msgina: ShellReadyEvent"))) + SetShellReadyEvent(TEXT("Global\\msgina: ShellReadyEvent")); + + /* Startup items are processed before desktop and TaskBar is created */ + ProcessStartupItems(); + if (CreateShellDesktop) { if (RegisterTrayWindowClass() && RegisterTaskSwitchWndClass()) @@ -396,12 +403,6 @@ if (Tray != NULL) hShellDesktop = DesktopCreateWindow(Tray); } - - /* WinXP: Notify msgina to hide the welcome screen */ - if (!SetShellReadyEvent(TEXT("msgina: ShellReadyEvent"))) - SetShellReadyEvent(TEXT("Global\\msgina: ShellReadyEvent")); - - ProcessStartupItems(); } else { Index: base/shell/explorer-new/startup.c =================================================================== --- base/shell/explorer-new/startup.c (revision 58171) +++ base/shell/explorer-new/startup.c (working copy) @@ -24,21 +24,19 @@ * as part of the bootstrap process. Theses are roughly devided into three types. * Knowledge base articles that explain this are 137367, 179365, 232487 and 232509. * Also, 119941 has some info on grpconv.exe - * The operations performed are (by order of execution): + * The operations performed are (by order of execution after log in): * - * Startup (before the user logs in) - * - Services (NT, ?semi-synchronous?, not implemented yet) - * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce (9x, asynch) - * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices (9x, asynch) + * WinXP SP3 x86 and win2k3 SP1 x86 processes startup items in different order. + * There is how win2k3 SP1 does it: + * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce (synch) + * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (asynch) + * - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce (asynch) + * - Current user Startup folder "%USERPROFILE%\Start Menu\Programs\Startup" (asynch) + * - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (asynch) + * - All users Startup folder "%ALLUSERSPROFILE%\Start Menu\Programs\Startup" (asynch) * - * After log in - * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce (all, synch) - * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (all, asynch) - * - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (all, asynch) - * - Startup folders (all, ?asynch?, no imp) - * - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce (all, asynch) - * - * Somewhere in there is processing the RunOnceEx entries (also no imp) + * There is no processing any RunOnceEx entries nor in 2k3 SP1 x86 nor in XP SP3 x86 + * None is processed in Safe Mode [win2k3 SP1 x86, XP SP3 x86] */ #include "precomp.h" @@ -284,18 +282,22 @@ * stopping if one fails, skipping if necessary. */ res = TRUE; - if (res && (SHRestricted(REST_NOLOCALMACHINERUNONCE) == 0)) + if (res && bNormalBoot && (SHRestricted(REST_NOLOCALMACHINERUNONCE) == 0)) res = ProcessRunKeys(HKEY_LOCAL_MACHINE, L"RunOnce", TRUE, TRUE); if (res && bNormalBoot && (SHRestricted(REST_NOLOCALMACHINERUN) == 0)) res = ProcessRunKeys(HKEY_LOCAL_MACHINE, L"Run", FALSE, FALSE); if (res && bNormalBoot && (SHRestricted(REST_NOCURRENTUSERRUNONCE) == 0)) - res = ProcessRunKeys(HKEY_CURRENT_USER, L"Run", FALSE, FALSE); + res = ProcessRunKeys(HKEY_CURRENT_USER, L"RunOnce", TRUE, FALSE); + /* Current user Startup folder */ + if (res && bNormalBoot && (SHRestricted(REST_NOCURRENTUSERRUNONCE) == 0)) - res = ProcessRunKeys(HKEY_CURRENT_USER, L"RunOnce", TRUE, FALSE); + res = ProcessRunKeys(HKEY_CURRENT_USER, L"Run", FALSE, FALSE); + /* All users Startup folder */ + printf("Operation done\n"); return res ? 0 : 101;