mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2024-09-20 09:30:34 +00:00
Rely on python to self-elevate
This commit is contained in:
parent
fa8ae96aba
commit
5e8a2bfd9e
1 changed files with 0 additions and 26 deletions
|
@ -1,29 +1,3 @@
|
||||||
:::::::::::::::::::::::::::::::::::::::::
|
|
||||||
:: Automatically check & get admin rights
|
|
||||||
:::::::::::::::::::::::::::::::::::::::::
|
|
||||||
@echo off
|
|
||||||
|
|
||||||
:checkPrivileges
|
|
||||||
NET FILE 1>NUL 2>NUL
|
|
||||||
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
|
|
||||||
|
|
||||||
:getPrivileges
|
|
||||||
if '%~1'=='ELEV' (shift & goto main)
|
|
||||||
ECHO.
|
|
||||||
|
|
||||||
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
|
|
||||||
::::::::::::::::::::::::::::
|
|
||||||
::START
|
|
||||||
::::::::::::::::::::::::::::
|
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
setlocal enableDelayedExpansion
|
setlocal enableDelayedExpansion
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue