Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- TITLE NAJEEB RUN COMMANDS IN TEXT FILE
- mode con cols=10 lines=4
- Color E9
- set "params=%*"
- cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
- SET cmdtxt=%~1
- FOR /F "USEBACKQ TOKENS=*" %%A IN ("CMD.txt") do (
- cmd /c "%%~A"
- )
- ::PAUSE
- EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement