RunAs with remote management tools that require Run as Administrator on Windows 7

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:

  1. Open an Administrator command prompt
  2. Type:
    runas /user:<domain>\<username> /netonly <command>

For example:

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”.

This entry was posted in Windows and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.