Solved

Changing registry key for HKEY_USERS

Posted on 2004-08-31
3
530 Views
Last Modified: 2013-12-03
I need to change a registry key that is in HKEY_USERS.

On my computer, the subdirectory that this key is in is:
HKEY_USERS/S-1-5-21-448539723-2052111302-839522111-1003/Software/App/

Now Im guessing the part that goes S-1-5-21-448539723-2052111302-839522111-1003 is different machine to machine.  How can I change a registry key for this app if I dont know the subdirectory it is going to be in before-hand?
0
Comment
Question by:lwinkenb
3 Comments
 
LVL 13

Expert Comment

by:SteH
ID: 11949816
Open the registry for HKEY_USERS and call

RegEnumKey(Ex)
and look inside all found keys if there is a subkey Software/App

If yes change to that key and change its value
0
 
LVL 16

Accepted Solution

by:
nonubik earned 500 total points
ID: 11949866
Under HKEY_USERS - registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.

So, under HKEY_USERS/S-1-5-21-448539723-2052111302-839522111-1003/ (if the only such kind of entry) you'll have *exactly* the same keys as under HKEY_CURRENT_USER. So you can easily write a key under HKEY_CURRENT_USER/software/app. Or if you want the key to be sahred by all users (if you have more than one) you can write it under HKEY_LOCAL_MACHINE. But only an administrator user has the right to write there.
0
 
LVL 5

Author Comment

by:lwinkenb
ID: 11950276
Thanks nonubik, I didnt realize that HKEY_USERS was the same as the keys in HKEY_CURRENT_USER.  That solves that problem :)
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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 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

21 Experts available now in Live!

Get 1:1 Help Now