Answers for "run command as administrator in cmd"

7

run cmd as administrator command line

powershell -command "start-process cmd -verb runas"
Posted by: Guest on May-14-2021
0

how to run cmd run administrator using script

if "%~s0"=="%~s1" ( cd %~sp1 & shift ) else (
  echo CreateObject^("Shell.Application"^).ShellExecute "%~s0","%~0 %*","","runas",1 >"%tmp%%~n0.vbs" & "%tmp%%~n0.vbs" & del /q "%tmp%%~n0.vbs" & goto :eof
)
Posted by: Guest on October-16-2020

Code answers related to "run command as administrator in cmd"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language