• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Making a program run at startup

hello all i am making a program that iw ould like to have run everytime you start your computer how would i go about doint this ? what code to use ..l. please give expmples
0
Sony-Controlled
Asked:
Sony-Controlled
1 Solution
 
Brian CroweDatabase AdministratorCommented:
The easy way is to place a shortcut to your executable in the C:\Documents and Settings\[User]\Start Menu\Programs\Startup directory
0
 
arif_eqbalCommented:
Another option is Adding an Entry into the Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Add your own key under this RUN key and give the path of the EXE to run


0
 
Sony-ControlledAuthor Commented:
so for C:\Documents and Settings\[User]\Start Menu\Programs\Startup directory how excatly whould i get the exe to place a  shortcut there
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Thandava VallepalliCommented:
Go for creating a Windows Service App... its simple to create

here are the articals

Creating a Windows Service in VB.NET
http://www.codeguru.com/vb/gen/vb_system/services/article.php/c4825/

Creating a Windows Service in VB.NET - Introduction
http://www.developerfusion.com/show/3441/


itsvtk
0
 
NetworkArchitekCommented:
Adding the registry entry would be a good solution, though startup isn't bad. I think a "service" is the optimal solution in many cases. The only caveat with the service is, if you go that route you need to think about if your app requires user interaction, ie does it have a gui? If so then you would need a helper app to control the service as a service is not meant to provide user interaction. I think there are some "solutions" to this but are unstable as well as other things. Just a suggestion.
0
 
Sony-ControlledAuthor Commented:
no there is no gui
0
 
NetworkArchitekCommented:
oh, there's no GUI? Then I think the service is the way to go, definitely. It is very simple and those links itsvtk posted explain them, I used them when I first learned.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now