SHARE
TWEET

Untitled

a guest Jul 17th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :--------------------------------------   UAC PROMPT
  2. @echo off
  3.     IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
  4. >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  5. ) ELSE (
  6. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  7. )
  8. if '%errorlevel%' NEQ '0' (
  9.     echo Requesting administrative privileges...
  10.     goto UACPrompt
  11. ) else ( goto gotAdmin )
  12. :UACPrompt
  13.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  14.     set params= %*
  15.     echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  16.     "%temp%\getadmin.vbs"
  17.     del "%temp%\getadmin.vbs"
  18.     exit /B
  19. :gotAdmin
  20.     pushd "%CD%"
  21.     CD /D "%~dp0"
  22. :--------------------------------------   UAC PROMPT END
  23. :actual script below
  24. cls
  25. @echo on
  26. rd /s /q %temp%
  27. mkdir %temp%
  28. rd /s /q c:\windows\temp\
  29. mkdir c:\windows\temp\
  30. netsh interface ip delete arpcache
  31. ipconfig /flushdns
  32. Dism.exe /online /Cleanup-Image /StartComponentCleanup
  33. pause
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top