:: ### START UAC SCRIPT ###

if "%2"=="firstrun" exit
cmd /c "%0" null firstrun

if "%1"=="skipuac" goto skipuacstart

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)

setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:gotPrivileges

setlocal & pushd .

cd /d %~dp0
cmd /c "%0" skipuac firstrun
cd /d %~dp0

:skipuacstart

if "%2"=="firstrun" exit

:: ### END UAC SCRIPT ###

Title XCOM 2 v1.0.0.30310 CPUID Patch
del /f /q XCom2.exe
cls
cpuid.exe XCom2.tmp XCom2.tmp1 cpuid1.ini
cpuid.exe XCom2.tmp1 XCom2.tmp2 cpuid2.ini
cpuid.exe XCom2.tmp2 XCom2.exe cpuid3.ini
pause
del /f /q XCom2.tmp
del /f /q XCom2.tmp1
del /f /q XCom2.tmp2
del /f /q cpuid.exe
del /f /q cpuid1.ini
del /f /q cpuid2.ini
del /f /q cpuid3.ini
del /f /q CPUID.Patch.bat