Are the startup locations in the registry the same for all the major versions of windows (95 - XP)
These 2:

Also can someone explain the difference between the 2.
I know the HKEY_LOCAL_MACHINE...\run will start no matter who logs in

but the HKEY_CURRENT_USER...\run will run when whatever user logs in that was logged in when the entry was made??  Not sure how this one works...

Thanks and Cheers!
LVL 23
Who is Participating?

Improve company productivity with a Business Account.Sign Up

rockiroadsConnect With a Mentor Commented:
Yes, thats what Ive found with Win2K and XP at least

There is also the shortcuts in the Startup groups

Difference between the two is

LOCAL_MACHINE - startups represent ALL users
CURRENT_USER - represents the user logged on

Each user has their own registry settings

Earler versions (I think this includes Win95) had startup settings in Win.INI (or one of those config files also)

There is a utilty called MSCONFIG that also allows u to check the startups

Remember the other registry keys also

there is RunOnce - I guess apps that get run once only :)

pradapkumarConnect With a Mentor Commented:
excuse me,
As i understand that
LOCAL_MACHINE - this startup triggered whenever the machine restarts/rebooted
CURRENT_USER - this startup triggered whenever the users logged in(irrespective of username)

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

The key HKEY_USERS represents the settings for all users. Each user identified by some unique number.
Now I guess HKEY_CURRENT_USER acts as a view to your registry settings, so each user see's this but it points to their own settings (whether its loaded or pointed Im not sure)
It helps with installing/running apps, security etc
ahammarAuthor Commented:
Ok, so if I make an entry to start an application in the CURRENT_USER location while someone is logged in, then that application will only start when that particular user logs in and not when someone else logs in, right?? Also, when someone logs off and someone else logs in, the applications that were started in the same manner (from CURRENT_USER) will end??  Is that also right?

Thanks for such a quick reply!
ahammarAuthor Commented:
my goal here is to be able to make registry entries to start applications no matter who logs in, and registry entries to start apps only when the user that installed it logs in.  I need to be able to do it both ways.

What u then want is HKEY_LOCAL_MACHINE, this affects all users
Depending on what u want to run when user logs in, u add in either HKEY_LOCAL (all) or HKEY_CURRENT (person logged in only)

The alternative, like I said earlier, is to add to the Startup Folder for All Users/Logged in user

ahammarAuthor Commented:
Yeah, I do use the startup folder locations too, but in some cases I don't want the shortcuts to be so easily accessible.  Some of my apps are for preventing certain people from doing certain things (mainly peoples children) and I don't want them to be able to simply delete the shortcuts (for the ones that are experienced enough to do that) to prevent them from running.
I still have the problem of keeping them from uninstalling though.  Haven't figured out a solution for that one yet...:-(

Thanks for everything!  I'll probably accept answer(s) tomorrow.

Well u have to have something that uninstalls your s/w. Usual location is in LOCAL_MACHINE/Software/Microsoft/Windows\CurrentVersion/Uninstall
but if u do not want them to uninstall, dont create any links to it

Another thing u could possibly do is, the program that starts running it, if u pass in a parameter there to uninstall e.g.

myprog.exe -uninstall

that could uninstall it, this way u do not have a seperate program needed to uninstall

There is nothing stopping users from deleting your installed directory though, so how much benefit u get from hiding uninstall, Im not sure
RegProctorConnect With a Mentor Commented:
As stated earlier, in XP you can use MSConfig from the Run command line to see all the startup locations.

From memory, RunOnce is primarily for Installation programs that need to keep running themselves after a reboot.

Use the startup registry entry if you want your program to run for all users. Also, at least in XP, only users with Admin privelages can change those certain registry entries under Local_Machine so that's one way you can secure the startup of your app. As you go back through the versions of OS's it gets harder as MS wasn't noted for it's security abilities in times past.

Your best bet for earlier versions of Windows would probably be to run a service, even if all that service did was launch an app. since most users won't know how to get to a service. Those that do won't likely know yours from all the others as the list of services is quite extensive and you can give it some OS sounding description "Remote Services Helper" for example... I wouldn't touch such a thing without fully researching it. You can also leave the service running so that it can detect that an app. has been shut down and then take appropriate action such as quietly notify you or just restart the app.

ahammarAuthor Commented:
Thanks everyone!
Sorry it took me so long to get back to this.  I've learned a lot here and done some experimenting based on these comments.
I better get this question closed.  I think I have it figured out now.  I will split the points, but rockiroads will have to get the majority as he was first and offerred the mose information.
Thanks to every one of you!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.