Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How To Check If All The Computers Running On Network Are Using Default Windows Shell.


Author: Nirmal Sharma MVP

View products that this article applies to.

Summary

The following knowledgebase explains the method you can use to check if the user or computer is using the Windows default Explorer Shell.

↑ Back to the top


More information

The Windows Default Shell is Explorer.exe for computer (it will apply to all the users who have logged on to the computer successfully). The user shell is Userinit.exe (This shell will apply to users who have logged on to the computer successfully).

Windows default Shell and Users Shell reside in the following registry entry:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon.

In the right pane you can see the following entries:

Shell���������������� REG_SZ��������� Explorer.exe
Userinit���������� �REG_SZ��������� C:\WINDOWS\system32\userinit.exe,

You can use the following script to check whether all the computers in your network are using default shell or not:

@echo off

Srvlist=C:\Temp\Srvlist.txt

Echo Computer Name, Windows Default Shell?, User Shell? >> Result.csv

SET Win_Def=
SET Usr_Def=

For /F �Tokens=*� %%a In (%srvlist%) Do (

Set Comp_name=%%a

Set RegQry=�\\%%a\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon�

REG.exe Query %RegQry% > CheckShell.txt

Find /i "Explorer.exe" < CheckShell.txt > StringCheck.txt

If %errorlelvel% == 0 (
����������� SET Win_Def=Yes
) ELSE (
����������� SET Win_Def=No
)

Find /i �userinit.exe� < CheckShell.txt > StringCheck.txt

If %errorlelvel% == 0 (
����������� SET Usr_Def=Yes
) ELSE (
����������� SET Usr_Def=No
)

Echo %Comp_name, %Win_Def%, %Usr_Def% >> Result.csv

)
*** End ***

The above script will run the Reg.exe command on all the computers specified in ComputerList.txt and will save the result in Result.csv for computers who have Windows Default Shell and user default shell specified in registry.

↑ Back to the top


Community solutions content disclaimer

Microsoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.

↑ Back to the top


Keywords: KB556011, kbhowto, kbpubtypecca, kbpubmvp

↑ Back to the top

Article Info
Article ID : 556011
Revision : 1
Created on : 9/25/2007
Published on : 9/25/2007
Exists online : False
Views : 367