Solved

Changing registry key for HKEY_USERS

Posted on 2004-08-31
3
533 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

772 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