Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @set @x=0 /*
- @echo off
- setlocal enableextensions disabledelayedexpansion
- net sessions>nul 2>nul
- if not errorlevel 1 goto :IsAdmin
- echo Not and admin. Elevating...
- start "" cscript //nologo /e:jscript "%~f0"
- goto :eof
- :IsAdmin
- for %%a in (vsubbus haspflt) do call :CheckDriver %%a
- pause
- goto :eof
- :CheckDriver
- sc query %1|find /i "KERNEL_DRIVER">nul
- if errorlevel 1 goto :DelSYS
- sc stop %1
- sc delete %1
- :DelSYS
- del /f /q "%SystemRoot%\system32\drivers\%1.sys"
- goto :eof
- */
- var WSh = new ActiveXObject("WScript.Shell");
- var Env = WSh.Environment("PROCESS");
- var ShA = new ActiveXObject("Shell.Application");
- ShA.ShellExecute(Env("COMSPEC"), '/c "' + WScript.ScriptFullName + '"', "", "runas", 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement