Search code examples
batch-fileregistrystartupuac

how to add an item to registry to run at startup without UAC


i have a program that needs to be started when windows starts. I have created a string value in registry HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\
For this application starts at startup but it shows an UAC prompt. Normally my application does not need UAC promt to start. If i make a shortcut in startup folder then it works perfectly without UAC but the the problem is i need to start it from registry. and sorry that i also cannot use task scheduler. Do anyone have an idea how to do it?


Solution

  • You can always start it for a single user, this command can be run by a normal user, and will enable the application on startup for just that user.

    REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "My App" /t REG_SZ /F /D "C:\MyAppPath\MyApp.exe"
    

    You cannot add something to the local machine run registry key without at some point running something as Administrator.

    Even task scheduler option would require something to run as admin to add the task in.