3
votes

I am writing an application using Delphi 2010. I would like to have my application start up when windows starts up. I need this to work in the latest versions of Windows XP, 7.0, and the latest servers.

Would storing it under the following key work, or do i need to do something else?

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

thanks for any help

2
There is no "Windows 7.0". The version number of "Windows 7" is 6.1.Andreas Rejbrand
shell startup is much more user friendlyFree Consulting
@user205376 by shell startup do you mean the Startup folders in the Windows start menu? If so then I agree that that is a more user-friendly and visible approach.David Heffernan
@David Heffernan it has been there even before Start Menu and "Folder" term :-)Free Consulting
Define "all versions of windows": you want to have this working in 16-bit Windows 1.0?Jeroen Wiert Pluimers

2 Answers

4
votes

That will only result in it starting when the user running the installation process connects. If you want it to start when Windows starts then try under HKLM.

1
votes

Be aware that these Run key entries execute when a user logs on. To launch a task on startup, it's better to write windows services, which is quite easy to do in Delphi.

A little help on services: http://delphi.about.com/od/windowsshellapi/a/delphi-windows-service-applications.htm