Disable manage server screen (VBScript)

This code can be found in Chapter 2 of Windows Server Cookbook

Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.

Find out how to download all of the VBScript code from this site.

' This code disables the Manage/Configure Your Server screen for all users
' (this only applies to users that have not logged in yet)
' ---------------------------------------------------------------
' From the book "Windows Server Cookbook" by Robbie Allen
' ISBN: 0-596-00633-0
' ---------------------------------------------------------------

' ------ SCRIPT CONFIGURATION ------
intEnable = 0                 ' 0 = disable screen; 1 = enable screen
strComputer = "."  ' name of target server
' ------ END CONFIGURATION ---------
const HKU   = &H80000003
strKeyPath  = ".DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\Setup\Welcome"
strValue = "srvwiz"
set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
intRC = objReg.SetDwordValue(HKU, strKeyPath, strValue, intEnable)
if intRC <> 0 then
   WScript.Echo "Error setting registry value: " & intRC
else
   WScript.Echo "Successfully disabled screen"
end if

This code has been viewed 1409 times.

New from the creators of TechTasks.com: StatSheet.com