Argument-List runs the command with arguments. Start-Process is a powershell command that starts a process, in this case, command prompt. Powershell -Command runs a powershell command. Powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/k cd /d %CD% & on If you want the admin command prompt window to stay open when you run the command, change the code in notepad to this: off When you open command prompt, you can now run something like sudo start. Copy this file and paste it at C:\Windows\System32 or add the path where sudo.cmd is to your PATH Environment Variable. Powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% & on
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |