Skip to content

Instantly share code, notes, and snippets.

@kbandla
Created June 16, 2023 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbandla/d315e26173840fe141df6583dba51a2c to your computer and use it in GitHub Desktop.
Save kbandla/d315e26173840fe141df6583dba51a2c to your computer and use it in GitHub Desktop.
:: 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