Solved

Changing registry key for HKEY_USERS

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Save copy of document in Word 4 64
Problem to line 4 65
T-SQL Debugging - Temp Object Content 2 49
dialer.exe 4 51
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…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

17 Experts available now in Live!

Get 1:1 Help Now