Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 509
p2013 Avatar asked Jul 28 '13 13:07

p2013


People also ask

How do I change the startup programs in registry?

To remove startup program, right-click on the parameter name and select “Delete” in the pop-up menu that appears. After that, the program will not start when Windows starts. When you finish, you can close Registry Editor.

What registry key shows startup applications?

The following Registry keys can control automatic startup of services during boot: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices.


1 Answers

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.

like image 74
SmithMart Avatar answered Nov 03 '22 09:11

SmithMart