Posted by Johan *DClub* on April 30, 2005
How can I launch a program with Delphi, each time that Windows starts?
I know that I can put a shortcut in the Startup
folder of the Start menu, but I want to do this from my Delphi program.
And if possible, how to start
it only ONCE, so only on the "next" Windows startup?
Reply by webmaster Guido on April 30, 2005
Have a look in DelphiLand's section "Code Snips" under "Mini Tutorial Projects".
The tutorial "Launch an application at Windows Startup" is just what you need :)
Reply by Johan P14205 on May 03, 2005
Thanks, that's what I was looking for!
I understand that Windows removes the RunOnce items automatically after launching them on startup.
But what about the programs set to run on every Windows start? It's a bit difficult (and dangerous I
you make a mistake) to remove them "by hand" with RegEdit, once they are not needed anymore...
make me very happy ;) with some Delphi code to safely remove these "run every startup" entries
Reply by webmaster Guido on May 05, 2005
Shame on us ;) our previous article was not complete without also telling you how
to remove the keys that you don't need anymore.
We've added some code: have a look at our new mini-tutorial "Remove an entry from a Registry key" in
DelphiLand's section "Code Snips".