JSI Tip 4215. How do I hide the logon script window on 'all' clients?
Jerold Schulman
October 14, 2001
1 Min Read
If you have a mix of Windows NT clients (Windows NT, Windows 2000, and Windows XP), tip 0438 can be used to hide the logon script window.
Using Workstation.bat, I have scripted HideLogonWindow.bat to automate the process. The usage syntax is:
HideLogonWindow Domain Account Password LogonScript PDC [DC1 DC2 ... DCn]
where:
Domain | See Workstation.bat |
---|---|
Account | See Workstation.bat |
Password | See Workstation.bat |
LogonScript | The logon script name, such as logon.bat. |
PDC | The Computer Name of the PDC. |
DC(s) | A list of additional domain controller names. |
HideLogonWindow.bat logs it's activity at \PDCNETLOGONhidelogon.log.
HideLogonWindow.bat contains:
@echo offsetlocalIf {%5} EQU {} goto syntaxset domain=%1set account=%2set pw=%3set logon=%4set logon=%logon:"=%set wrk=%5set wrk=\%wrk:"=%NETLOGON@echo REGEDIT4>%wrk%hidelogon.reg@echo.>>%wrk%hidelogon.regshiftshiftshift:loopshiftif {%1} EQU {} goto applyset srv=%1set srv=%srv:"=%set script="\%srv%NETLOGON%logon%"if NOT exist %script% goto syntax@echo [HKEY_CURRENT_USERConsole__%srv%_NETLOGON_%logon%]>>%wrk%hidelogon.reg@echo "QuickEdit"=dword:00000800>>%wrk%hidelogon.reg@echo "WindowSize"=dword:0005000d>>%wrk%hidelogon.reg@echo "WindowPosition"=dword:3fc0000>>%wrk%hidelogon.reg@echo "FontSize"=dword:0014000a>>%wrk%hidelogon.reg@echo "FontFamily"=dword:00000030>>%wrk%hidelogon.reg@echo "FontWeight"=dword:00000190>>%wrk%hidelogon.reg@echo "HistoryNoDup"=dword:00000000>>%wrk%hidelogon.reg@echo. >>%wrk%hidelogon.reg@echo. >>%wrk%hidelogon.reggoto loop:syntax@echo HideLogonWindow Domain Account Password logonScript PDC [DC1 DC2 ... DCn]endlocalgoto :EOF:apply@echo @echo on>%wrk%hidelogon.bat@echo if NOT "%OS%"=="Windows_NT" goto :EOF>>%wrk%hidelogon.bat@echo regedit /s %wrk%hidelogon.reg>>%wrk%hidelogon.bat@echo.>>%wrk%hidelogon.batif exist %wrk%hidelogon.log del /q %wrk%hidelogon.log call Workstation %domain% %account% %pw% WS %wrk%hidelogon.bat %wrk%hidelogon.log@echo Finished applying hidelogon.regdel /q %wrk%hidelogon.batdel /q %wrk%hidelogon.regendlocal
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like