Weekly quickTIP

Who Stole My RunAs?

It's still there. Here are two approaches to running it.

With Windows Vista comes User Account Control, and with User Account Control comes the right-click context menu item, "Run as Administrator." With UAC enabled, this new menu item enables an executable to be run using your administrator's token. But that's only the case if you're an administrator and want the executable to run under your own account. What if you want to run that EXE under the auspices of another user?

With Vista there are two possibilities. First, it is possible to reconfigure Vista to prompt for credentials rather than elevating them based on your own username. You can do this by configuring a local or Group Policy setting User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode. This setting can be found in Computer Configuration | Windows Settings | Security Settings | Local Policies | Security Options. Setting this to "Prompt for credentials" brings forward an over-the-shoulder prompt that requests credentials when you attempt to elevate, giving you the ability to enter a different set of credentials.

But, let's face it -- setting this for an entire machine or Organization Unit of them using policies is like using a sledgehammer when you really need ... well ... not a sledgehammer.

Another option is available for those one-off times that you need RunAs elevation for a specific EXE. Download the Sysinternals tool ShellRunAs and drop it into your computer's path somewhere (such as C:\Windows\System32) and then run the command:

shellrunas /reg

Doing this adds another menu item to the right-click context menu called Run as a Different User. You can also run shellrunas {programName} from the command prompt to do the same.

About the Author

Greg Shields is Author Evangelist with PluralSight, and is a globally-recognized expert on systems management, virtualization, and cloud technologies. A multiple-year recipient of the Microsoft MVP, VMware vExpert, and Citrix CTP awards, Greg is a contributing editor for Redmond Magazine and Virtualization Review Magazine, and is a frequent speaker at IT conferences worldwide. Reach him on Twitter at @concentratedgreg.

comments powered by Disqus
Most   Popular