Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to optimize my day here, making do with IIS...

When executing IISRESET from the Run dialog or from cmd.exe, I get an access denied error. So executing IISRESET gets annoying - involving both mouse and keyboard:

  1. Start -> Run -> cmd (right-click, Run as Administrator)
  2. Agree to the UAC dialog
  3. Type iisreset, hit enter

I'm looking to be able to run IISRESET as quickly as possible. Ideally I could just go Start -> Run -> iisreset -> Enter, and the UAC prompt would pop up. I tried to enable "Run this program as an Administrator" but it was greyed out, even when I opened the properties dialog as NT AUTHORITY\SYSTEM.

Thinking of making a Visual Studio macro and a toolbar button; anyone got any other ideas?

share|improve this question
up vote 4 down vote accepted


Add this string value to the registry, without the quotes:

HKEY_CURRENT_USERS\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers "c:\windows\system32\iisreset.exe" = "RUNASADMIN"

Interestingly the same key is ignored if it's under HKEY_LOCAL_MACHINE. Looks to me like a security flaw...

share|improve this answer
The same trick can be done for explorer.exe which will give you admin access to your entire system! Fun.. – Chris Adams Dec 7 '12 at 3:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .