views:

77

answers:

3

I have a WinForms application that I want to auto start on login - At the moment it is just a normal standalone 'exe'

Does anyone know how to put this into the startup folder and whether that is reliable (to the extent it will get started)?

+1  A: 

You can put it in startup folder by adding shortcut to the C:\Documents and Settings\< username>\Start Menu\Programs\Startup folder or the startup key in windows registry. It will get started, unless user deletes the shortcut/registry entry. What is reliable for you?

Alex Reitbort
+1  A: 

If you're using the built in Setup Project in Visual-Studio then:

  1. Right click on your solution in Solution Explorer and choose View

  2. Choose File System

  3. Right click under File System on Target Machine and choose Add Special Folder

  4. Choose User's Startup Folder

  5. In the empty right hand panel, right click and choose Create New Shortcut

  6. Select the primary output for your Winforms exe

And you're done.

As Alex Reitbort says, however, it's only as robust as the target user wants it to be. He's free to delete the shortcut in his Startup folder.

hawbsl
A: 
Ram