Fix Run as Administrator Grayed Out: 6 Ways
In this article
When the "Run as administrator" option is grayed out in Windows, it usually means the shortcut, app, or file is blocked by User Account Control (UAC) settings, a group policy, or the file itself is not an executable. The fix is to unblock the file, adjust the shortcut's compatibility settings, or edit the registry to restore the option. Below are step-by-step methods that work on Windows 10 and Windows 11.
What You'll Need
- Administrator-level access to the PC (you must be able to log in with an admin account).
- For registry edits, a backup of the registry is recommended (File > Export in Registry Editor).
- For some fixes, you may need to temporarily disable third-party antivirus or security software (do this only if you trust the file).
Step-by-Step
- Unblock the file – Right-click the file or shortcut, select Properties. In the General tab, look for a Security section at the bottom. If there is a checkbox labeled Unblock, check it and click Apply then OK. This removes the "Mark of the Web" that Windows adds to files downloaded from the internet, which can cause the option to be grayed out.
- Check the shortcut's target – If the grayed-out option appears on a shortcut, right-click the shortcut and choose Properties. In the Shortcut tab, click Open File Location. Then right-click the actual executable file (the .exe) and see if "Run as administrator" is available there. If it is, the shortcut itself may be corrupt. Create a new shortcut by right-clicking the .exe, choosing Send to > Desktop (create shortcut), and use that new shortcut.
- Enable the option via the Compatibility tab – Right-click the executable or shortcut, select Properties, go to the Compatibility tab. Check the box Run this program as an administrator under Settings. Click Apply and OK. This forces the program to run elevated even if the context menu option is grayed out. Note: This only works for executables, not for shortcuts to MSI or other non-exe files.
- Adjust UAC settings – If the option is grayed out for all apps, UAC might be set to "Never notify." Press Windows + R, type
msconfig, press Enter. Go to the Tools tab, select Change UAC Settings, and click Launch. Move the slider up to at least the second notch (default). Click OK and restart. After that, "Run as administrator" should appear again. - Edit the registry (for all users or specific file types) – Press Windows + R, type
regedit, press Enter. Navigate toHKEY_CLASSES_ROOT\*\shell\runas. If therunaskey is missing, right-click onshell, select New > Key, name itrunas. Then right-click on the newrunaskey, select New > Key, name itcommand. Double-click the (Default) value in thecommandkey and set its data to:"%1" %*. Click OK. This adds a "Run as administrator" option to all files, but be careful – it may appear on non-executable files too. To limit it to executables only, use the keyHKEY_CLASSES_ROOT\exefile\shell\runasinstead. Always export the registry before making changes. - Check Group Policy (Windows Pro/Enterprise only) – Press Windows + R, type
gpedit.msc, press Enter. Navigate to Computer Configuration > Administrative Templates > Windows Components > File Explorer. Look for a policy named "Remove Run as administrator from File Explorer". If it is set to Enabled, double-click it, set it to Not Configured or Disabled, then click OK. Restart the PC. This policy is not present on Windows Home editions.
Common Mistakes
- Editing the wrong registry key – Using
HKEY_CLASSES_ROOT\*\shell\runasadds the option to all files, which can clutter the context menu. Use theexefilekey for executables only. - Forgetting to restart after UAC change – The UAC slider change doesn't take effect until you restart the PC.
- Assuming all files can run as administrator – Only executables (.exe), batch files (.bat), and certain scripts can be run elevated. Files like .txt or .jpg will never have that option.
- Modifying the registry without a backup – A wrong edit can break context menus. Always export the key before changing it.
Tips
- If you need to run a program as administrator frequently, use the Compatibility tab method (step 3) instead of right-clicking every time.
- For shortcuts, you can also set the "Run as administrator" property in the shortcut's Advanced button (in the Shortcut tab). Click Advanced, check Run as administrator.
- If the option is grayed out for a specific app, try running it from its installation folder directly (e.g.,
C:\Program Files\AppName\app.exe) instead of a shortcut. - Keep your Windows updated – some context menu glitches are fixed in cumulative updates.
Troubleshooting
If the above steps don't work, try these in order:
- Restart Windows Explorer – Open Task Manager (Ctrl+Shift+Esc), find Windows Explorer, right-click it, and choose Restart. This refreshes the context menu.
- Check if the file is on a network drive or cloud-synced – Files on OneDrive or SharePoint may have extra security. Right-click the file, select Properties, and see if there's a Security tab with an Unblock button. If not, copy the file to your local Desktop and try again.
- Run a system file checker – Open Command Prompt as administrator (if you can), type
sfc /scannowand press Enter. This repairs corrupted system files that might affect context menus. - Create a new user account – If the issue persists only for your user profile, create a new administrator account and test. If it works there, your user profile is corrupted.
- Check for third-party context menu managers – Tools like CCleaner or ShellExView can disable context menu entries. Temporarily disable any such tool to see if it's blocking the option.
- Reset the registry key – If you edited the registry and it didn't help, delete the
runaskey you created (after exporting it) and restart. Then re-add it with the correct path.
Frequently Asked Questions
Why is "Run as administrator" grayed out for a .bat file?
Batch files (.bat) can be run as administrator, but the context menu option might be grayed out if the file is on a network share or if UAC is set to never notify. Try copying it to your desktop and unblocking it via Properties.
Does the Compatibility tab method work for all programs?
No, it only works for executable files (.exe). For scripts like .ps1 or .cmd, you'll need to run them from an elevated Command Prompt or PowerShell.
Will editing the registry harm my PC?
If you follow the steps correctly and export a backup, it's safe. However, a wrong key can cause context menu issues. Always create a restore point before making registry changes.
Can I fix this without admin rights?
No, changing UAC settings or registry requires administrator privileges. If you're on a work or school computer, contact your IT administrator.
Why does the option appear for some apps but not others?
Apps that are installed per-user (in AppData) may not show the option if they don't have a manifest requesting elevation. The option appears only for apps that are designed to run elevated or are blocked by UAC.
After following the steps, the option is still grayed out. What next?
Try a clean boot (disable all startup items) to rule out third-party interference. If that fails, use System Restore to revert to a point before the issue started.