Solved

Changing registry key for HKEY_USERS

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

756 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