Created
June 16, 2023 11:57
-
-
Save kbandla/d315e26173840fe141df6583dba51a2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: https://superuser.com/questions/171917/force-a-program-to-run-without-administrator-privileges-or-uac | |
:: @kbandla | |
@echo off | |
IF "%1%"=="" ( | |
echo [!] Error: Need full path to the program. Aborting. | |
) else ( | |
echo [*] Copied AppData path to clipboard | |
echo %LOCALAPPDATA% | clip | |
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment