Click here to Skip to main content
14,084,762 members
Click here to Skip to main content
Add your own
alternative version


15 bookmarked
Posted 11 Jul 2014
Licenced CPOL

Run Windows 8 Applications as Administrator by Default

, 11 Jul 2014
Rate this:
Please Sign up or sign in to vote.
Run Windows 8 Applications as Administrator by Default


Are you tired of opening a command prompt while in a user account with Administrator privileges, and then running your command only to have it deny you access to it? Are you tired of other security warnings and disabilities when you are already the Administrator?

Well then this tutorial is for you. It is a simple and effective method to bypass the overprotective operating system.


The workaround to solve the problem cause by another respectfulness from Microsoft towards its customers, is a small registry hack. All you need to do, is to add your application's full path to the following path in Registry under Current User key:

Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

For people who don't like to tweak their computer's registery directly, I created a simple tool which does the same trick for them.






I noticed some fellas suggest disabling UAC as an approach. Please note that disabling UAC will break all Metro Store app.

Using the code

Here is what we do in code

 var key = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers");
if (key != null)
     var existingValue = key.GetValue("Full Application Path");
     if (existingValue == null)
          key.SetValue("Full Application Path", "^ RUNASADMIN", RegistryValueKind.String);


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
Australia Australia
MCTS: ASP.NET Applications
MCTS: ADO.NET Applications
MCTS: Windows Forms Applications
MCTS: Windows Communication Foundation Applications
MCPD: Enterprise Application Developer

You may also be interested in...


Comments and Discussions

GeneralThoughts Pin
PIEBALDconsult15-Jul-14 5:38
protectorPIEBALDconsult15-Jul-14 5:38 
GeneralMy vote of 5 Pin
johannesnestler13-Jul-14 23:11
memberjohannesnestler13-Jul-14 23:11 
GeneralMy vote of 5 Pin
Carsten V2.012-Jul-14 0:20
memberCarsten V2.012-Jul-14 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.190518.1 | Last Updated 11 Jul 2014
Article Copyright 2014 by ALLEXY
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid