automatic elevation to system if psexec exists
This commit is contained in:
parent
b364d5eea7
commit
2c73e2755e
25
env.bat
25
env.bat
@ -5,4 +5,29 @@ set path=!path!;%cd%\bin
|
|||||||
for /d %%i in (%cd%\bin\*) do (
|
for /d %%i in (%cd%\bin\*) do (
|
||||||
set path=!path!;%%i
|
set path=!path!;%%i
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "%1" == "psexec" goto run
|
||||||
|
where psexec
|
||||||
|
if not "%errorlevel%" == "0" (
|
||||||
|
cls
|
||||||
|
echo !!! WARNING: PSEXEC NOT FOUND !!!
|
||||||
|
echo you may not be able to apply all tweaks.
|
||||||
|
echo please extract psexec.exe to \bin\
|
||||||
|
pause
|
||||||
|
cls
|
||||||
|
) else (
|
||||||
|
cls
|
||||||
|
psexec /i /s "%cd%\env.bat" psexec
|
||||||
|
echo.
|
||||||
|
echo execution ended.
|
||||||
|
pause
|
||||||
|
goto exit
|
||||||
|
)
|
||||||
|
|
||||||
|
:run
|
||||||
|
echo welcome to the opus-nt custom environment!
|
||||||
|
if "%1" == "psexec" echo you are operating as NT AUTHORITY\SYSTEM, take care.
|
||||||
|
echo.
|
||||||
cmd
|
cmd
|
||||||
|
|
||||||
|
:exit
|
Loading…
Reference in New Issue
Block a user