Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to Disable UAC Prompt for Specific Applications in Windows 10?

October 30, 2019 Windows 10Windows 7

How to Disable UAC Prompt for Specific Applications in Windows 10?

In this article, we will show how to selectively disable UAC for a specific application without disabling User Account Control service completely. Consider several ways to turn off UAC for one app using the RunAsInvoker compatibility flag.

User Account Control asks the user to confirm any action that requires administrator privileges. This is a fairly effective mechanism for protecting Windows from a number of threats (viruses, trojans, worms, rootkits, etc.). Some users find the popping up UAC windows annoying, and they prefer to disable this security feature, although Microsoft and security experts strongly recommend not doing this.

The RunAsInvoker flag allows you to run the application with a marker inherited from the parent process. This cancels the processing of the application manifest, and the discovery of the installer processes. This parameter doesn’t provide administrator privileges, but only bypasses UAC prompt.

As an example, we will disable the User Account Control prompt for the registry editor (regedit.exe). Despite the fact that my account has local administrator privileges, when I run the utility, a UAC request still appears to confirm the launch.

uac prompt

If the program requires administrator permissions since it changes the system settings or files, the user privileges in the application won’t elevate after disabling UAC. The program will still run under current user permissions, and if you do not have the authority to make these changes, the program won’t be able to make them. There are also a small number of applications that run only in “As an administrator” mode, ignoring the RunAsInvoker compatibility flag.

Contents:
  • Disabling UAC for a program using the Application Compatibility Toolkit
  • Enable the RunAsInvoker App Flag via the Registry
  • Batch file to Run the Application in the RunAsInvoker Mode

Disabling UAC for a program using the Application Compatibility Toolkit

We need to install the Application Compatibility Toolkit, which is part of the Windows ADK. Download the latest version of the Windows ADK for Windows 10 here.

Run the adksetup.exe file and during installation (the program needs Internet access), select only the Application Compatibility Tools item.

Microsoft Application Compatibility Tools is a free set of tools to fix app compatibility issues when migrating to the new Windows versions.

install Application Compatibility Tools on windows 10

There are two versions of Application Compatibility Administrator in the system – 32-bit and 64-bit. Run the version of Application Compatibility Administrator depending on the application bitness for which you want to disable the UAC request.

run Application Compatibility Administrator - 32-bit on windows 10

Run the Compatibility Administrator (32-bit) with administrator privileges (!). In the Custom Databases node, right click New Database and select Create New -> Application Fix.

create application fix

In the following window, enter the name of the application (regedit), the vendor name (Microsoft) and the path to the executable file (C:\Windows\System32\regedit.exe).

select executable to be fixed

Skip the next window (Compatibility Mode) of the configuration wizard by pressing Next. In the Compatibility Fixes window, check the option RunAsInvoker.

You can make sure that the application can run without UAC by pressing the Test Run button.

RunAsInvoker option

In the Matching Information dialog, you can specify which application parameters should be checked (version, checksum, size, etc.). I left the COMPANY_NAME, PRODUCT_NAME and ORIGINAL_FILENAME options checked to avoid the recreation of the compatibility patch file after the next Windows 10 update.

executable file Matching Information

Tip. To protect against the spoofing of the executable by a hacker, you can request additional checks when running the file (e. g., CHECKSUM, FILE_VERSION or FILE_SIZE verification, etc.). It should be noted that the additional checks will slow down the app startup. 

Click Finish and specify the name of the file the compatibility fixing package has to be saved to, e. g., regedit.sdb. This file will contain instructions for starting the application with the specified compatibility options.

save appliaction compatibility fix to the sdb file

Now you only have to apply the compatibility fix package to our application. You can do it either from the Compatibility Administrator console (choosing Install in the menu) or from the command prompt.

intall compatibility sdb file

To do it, run elevated command prompt and execute the following command:

sdbinst -q c:\ps\regedit.sdb

If you have done it right, a message of successful package installation appears.

Installation of regedit complete.

install sdb file with sdbisnt tool

After the package has been installed, the corresponding record will appear in the list of the installed Windows programs (Programs and Features).

sdb app in the Programs and Features on Windows 10

Try now to run the application in a user session without local administrator permissions. Now it should start without a UAC request.

Now check the privileges for running application. Run the Task Manager, go to the Process tab, add the “Elevated” column. Make sure that the regedit.exe process is started from the user in the unprivileged mode (Elevated = No).

non elevated regedit process in user context

In this registry editor process, the user can only edit his own registry keys and parameters. But if you try to edit/create something in the system HKLM key, an error appears: “You don’t have the requisite permissions”.

You don’t have the requisite permissions

Later this compatibility fix can be distributed to all user computers using the Group Policies. Thus you can disable UAC checks for the specific applications on multiple computers in an Active Directory domain.

To remove the compatibility fix, run the command:

sdbinst –u c:\ps\regedit.sdb

Enable the RunAsInvoker App Flag via the Registry

You can enable the RUNASINVOKER compatibility flag in Windows 10/8.1/7 through the registry. The application compatibility flag can be set for a single or for all computer users.

For example, for regedit app you need to create a new registry parameter (REG_SZ) in the following registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers:

  • Value name: C:\windows\regedit.exe
  • Value data: RunAsInvoker

RunAsInvoker app parameter via the registry

If you want to enable application compatibility mode for all local computer users, you need to create this parameter in the different registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers.

In the domain, you can import/deploy these registry settings to users through a GPO.

Batch file to Run the Application in the RunAsInvoker Mode

There is another way to run the program without admin privileges and bypassing the UAC prompt (see the article).

Just create a .bat file with the following code:

Set ApplicationPath="C:\windows\regedit.exe"
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %ApplicationPath%"

bat file to bypass uac prompt

When this bat file is being run under a common user, the specified application will start without a UAC prompt.

So, we looked at how to disable UAC for a specific program without completely disabling User Account Control. This will allow you to run Windows programs under non-admin without a UAC prompt and without entering an administrator password.

39 comments
11
Facebook Twitter Google + Pinterest
previous post
How to View and Parse WindowsUpdate.log on Windows 10 / Windows Server 2016?
next post
SQL Server Install Error: Could Not Find the Database Engine Startup handle

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

39 comments

LEBLOND March 12, 2015 - 10:41 pm

Great. Thanks

Reply
Noxedwin September 1, 2020 - 7:42 pm

Heck yeah. Massively helpful. For some reason, certain Steam games dog-whistle the UAC prompt. I don’t want to have to tell the computer that – yes – I would like to play Phantasy Star Online 2 after saying that I would like to play it.

Many thanks!

Reply
Paul April 28, 2016 - 3:39 pm

Hi, I went through the steps, but it still prompted me with a UAC when i tried to open regedit. You’re supposed to open it like you normally would, correct?
Thanks,
Paul

Reply
Vandrey Trindade July 19, 2018 - 7:23 pm

Yeah, I tried it right now with a Windows 10 1709 build and using both 32 and 64 bits version of the Compatibility Administrator. Control panel shows regedit there but it keeps showing UAC.
The file on Windows 10 is in C:\Windows\regedit.exe

This doesn’t work on Windows 10?

Reply
admin July 24, 2018 - 6:48 am

You can try to run regedit.exe without showing UAC using this bat file:
startwithoutUAC.bat
Set AppPath=”C:\Windows\regedit.exe””
cmd /min /C “set __COMPAT_LAYER=RunAsAdmin && start “”%AppPath%”

Reply
Vandrey Trindade July 24, 2018 - 11:56 am

Thanks, the way I’ve managed to make it work was using the command line below:
cmd /min /C “set __COMPAT_LAYER=RuAsAdmin && start C:\Windows\Regedit”

Reply
Eli October 3, 2019 - 8:47 pm

I have tried all this for VS Code (instead of Regedit). The bat file just opens the program regularly and not as admin. Is this something more to do for programs other than Regedit?

Reply
Vandrey Trindade October 7, 2019 - 4:50 pm

Eli,
I believe that this will only work for programs that trigger UAC, VS Code can run without administrator rights.
If you want VS Code to run always as admin, you have to configure the shortcut.

Eli October 8, 2019 - 12:26 am

The prompt comes up for VS Code and any program I need to run Admin on for as far as I can tell. I didn’t want to turn UAC all together for security reasons, so thought this would allow selective turning off. Thanks for trying to assist Vandrey.

I’ve decided to switch to Linux and get away from all of Window’s problems. Don’t think I’ll ever look back 🙂

Vandrey Trindade October 8, 2019 - 12:04 pm

Eli,
As far as I know, there are different installs of Visual Studio Code, check on their website.
And you are free to switch to Linux whenever you want, but take a look at the news that Catalina is bringing UAC to macOS too.
It’s a great security feature from Microsoft and it won’t be a surprise if Linux gets something like that.

Pedro March 22, 2022 - 10:53 pm

I am having same issue

Reply
Aleksandr February 10, 2019 - 3:50 am

Try: set __COMPAT_LAYER=RunAsInvoker

Reply
Louie March 25, 2019 - 7:15 pm

Let me ask you something about this. I have been trying to figure this out for a while. Close to almost 1 month hitting my head at my desk. I have a certain program we run on all workstation. Once in a while, we get an update from our vendor to update it. We download the .msi or exe file and place it in a shared folder that everyone has access too. When the user opens the file it checks that folder and see’s there’s an update. it tried to install the update but the UAC comes up. Since the users are just standard users we have to enter our username/password. I notice towards the bottom you talked about GPO in a domain and pushing this out. How does that work and do you have any documentation on how to set this up?

I need to bypass the UAC on this program. Maybe adding other software to the database too. Any kind of help would be awesome.

Reply
admin March 27, 2019 - 8:12 am

As far as I understand, in your case some app trying to install an update on users’ computers. Obviously, without administrator permissions, it is not installed at all.
I think it’s easier for you to install this update through installing a GPO software / SCCM / GPO startup script or something similar.

Reply
Dan Henderson June 4, 2019 - 6:09 am

Works great for me using the ADK on Win 10 1803. Delighted to be able to stop those popups!

Reply
Steve Dells July 17, 2019 - 3:03 pm

There has got to be a simple program out that will do this in 2 to 3 steps…this is crazy and complicated. A program you enter the file path to, boom….done. Anything? I’ve tried this using instructions above and not working in Win 10 v1903
Trying to use the program called “Everything” search program, 64 bit portable, without the UAC prompt coming up every time. I prefer it to MS search.
Got to be an easier way, I’m uninstalling the dang Windows Compatibility Manager. Too bloated and complicated for allowing this little program to run.

Reply
Michael A April 29, 2021 - 2:46 pm

There is an easier way by using a batch file like this example:

set __COMPAT_LAYER=RunAsInvoker
start regedit.exe

Reply
Sir Toto June 6, 2020 - 10:11 pm

I’m using GiMeSpace QuickMenu Version 2.0.3.18 (freeware available on Cnet). I’m running it as admin with the Windows Task Scheduler at startup. You can add programs in a menu that launches with a click/key you choose. Any program launched through it will run with admin right without UAC prompt on Windows 10 1909 x64.
You just have to run it normally to add programs in it, you can’t do it when it’s running as admin (bug?).
You may try more recent versions which are designed for very high screen resolutions. The one I tried was buggy on my system.

I suppose same thing can be done with shorcut managers or other kinds of program managers running with admin rights. It’s easy to configure them to run with admin rights at startup with the Task Scheduler.

Reply
Sir Toto June 7, 2020 - 12:24 am

My mistake: by “shortcut managers”, I meant Keyboard Hotkeys (Shortcuts) Managers. And it works fine with them also. You just have to configure a hotkey to run the program you want, and launch the manager on connection to user session with highest privileges through the Task Scheduler.
Here are some programs you can use: Clavier+ (UtilFr), Keyboard Shortcuts Manager (Softpedia), HotkeyP, and a bunch of others that are listed on TheWindowsClub, for instance.

Reply
thingzero August 12, 2020 - 6:37 pm

Just tried getting a single application that’s been bugging me for months, on top of other apps that I use frequently, didn’t work. Spent over an hour going through this entire walk-through which I am grateful, but couldn’t get it to work at the installation of the .sdb part at command line. I didn’t see the installation complete dialog and when I tried to run the app, it says I need admin rights in order to run it when I’m the admin running admin privileges. I’m running the latest Windows 10 Pro 64bit 2004, MSDN build which I just downloaded and installed last night.

Anyways, I have the same gripe like most users, I don’t understand why MS can’t have an option that disables the UAC dialog box from appearing everytime startup launches my app, and every other app. Jumping through all these “fixes” just to find out hours later that it doesn’t work for me. Can’t believe there’s no easier way than this or the taskscheduler method, just pisses me off daily…

But thanks to the author for your time and effort in contributing this “fix” for the community, even though it didn’t work out for me. Thanks again.

Reply
Noxedwin September 1, 2020 - 7:43 pm

Heck yeah. Massively helpful. For some reason, certain Steam games dog-whistle the UAC prompt. I don’t want to have to tell the computer that – yes – I would like to play Phantasy Star Online 2 after saying that I would like to play it.

Many thanks!

(Sorry. The layout of the comments is a bit ambiguous. I didn’t notice that the “Leave a Comment” form was at the bottom. I thought the “Reply” button *was* to leave a comment.)

Reply
Douglas October 7, 2020 - 10:25 pm

Trying to use this, the applications I want to bypass UAC on runs fine in the Test Runs inside the application, but refuse to open outside of it. I have 3 applications these settings are applied to stored in one database, surely that’s not the issue. Installation of the database says it’s successful, but running the app brings up a text box titled ‘Fatal Error’ and the body contains ‘Failed to execute game’. No further details are presented.

Reply
Douglas October 7, 2020 - 10:32 pm

After some poking around, apparently I can’t run the applications in question in administrator mode if I want them to run at all. A very peculiar issue, not sure why that would cause any problems.

Reply
Fixing Cool Edit “Trial Version” and “This system has not been configured correctly” | Ray Woodcock's Latest October 11, 2020 - 3:35 am

[…] when I started Cool Edit. So my question was whether I could exclude ceregkey.exe from UAC. WindowsOSHub seemed to say that I could use the registry tweak summarized in this .reg […]

Reply
Danny November 12, 2020 - 2:39 am

If I make this .reg, can I port it to another computer without installing the windows tool?

Reply
Rowenn November 20, 2020 - 9:43 am

Thank you! For some reason my Adobe Illustrator and Premiere Pro kept asking for UAC despite of always removing the Run-As in the advanced options of each app, I’ve been looking for everywhere and got no fix until I found this.

Thank you very much!

Reply
KNBD December 6, 2020 - 12:18 pm

Thanks for this. I had a licensed copy of Microsoft Money 2005 (the last version of Money that Microsoft provided) and it had the annoying launch question. Your fix worked and has made my life much pleasanter. For other Money users, please note: After I had followed through the recommended procedure, I still had to go into the Registry, find the MsMoney AppCompatFlags>Layers entry for Money and manually change the entry to “RunAsInvoker” as discussed. Only then did MsMoney work without the “Do you want to allow this App to make changes to your device?” warning. With the Registry change made, Money works as you’d typically expect.

Reply
Mark December 30, 2020 - 3:26 am

Great guide thank you!

Reply
Jack Maynard April 16, 2021 - 11:04 pm

Thank you all for the guide. I have been searching for awhile now on how to do this. This one was flawless!

Reply
Adam July 21, 2021 - 6:40 am

This fix worked perfectly for me too. Thanks!!

Reply
Gabriel August 30, 2021 - 11:55 am

Just a word about the last resort (batch file) thing, it WILL work but you will probably (as far as I can guess) get security denials when trying to edit/add/delete certain keys or values whilst running regedit.exe, or access certain locations from within the program. It might even make some programs crash depending on the type of access they need to system resources. I assume with minimalist programs that run in a way that does not require special privileges, they most likely will run ok (might affect where you can save though!)

Reply
laika December 10, 2021 - 2:41 am

No joy here.
I’m doing this for dragon center. C:\Program Files (x86)\MSI\Dragon Center. It works fine from the compatibility administration. Then I create the entry at HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Value name: C:\Program Files (x86)\MSI\Dragon Center\Dragon Center.exe
Value data: RunAsInvoker

But when it starts with the system, or if I execute it manually, the UAC still appears

Reply
equinoxx ‍ February 28, 2022 - 4:17 am

About Windows ADK:
If you want to bypass UAC for something, you shouldn’t have to install an application that requires UAC anyway. Why even bother?

Reply
Michael A February 28, 2022 - 3:46 pm

It can be a useful as a troubleshooting step or for simulating lower permissions in application development

Reply
equinoxx ‍ February 28, 2022 - 4:27 am

Also, the other options don’t work anyway. load of BS.

Reply
Pedro March 23, 2022 - 1:23 am

When running the test on the compatibility administrtator UAC does not prompt but…… when install and run from the executable UCM still showed. 🙁 any help will be appreciated.

Reply
XMuli August 18, 2022 - 2:18 am

This method is not valid for win10 21H2. But I found another method that still works with the latest Win10

[Use the finished product directly] https://github.com/XIU2/UACWhitelistTool
[principle or manual execution] https://zhuanlan.zhihu.com/p/113767050

PS: but it’s in Chinese, but it’s easy to use

Reply
Michael September 7, 2022 - 4:10 pm

Sweet, just what I needed for “Clover” Explorer Extension.

Reply
Warske November 12, 2022 - 9:51 pm

XMuli said (August 18, 2022): “This method is not valid for win10 21H2.”
But I tried it on my win10 21H2 and it did work (tested on application PowerChute.exe, not regedit).
I installed the ADK for Windows 10, version 1903.
The process worked perfectly until “Click Finish”
It didn’t ask for the package name, and it didn’t create a c:\ps\ folder.
I created a C:\sdb files\ folder and used
File, Save, C:\sdb files\PowerChute
which created the PowerChute.sdb file.
Then
File, Install
which returned: “The database ‘PowerChute’ was successfully installed.”
and no more UAC prompt for PowerChute.

Thanks for this fix!

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
  • Removable USB Flash Drive as Local HDD in Windows 10 / 7
  • How to increase KMS current count (count is insufficient)
  • How to Connect L2TP/IPSec VPN Server From Windows
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • Managing Printers from the Command Prompt in Windows 10 / 8.1
  • Deploy PowerShell Active Directory Module without Installing RSAT
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top