@echo off
Color 1f
@Title UWP Provisioning Execution - ADMIN Mode
:: Set the encoding to UTF-8 (65001) for better character display.
@C:\Windows\System32\chcp 65001 > nul
:: Commands are executed as administrator
:: ------------------------------------------
REM --> Authorization verification (Admin)
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If you do not have administrator rights, elevate your privileges (UAC).
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else (
goto gotAdmin
)
:UACPrompt
@echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"="
echo UAC.ShellExecute "%~s0", "%params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
@cls
echo =================================================================
echo === Start AppxBundle Installation in Audit Mode ===
echo =================================================================
:: Each call to PowerShell.exe runs a provisioning script.
echo [1/6] Running Calculator Installation....
PowerShell.exe -ExecutionPolicy Bypass -File "C:\Install-Calculator.ps1"
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Calculator installation failed!
goto :error_exit
)
echo.
echo [2/6] Running Ookla Speedtest installation...
PowerShell.exe -ExecutionPolicy Bypass -File "C:\Install-Ookla.ps1"
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Ookla Speedtest installation failed!
goto :error_exit
)
echo.
echo [3/6] Running Paint Installation...
PowerShell.exe -ExecutionPolicy Bypass -File "C:\Install-Paint.ps1"
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Paint installation failed!
goto :error_exit
)
echo.
echo [4/6] Running Photo Installation...
PowerShell.exe -ExecutionPolicy Bypass -File "C:\Install-Photos.ps1"
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Photo installation failed!
goto :error_exit
)
echo.
echo [5/6] Running Screen Capture Installation...
PowerShell.exe -ExecutionPolicy Bypass -File "C:\Install-ScreenSketch.ps1"
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Screen Capture installation failed!
goto :error_exit
)
echo.
echo [6/6] Terminal Installation in Progress...
PowerShell.exe -ExecutionPolicy Bypass -File "C:\Install-Terminal.ps1"
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Terminal installation failed!
goto :error_exit
)
echo.
echo =================================================================
echo === ✅ All PowerShell scripts completed successfully. ===
echo =================================================================
goto :eof
:error_exit
echo.
echo =================================================================
echo !!! ❌ AUTOMATION HAS BEEN INTERRUPTED DUE TO AN ERROR!!!
echo Check the individual PowerShell script logs for details.
echo =================================================================
pause