How to run application automatically when Windows starts?

Posted on

QUESTION :

I have a console application written in VB.Net. All I want is it to run automatically when the computer starts.

ANSWER :

Create an entry in registry under

HKLMSoftwareMicrosoftWindowsCurrentVersionRun
  1. Start regedit.exe
  2. Navigate to HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRun
  3. Create a new string value and give it tha title you please (it’s just for you, to rememeber what is it)
  4. Set the value to the full path (and params) of the EXE you want to run.

You can just simply add it to the Startup folder in the Start Menu in Windows and it will startup with the computer.

I would set it up in the task scheduler, run the scheduler from control panel / administrative tools, create a new task and set the trigger to “When the computer starts”.

Or you can do it in your setup program, or write some code using Microsoft.Win32.TaskScheduler.dll that is run within the setup program.

The simplest way to achieve this would be to convert your console application into a Windows Service.

However, you could look at the Scheduled Tasks and see if there is an option to start the application when the computer starts.

Leave a Reply

Your email address will not be published.