Link to home
Start Free TrialLog in
Avatar of raed
raed

asked on

Run app on windows startup

i want to run my VB .exe app. on windows startup what i want is not the startup folder or the run/load comand in win.ini , i don't want the user to be able to remove the app from the startup or win.ini, and each time windows start i want to run the app.


thanx

raed
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

Add new key in
HKEY_CLASSES_ROOT\Software\Microsoft\Windows\CurrentVersion\Run

and set its value to your application path

GOOD LUCK
Avatar of Ryan Chong
and you can find some useful resources at:
http://www.vbcode.com/asp/code.asp?lstCategory=Registry
and it should be at HKEY_LOCAL_MACHINE in registry
ASKER CERTIFIED SOLUTION
Avatar of profya
profya
Flag of Sudan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How about if you run it as an NT service?
To improve my previous answer replace the last lines with the folowing:
If GetKeyValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "MyApp") <> ApplicationPath
Then
   UpdateKey HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "MyApp", "ApplicationPath"
End If
where the "ApplicationPath" is the current path of your application.

Avatar of Netminder
Netminder

raed,

Some of these questions have been open for some time, and records indicate you logged in as recently as this week. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days.

https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20261025
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20253068
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193883
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193880
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193879
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193268
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20174535
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20137815
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20130736

Thanks,

Netminder
Community Support Moderator
Experts Exchange