Files
2025-05-16 11:48:40 +03:00

32 lines
934 B
Batchfile

@echo off
setlocal EnableDelayedExpansion
:: BatchGotAdmin BEGIN https://sites.google.com/site/eneerge/home/BatchGotAdmin | https://ss64.com/nt/rem.html | https://ss64.com/nt/cacls.html
:: Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
:: If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%~dp0getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%~dp0getadmin.vbs"
"%~dp0getadmin.vbs"
exit /B
:gotAdmin
if exist "%~dp0getadmin.vbs" ( del "%~dp0getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:: BatchGotAdmin END
cd /d "%~dp0\modules"
call init.bat
start call packages.bat
start call configurations.bat
start call mounts.bat