Solved

Registry

Posted on 2006-07-16
12
352 Views
Last Modified: 2010-04-30
Are the startup locations in the registry the same for all the major versions of windows (95 - XP)
These 2:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

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!
Albert
0
Comment
Question by:ahammar
12 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 350 total points
ID: 17119901
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)

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17119909
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 :)
RunServices/RunServicesOnce

0
 
LVL 9

Assisted Solution

by:pradapkumar
pradapkumar earned 75 total points
ID: 17119918
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)

Pradap
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17119919
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
0
 
LVL 23

Author Comment

by:ahammar
ID: 17119927
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!
albert
 
0
 
LVL 23

Author Comment

by:ahammar
ID: 17119939
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.

Thanks!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 65

Expert Comment

by:rockiroads
ID: 17119996
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


0
 
LVL 23

Author Comment

by:ahammar
ID: 17120026
thanks!
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.

Cheers!
Albert
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17120262
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
0
 
LVL 1

Assisted Solution

by:RegProctor
RegProctor earned 75 total points
ID: 17128049
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 Local_Machine...run 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.

Reg
0
 
LVL 23

Author Comment

by:ahammar
ID: 17129339
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!

Cheers!
Albert
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17130790
Cheers
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now