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

link|improve this question
feedback

migrated from stackoverflow.com Sep 23 '11 at 4:10

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 4 down vote accepted

Create an entry in registry under

HKLM\Software\Microsoft\Windows\CurrentVersion\Run
  1. Start regedit.exe
  2. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
  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.
link|improve this answer
feedback

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

link|improve this answer
1  
Simple solutions are often the best :) – Jesus Ramos Sep 22 '11 at 6:21
He probably meant it to be done programmatically. But the question lacks that much detail, more so effort. – Alex R. Sep 22 '11 at 6:22
He didn't really specify, to me it sounds like he just wrote an app that he wants to startup for him on his computer, but I may be wrong. – Jesus Ramos Sep 22 '11 at 6:23
Actually , I want my application to start on its own when the computer is started. – Rajdeep Sep 22 '11 at 6:35
@Rajdeep .... I realize that, what we want to know if it's just for you or for an application you want to deploy.... – Jesus Ramos Sep 22 '11 at 13:04
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.