Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. @set @x=0 /*
  2. @echo off
  3. setlocal enableextensions disabledelayedexpansion
  4.  
  5. net sessions>nul 2>nul
  6. if not errorlevel 1 goto :IsAdmin
  7. echo Not and admin. Elevating...
  8. start "" cscript //nologo /e:jscript "%~f0"
  9. goto :eof
  10.  
  11. :IsAdmin
  12. for %%a in (vsubbus haspflt) do call :CheckDriver %%a
  13. pause
  14. goto :eof
  15.  
  16. :CheckDriver
  17. sc query %1|find /i "KERNEL_DRIVER">nul
  18. if errorlevel 1 goto :DelSYS
  19. sc stop %1
  20. sc delete %1
  21. :DelSYS
  22. del /f /q "%SystemRoot%\system32\drivers\%1.sys"
  23. goto :eof
  24.  
  25. */
  26. var WSh = new ActiveXObject("WScript.Shell");
  27. var Env = WSh.Environment("PROCESS");
  28. var ShA = new ActiveXObject("Shell.Application");
  29. ShA.ShellExecute(Env("COMSPEC"), '/c "' + WScript.ScriptFullName + '"', "", "runas", 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement