@echo off if "%1"=="" goto error set tmpfile=C:\temp.reg echo Windows Registry Editor Version 5.00 > %tmpfile% echo.>>%tmpfile% echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon] >> %tmpfile% echo "DefaultDomainName"="CALSB" >> %tmpfile% echo "DefaultUserName"="%1" >> %tmpfile% reg import %tmpfile% del %tmpfile% goto exit :error echo You must specify the username! pause :exit