When I want my program to be executed every time windows is started, I create an entry in the registry (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion). That's clear. But there are different subkeys (Run, RunOnce, RunOnceEx, RunServices, RunServicesOnce). Well, when I create an entry in "RunOnce" or "RunServiesOnce", my program is only executed one time. After that the registry entry will be deleted, so that it isn't executed a second time. But what is the difference between "RunOnce" and "RunOnceEx", and between "Run" and "RunServices". What is meant by services? Wooaaa, this are a lot questions. I hope some of you could answer these! :)
Posted on 2002-07-30 12:32:26 by Marwin
Obviously, values in RunOnce are executed once and removed. Values in Run are executed every time Windows starts (identical to putting shortcuts into the Startup folder in the Programs menu). Services I guess are for services, don't know much about those.
Posted on 2002-07-30 12:37:55 by comrade
i don't know the diff between runonce and runonceex.
programs you enter in run are started like in the normal startup-folder, as comrade told you.
AFAIK when you put something into runservices it is executed even before you are logged on to windows (thats what services do, don't they?)
Posted on 2002-07-30 12:58:24 by phueghy
Posted on 2002-07-30 13:15:45 by bazik
Is not cheating to read the documentation bAZiK? :grin: :grin:
Posted on 2002-07-30 13:36:32 by bitRAKE
Ok, thank you very much! :alright:
Posted on 2002-07-31 11:58:27 by Marwin
Hello. Please can you give me an example of how to create this key. I need my program to do this, but have never used the registry before. I have searched and read the board and the SDK - but I am still a little confused. I assume you use RegCreateKeyEx, but I don't understand what I should put in the key and subkey parameters. I don't want to go messing uo my registry straight away!

An example would be superb,
Thanks a lot,
Posted on 2004-02-25 11:39:51 by adamjjackson

you can find an example in the masm32 directory:


There you see easily how to read/write strings/etc. from/to the registy.

Posted on 2004-02-25 14:55:12 by Marwin
Hi, thanks.
Is there any other way to do this? I wanted to run my program on a networked computer, however there is a "user independent setup", and so when I log out my settings get removed. I assume it cleans out the registry. Is there another key that could be used? I was using HKEY_CURRENT_USER. Otherwise I assume that it can't be done...?
Posted on 2004-02-27 03:46:54 by adamjjackson