Created
November 1, 2022 21:13
-
-
Save kbandla/efec3804e95b5fdda3e43db1eb386963 to your computer and use it in GitHub Desktop.
Command line scripts for Windows
This file contains hidden or 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
msiexec /a %1 /qb TARGETDIR=%2 |
This file contains hidden or 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