Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 down vote accepted

Eureka!

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.