@echo off set SCRIPTS=%WINDIR%\Setup\scripts set LOG=%SCRIPTS%\SetupComplete.txt if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1 shift /1 echo ####### %0 ####### date /t time /t echo DISABLE Windows "Hi" animation ... @echo on reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableFirstLogonAnimation /t REG_DWORD /d 0 /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableFirstLogonAnimation /t REG_DWORD /d 0 /f @echo off echo. rem allow execution of any powershell script ... powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine" powershell -Command ^ "$T=Get-ExecutionPolicy ; if ($T -eq 'Bypass') { ^ write-host 'POWERSHELL: Execution Policy was set to BYPASS' ^ } ^ else { ^ write-host 'ERROR: CANNOT SET Execution Policy to BYPASS !' ^ }" echo. rem call powershell stuff ... powershell -Command %SCRIPTS%\SetupComplete.ps1 date /t time /t echo ####### %0 #######