views:

204

answers:

4

I'd like to add an option to my application similar to the Skype's option "run Skype as my computer starts".

Skype doesnt't go on the "Auto start applications" of the start menu folder, I'd like to have the same effect.

Note, one answer to this question suggets to add a key here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

but I checekd on my machine and Skype is not there, so another way is used.

+1  A: 

See this question. The question is about C#, but it only involves writing a registry value. It will be easy to convert it for Delphi.

kgiannakakis
I checked it: the first answer (the approved one) just sas to add a link in the auto start applications of start menu, so this is not what I want to achieve. The second is more interesting but I checekd and Skype is not in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run of my machine, so something else is been used. I will update my question adding this info. Thanks.
+3  A: 

If you type "msconfig" into the run window and look at the startup tab you can see where "everthing" starts from in the Location column. I don't use skype but my guess would it's in the registry in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

You just need to add a registry entry for your app in there (and delete it if the user unticks the box)

you can use the TRegistry class to help you reading and writing to the registry.

JamesB
THanks for the msconfig suggestions. yes, skype is there the reason why i was not founding it is that it is defined at user level not at system level: HKCU\Software\Microsoft\Windows\CurrentVersion\Run
+10  A: 

Skype installs via a registry entry, but it's in HKEY_CURRENT_USER , not HKEY_LOCAL_MACHINE

This allows Skype to be installed or not on a per-user basis. Using HKLM will autostart for ALL users.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Roddy
A: 

Hi

Just run msconfig and select startup tab. You'll see the applications along side the registry key used.

Oddly, when I run regedit without elevation don't see the value HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Skype also. But if I run it elevated then the value is there (I guess that Windows is playing registry redirection).

Best

Vagaus