Advertisement
Guest User

R@1n

a guest
Oct 23rd, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.84 KB | None | 0 0
  1. @echo off
  2. ::===================
  3. :: Set Title of the script
  4. title R@1n Activator
  5. ::===================
  6. :: Get Administrator Rights
  7. REM  --> Check for permissions
  8. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  9. REM --> If error flag set, we do not have admin.
  10. if '%errorlevel%' NEQ '0' (
  11.     echo Requesting administrative privileges...
  12.     goto UACPrompt
  13. ) else ( goto gotAdmin )
  14. :UACPrompt
  15.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  16.     set params = %*:"=""
  17.     echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  18.  
  19.     "%temp%\getadmin.vbs"
  20.     del "%temp%\getadmin.vbs"
  21.     exit /B
  22. :gotAdmin
  23.     pushd "%CD%"
  24.     CD /D "%~dp0"
  25. :--------------------------------------
  26.  
  27. "%~dp0Activator.exe" /ActAuto /Logo=AutoDetect
  28. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement