How do I open a elevated command prompt using command lines on a normal cmd?
For example, I use runas /username:admin cmd
but the cmd that was opened do
According to documentation, the Windows security model...
does not grant administrative privileges at all times. Even administrators run under standard privileges when they perform non-administrative tasks that do not require elevated privileges.
You have the Create this task with administrative privileges option in the Create new task dialog (Task Manager > File > Run new task), but there is no built-in way to effectively elevate privileges using the command line.
However, there are some third party tools (internally relying on Windows APIs) you can use to elevate privileges from the command line:
nircmdc elevate cmd
npm install -g windosu
(requires node.js installed)sudo cmd