Solved

Registry

Posted on 2006-07-16
12
355 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

733 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