I’m talking about stuff like Registry Editor, Citrix Delivery Services Console (from XenApp 6.0). Something you might wish to run with an account that gives you administrator rights on a remote system but for whatever reason has been written such that it also needs to “run as administrator” (i.e. right click and choose Run as Administrator, or Shift-Ctrl-click the shortcut) on the machine where it’s executing.
This is fair enough in the case of Regedit as it always shows you the local registry, but is very annoying in the case of the Delivery Services Console.
The solution is:
- Open an Administrator command prompt
runas /user:<domain>\<username> /netonly <command>
runas /user:rcmtech\rcmadmin /netonly regedit.exe
If you don’t use /netonly then you get the following error:
Attempting to start regedit.exe as user "rcmtech\rcmadmin" ... RUNAS ERROR: Unable to run - regedit.exe 740: The requested operation requires elevation.
The /netonly switch help text says “use if the credentials specified are for remote access only”.