Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- call :isAdmin
- if %errorlevel% == 0 (
- goto :run
- ) else (
- echo Requesting administrative privileges...
- goto :UACPrompt
- )
- exit /b
- :isAdmin
- fsutil dirty query %systemdrive% >nul
- exit /b
- :run
- ## your command here
- powershell -command "get-process *steam* | stop-process
- exit /b
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- echo UAC.ShellExecute "cmd.exe", "/c %~s0 %~1", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- del "%temp%\getadmin.vbs"
- exit /B`
Advertisement
Comments
-
- This was not created by me but unfortunately I didn't get the source
Add Comment
Please, Sign In to add comment