Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

autostarting application in specific directory

Status
Not open for further replies.

dima2

Programmer
Jan 20, 2002
85
LB
I'm trying to get my application to autostart when windows starts, I also need it to start in a specific directory.
I've been told that it's possible if I placed a shortcut in the startup.
how can I add a shortcut programatically??
I could add the shortcut upon installation but
at some point in my program I might need to disable the autostarting, how could that be possible?
 
Disabling the autostart can be done by removing the .lnk file in the Startup folder. You can create a shortcut programatically by using the IShellLink interface. It is documented in the MSDN library (Search for IShellLink). If you wish I can give you an example in C++.

Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top