Code submitted by Peter Bernard. Portions of article text by Zarko Gajic
Have you ever asked yourself where are those applications that seem to be executed when Windows start, you cannot find in the Start - StartUp Windows menu?
Or, how a virus can start itself each time you reboot? Or, who started all those applications you see in the System Tray?
Registry ... "\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
As you might guess, you can "automagically" start programs whenever Windows launches.If you have programs automatically starting that you have not loaded (do not want) then you can remove them using the "Windows StartUp Manager" we will build in this article.
Here's how to manually specify an application to be run at Windows startup:
- Open your registry (Start - Run - regedit.exe) and locate the key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
- For each program you want to start automatically create a new string value using a descriptive name, and set the value of the string to the program executable.
For example, to automatically start "MyApplication.exe", add a new entry of "MyApp"="c:\MyApps\MyApplication.exe".
Building a Simple Windows StartUp Manager
The source code (download) accompanying this article shows how to build a program that allows a user to control which applications will run when Windows starts up, without having to put the application entries into the "Startup" menu.Note: the source code is heavily documented.
In essence, the TRegistry object is used to manipulate the Registry from Delphi code.
SHARE