22 lines
600 B
Batchfile
22 lines
600 B
Batchfile
@echo off
|
|
REM Silent bloatware removal batch wrapper
|
|
REM Run as Administrator
|
|
|
|
setlocal enabledelayedexpansion
|
|
set "SCRIPT_DIR=%~dp0"
|
|
|
|
REM Check for admin rights
|
|
net session >nul 2>&1
|
|
if %errorlevel% neq 0 (
|
|
echo This script requires Administrator privileges.
|
|
echo Attempting to elevate...
|
|
powershell -Command "Start-Process cmd -ArgumentList '/c %~0' -Verb RunAs" >nul 2>&1
|
|
exit /b
|
|
)
|
|
|
|
REM Run the main bloatware removal script silently
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "%SCRIPT_DIR%Remove-AllBloat.ps1" >nul 2>&1
|
|
|
|
REM Silent exit
|
|
exit /b 0
|