UAC (User Account Control) is a security feature in Windows designed to prevent unauthorized changes to the system. It prompts users when a program requires administrative privileges, ensuring that only approved applications can modify system settings. However, not all programs that request admin access truly need it. Some applications might trigger the UAC prompt unnecessarily, despite functioning perfectly fine without elevated permissions.
If you’ve encountered a scenario where a program requests administrative access but doesn’t actually require it, you can use a simple trick to bypass the UAC prompt. This is done using the runasinvoker compatibility layer. In this blog post, we’ll explore how to do this using a batch file and a direct command in the Command Prompt.

How to Bypass UAC Using a Batch File
One of the simplest ways to bypass UAC for a program that doesn’t genuinely require admin privileges is by using a batch script. Follow these steps:
Step 1: Create a Batch File
- Open Notepad.
- Copy and paste the following code:
cmd /min /C "set __COMPAT_LAYER=runasinvoker && start "" "%1" - Save the file as bypass.bat (make sure to select “All Files” in the “Save as type” dropdown).
Step 2: Using the Batch File
To run a program without triggering UAC:
- Simply drag and drop the program’s
.exefile ontobypass.bat. - The program should launch without requesting admin permission.
Bypassing UAC via Command Prompt
If you prefer not to use a batch file, you can achieve the same effect directly from the Command Prompt:
- Open Command Prompt (cmd.exe) without admin privileges.
- Run the following command:
set __COMPAT_LAYER=runasinvoker start example.exeReplaceexample.exewith the actual program’s name.
How Does This Work?
Windows provides a hidden compatibility layer called runasinvoker, which forces the application to run with the same privileges as the current user instead of requesting elevated permissions. By setting __COMPAT_LAYER=runasinvoker, we instruct Windows to ignore any UAC request associated with the program.
set __COMPAT_LAYER=runasinvoker→ Applies the compatibility setting.start example.exe→ Launches the program under these modified conditions.
Limitations of This Method
While this trick can be useful, it does have its limitations:
- Only Works on Non-Essential Programs
- This method won’t work for programs that truly require admin access to function (e.g., system utilities like Registry Editor, disk partitioning tools, or software installers).
- If an application requires elevated privileges to modify system files, it will likely fail to execute properly.
- No Effect on Programs Manually Run as Administrator
- If the program’s manifest is set to always request admin privileges, this method won’t override it.
- Does Not Work on Signed System Applications
- If an application is part of Windows’ protected system programs, this trick won’t bypass UAC.
- Limited Use in Enterprise Environments
- Some corporate environments have Group Policies in place that disable compatibility layers, preventing this trick from working.
Final Thoughts
This UAC bypass method is not a security vulnerability—it merely takes advantage of Windows’ built-in compatibility layers to force an application to run at the same privilege level as the current user. It is not useful for bypassing restrictions on truly protected system files but can be handy when dealing with software that incorrectly requests admin rights even though it doesn’t actually need them.
If you’re frequently annoyed by unnecessary UAC prompts for harmless applications, this trick might save you time and effort. However, be cautious—always verify what you’re running before bypassing security mechanisms.
Let me know if you found this useful, or if you have any questions about Windows security tricks! 🚀
