Or you can create a registry file with contents like this :
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"YourProgramName"="YourProgramPath"
For Example :
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"IpMessenger"="C:\\Proggies\\ipmsg.exe"
Notice there are double slashes in program path. You can save this file as say AddProggy.reg . Whenever the user runs this file, an autorun entry will be created if its not present already.
^^ Hansraj's method is good though it involves copying the exe file to the Startup folder which could create problem if the program needs dependency files to be present in the folder it runs from.