tags:

views:

173

answers:

3

i created a small tool in windows application using (.net language C#). i created setup for my tool and also when we click on minimize button it will be in system tray. My requirement is i want to place my tool in start up (start>All Programs>Start up) when i start my system automatically my tool is open this is my requirement please help me thank you.

A: 

Just put the EXE you want to run to the correct startup folder. Username is the logged on user. Run cmd, then type echo %username% to find your username.

Windows Vista

c:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Windows XP/2000

c:\Documents and Settings\[username]\Start Menu\Programs\Startup

Windows NT 4

c:\Winnt\Profiles\[username]\Start Menu\Programs\Startup

Windows 95/98/ME

c:\WINDOWS\Start Menu\Programs\Startup
RossFabricant
I have a small doubt brother Rossfabricant what is the meaning of [username] what i have to write there can u explain me thank u please reply
Surya sasidhar
copy means copy the setup in to the folder reply please
Surya sasidhar
thank u it is working mr.rossfabricant
Surya sasidhar
A: 

The cleaner way is to copy the exe to the following location

Environment.GetFolderPath(System.Environment.SpecialFolder.Startup)

The only reason I recommend using this Method instead of hardcoding the value , is because the paths can change and trying to pre-empt ever every users move is a waste of time.Should just mention that the method above still returns the same folders as the first answer

RC1140
+1  A: 

go to solution explorer and select the setup folder what u created select any file (project setup) and u can see the two splited windows one is Files system on Target Machine right click on empty space u can get 'add special folder >> user's startup Folder' and u can get a folder then right click and add project output thats all.

Surya sasidhar
thank u mr.sasidhr
Surya sasidhar