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

瀏覽:356
日期:2025-10-07
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 ...看更多