How do you normally open an elevated command prompt window? In Windows 10/8/7 you right-click on Command Prompt and select Run as administrator. In Windows 10/8, you use the Win+X menu and select Command Prompt (Admin). But did you know that you can also open an elevated instance of Command Prompt using a normal CMD?
Open an elevated command prompt using CMD
Now, this is a geek tip! If you need to open an elevated command prompt USING the default ‘regular’ command prompt, you can do so by typing in the following command and hitting Enter:
runas /netonly /user:ack-pc\ack cmd
Replace ack with your admin user name.
That’s all you need to do. You will find that a Command Prompt (Admin) window opens.
TIP: You can also Run Commands from Windows Start Search Box as an Administrator.
Do share if you know of any more such geeky tips!
Even better : Make a file called “sudo.bat” in a path folder containing the following:
@runas /netonly /user:[computer]\[admin-username] %1 %2 %3 %4 %5 %6 %7 %8 %9
Replace [computer] with the computer name and [admin-username] with your admin user name. :-)
Can any one explain me the user of /netonly switch? In which scenario this is useful?
Thank you.
Btw, you could just use %* to accept all parameters instead of doing it one by one.
“runas” is not recognized as an internal or external command” hmmmmmmm
i want to add an administrator to the system and only have normal rights
Only an admin can add an admin user.
so said microsoft hahaha