Always Run as Administrator

There are lots of reasons why you might need to run an application as administrator. Visual Studio, for example, needs admin privileges to do things like run a project using IIS or launch the Azure Compute Emulator. If you use these tools daily, manually running as Administrator gets tiresome. The straightforward way to automate this is to check the “Run as Administrator” checkbox on a shortcut, but that checkbox doesn’t get used if you’re opening files directly.

Luckily, there’s a not-so-obvious way to perma-enable running as administrator for an executable.

  1. Navigate to the file in Explorer
  2. Right-click the program and choose Troubleshoot Compatibility
    1 troubleshoot-compatibility
  3. A dialog will display that says it’s detecting issues
    2 detecting-issues
  4. When prompted, select the option to Troubleshoot program

    3 troubleshoot-program
  5. Check the box next to The program requires additional permissions
    4 requires-additional-permissions
  6. The next screen tells you that the UAC setting “Run as administrator” has been applied; click Test the program… to launch the application to verify
    5 test-the-program
  7. You can verify that the application is running as administrator because “(Administrator)” will be added to the title bar
    6 running-as-administrator
  8. The troubleshooter will ask you to verify that the problem was fixed; select Yes, save these settings for this program
    7 is-the-problem-fixed
  9. Finally, you’ll be displayed a summary indicating that the “problem” has been fixed, and you can close the troubleshooter
    8 troubleshooting-completed

And–voila!–your application will now launch as administrator regardless of how its started, whether it be through a shortcut to the .exe or by double-clicking a file for which it’s the default program.

Advertisement

Author: Adam Prescott

I'm enthusiastic and passionate about creating intuitive, great-looking software. I strive to find the simplest solutions to complex problems, and I embrace agile principles and test-driven development.

One thought on “Always Run as Administrator”

Leave a comment

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: