2020-12-24 14:58:04 +01:00
|
|
|
@echo off
|
2020-12-25 20:08:46 +01:00
|
|
|
set LOG=C:\SetupComplete.txt
|
|
|
|
set BATCH=SetupComplete.cmd
|
|
|
|
set PS1=SetupComplete.ps1
|
2020-12-23 14:46:12 +01:00
|
|
|
|
2020-12-25 15:05:19 +01:00
|
|
|
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
|
|
|
|
shift /1
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
date /t
|
|
|
|
time /t
|
|
|
|
echo.
|
2020-12-23 14:46:12 +01:00
|
|
|
|
2020-12-25 23:20:14 +01:00
|
|
|
echo Disable Windows "Hi" Animation ...
|
|
|
|
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
|
|
|
|
|
2020-12-24 14:58:04 +01:00
|
|
|
rem allow execution of any powershell script ...
|
2020-12-25 15:05:19 +01:00
|
|
|
powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine"
|
2020-12-24 14:58:04 +01:00
|
|
|
powershell -Command ^
|
2020-12-25 15:05:19 +01:00
|
|
|
"$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.
|
2020-12-24 14:58:04 +01:00
|
|
|
|
2020-12-25 20:08:46 +01:00
|
|
|
rem try to call a script...
|
|
|
|
for %%D in (H G F E D) do (
|
|
|
|
if EXIST %%D:\%PS1% (
|
|
|
|
echo EXECUTING %PS1% on drive %%D ...
|
|
|
|
powershell -Command %%D:\%PS1%
|
|
|
|
) else (
|
|
|
|
echo INFO: %PS1% not found on drive %%D!
|
|
|
|
)
|
|
|
|
|
|
|
|
if EXIST %%D:\%BATCH% (
|
|
|
|
echo EXECUTING %BATCH% on drive %%D ...
|
|
|
|
call %%D:\%BATCH%
|
|
|
|
) else (
|
|
|
|
echo INFO: %BATCH% not found on drive %%D!
|
|
|
|
)
|
2020-12-25 15:05:19 +01:00
|
|
|
|
2020-12-25 20:08:46 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
echo.
|
2020-12-25 15:05:19 +01:00
|
|
|
date /t
|
|
|
|
time /t
|
|
|
|
echo ####### %0 #######
|
2020-12-24 14:58:04 +01:00
|
|
|
|