Solved

Changing registry key for HKEY_USERS

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

737 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