(view source code of seclogin.bat as plain text)
@ECHO OFF
:: Not for Windows 9x nor MS-DOSIF NOT "%OS%"=="Windows_NT" GOTO Syntax
:: Localize the environment variable usedSETLOCAL
:: Only 1 command line argument allowedIF NOT "%~2"=="" GOTO Syntax
:: Windows XP onlyVER | FIND "5.1." >NUL || GOTO Syntax
:: Command line argument can only be a valid computer nameECHO.%~1 | FINDSTR /R /C:"[/?\*:;,@\\\+]" >NUL && GOTO Syntax
IF NOT "%~1"=="" (
PING %1 -n 2 2>NUL | FIND "TTL=" >NUL
IF ERRORLEVEL 1 (
GOTO Syntax
) ELSE (
SET RemotePC=%~1
SET RemotePC=%RemotePC:\=%
)):: Do NOT display the last user name at logon:: REG Add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies" /v DontDisplayLastUserName /t REG_DWORD /d 1 /fREG Add "%RemotePC%HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies" /v DontDisplayLastUserName /t REG_DWORD /d 1 /f
:: Require Ctrl+Alt+DEl at logonREG Add "%RemotePC%HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableCAD /t REG_DWORD /d 0 /f
:: Use "classic" login screen instead of XP Welcome screenREG Add "%RemotePC%HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LogonType /t REG_DWORD /d 0 /f
:: DoneENDLOCAL
GOTO:EOF
:SyntaxECHO SecLogin.bat, Version 1.00 for Windows XP
ECHO Make Windows XP's logon more secure by using the "classic" login dialog
ECHO instead of the welcome screen, disabling the display of the last user name
ECHO at logon, and requiring Ctrl+Alt+Del to logon
ECHO.
ECHO Usage: SECLOGIN [ remote ]
ECHO.
ECHO Where remote is an optional remote computer name to which the changes
ECHO should be applied (default is the local computer)
ECHO.
ECHO Note: This batch file modifieds the registry, which is always risky.
ECHO Use this batch file entirely at your own risk.
ECHO Make sure you have a tested full backup and the appropriate restore
ECHO software available before running this batch file.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
IF "%OS%"=="Windows_NT" ENDLOCAL
page last modified: 2025-10-11; loaded in 0.0062 seconds