LISTING 3: Third.bat @ECHO OFF BEGIN CALLOUT A REM Identify the client OS. if "%OS%"=="Windows_NT" goto winntscr goto end :winntscr END CALLOUT A BEGIN CALLOUT B REM Delete Default User; replace with Default Temp. %0\..\DELTREE "%SystemRoot%\Profiles\Default User" MOVE "%SystemRoot%\Profiles\Default Temp" "%SystemRoot%\Profiles\Default User" REM Force RAS connections to disconnect at logoff. %0\..\reg update "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\KeepRasConnections"="0" > NUL END CALLOUT B REM Remove old domain's accounts from local Administrators group. net localgroup administrators "OLDDOMAIN\Domain Admins" /delete > NUL net localgroup administrators OLDDOMAIN\%MigrateUser% /delete > NUL net localgroup administrators OLDDOMAIN\Migrate /delete > NUL :end