Advertisement
Guest User

arckill

a guest
Feb 11th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.87 KB | None | 0 0
  1. @echo off
  2.  
  3. :: BatchGotAdmin
  4. :-------------------------------------
  5. REM  --> Check for permissions
  6. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  7.  
  8. REM --> If error flag set, we do not have admin.
  9. if '%errorlevel%' NEQ '0' (
  10.     echo Requesting administrative privileges...
  11.     goto UACPrompt
  12. ) else ( goto gotAdmin )
  13.  
  14. :UACPrompt
  15.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  16.     echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
  17.  
  18.     "%temp%\getadmin.vbs"
  19.     exit /B
  20.  
  21. :gotAdmin
  22.     if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
  23.     pushd "%CD%"
  24.     CD /D "%~dp0"
  25. :--------------------------------------
  26.  
  27. taskkill /f /im ArcChat.exe
  28. taskkill /f /im ArcOSBrowser.exe
  29. taskkill /f /im Arc.exe
  30.  
  31. start /d "C:\Games\Forsaken World_en_20150729160506\update" pem.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement