• 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
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
Another option is Adding an Entry into the Registry


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

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
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

Creating a Windows Service in VB.NET - Introduction

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.
Sony-ControlledAuthor Commented:
no there is no gui
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.

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