How do you run a command as an administrator from the Windows shell? - Stack Overflow

How do you run a command as an administrator from the Windows shell? - Stack Overflow

瀏覽:412
日期:2026-04-24
All you have to do is use the runas command to run your program as Administrator (with a caveat). runas /user:Administrator "cmdName parameters" In my case, this was runas /user:Administator "cmd.exe /C %CD%\installer.cmd %CD%" Note that you must use ...看更多