Shell restart runs profile

Shell restart runs profile

Post by Zvika Volk » Tue, 29 Jul 2003 15:56:41

Hi, guys!

I have a following scenario of the problem:
It's possible to change settings of the Start Menu through Registry
keys(NoFind, NoRun etc). But in order to make these settings valid it is
necessary to restart the Shell. The restart can be done through sending to
the main window of the Shell WM_QUIT message that is killing the Shell
(explorer.exe process is killed) and launching explorer.exe again.

HWND hwndShell = ::FindWindow("Progman", NULL);
::PostMessage(hwndShell, WM_QUIT, 0, 0L);


This mechanism is perfectly working in Windows NT environment, but in
Windows 2000/XP it makes a problem. It truly restarts the shell but
additionally it runs all programs from the Startup of All Users and Current
loged on user profiles. I don't need it each time I restart the Shell.
If somebody knows how to prevent the launching Startup programs on Shell
restart please let me know.

Thanks a lot.

Shell restart runs profile

Post by Maxim S. S » Tue, 29 Jul 2003 20:22:46

IIRC you can just add the .LNK file to necessary directory. The majority of
installation packages add items to Start menu without restarting the shell.