19 lines
686 B
Batchfile
19 lines
686 B
Batchfile
@ECHO OFF
|
|
CD "%TEMP%" & CLS & @TITLE Post-Setup tasks
|
|
|
|
REM Check if the bootcamp folder exists, and if so run the specific script
|
|
FOR %%i IN (X F E D C) DO (
|
|
FOR /F "tokens=2 delims= " %%t IN ('vol %%i: 2^>nul') DO (
|
|
IF EXIST %%i:\BootCamp\BootCamp.xml (
|
|
ECHO Found BootCamp on drive %%i:
|
|
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v AppsRoot /t REG_SZ /d %%i /f
|
|
)
|
|
)
|
|
)
|
|
|
|
REM Run the winsetupcomplete.ps1 script
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%SYSTEMROOT%\OEM\setup\scripts\winsetupcomplete.ps1"
|
|
|
|
REM del /q /f "%0"
|
|
REM rename the file to prevent it from running again
|
|
ren "%0" "%0.bak" |