6

How can I elevate a open cmd window such that it has administrator rights as it would have if i would start it with "run as administrator"?

Mat
  • 171
  • 2
  • 4

2 Answers2

3

You can use the runas command to elevate individual commands, and you can use runas to start a new shell, but you cannot elevate the current shell.

EKW
  • 1,036
  • 8
  • 10
1

I have a hard time believing that this would be possible. Even the example by Microsoft restarts the process to achieve elevation.

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311