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.