How to Launch a Program Before the Shell at Logon

Last reviewed: February 25, 1998
Article ID: Q142905
The information in this article applies to:
  • Microsoft Windows NT Server version 4.0
  • Microsoft Windows NT Workstation version 4.0

SUMMARY

This article explains how to avoid interaction between a program and the standard shell by running the program before the shell starts.

MORE INFORMATION

When you log on, the registry key

   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
   \Windows NT\CurrentVersion\Winlogon

describes the actions made by WinLogon.

The Userinit value describes the program launched by WinLogon.

   Userinit:      REG_SZ
   Default value: USERINIT,NDDEAGNT.EXE

The first entry (USERINIT) is responsible for executing the shell program. To start your program before the shell, you may replace this entry with your own program. If you do so, your application is responsible for launching the shell (Explorer.exe in Windows NT 4.0).

Explorer.exe is the standard shell in Windows NT 4.0. It can operate in two modes:

  • Browser mode (similar to File Manager)
  • Shell mode (to manage the desktop, taskbar, and Start button)

When you launch Explorer.exe, the following conditions are checked by Explorer.exe to work in shell mode:

  1. No instances of Explorer.exe are running
2. It is the standard shell for the system (see shell registry value under WinLogon key)

If you launch Explorer.exe from your own "userinit" initialization program, be sure that the shell value always references Explorer.exe, otherwise Explorer.exe will operate in browser mode instead of shell mode.


Additional query words: prodnt
Keywords : NTSrvWkst ntui kbui
Version : 4.0
Platform : winnt


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 25, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.