registry value modification

O

one2001boy

Hello,

is there a way to make registry modification for keys under
HKEY_CURRENT_USER for all users in the computer?

I can modify the key values under HKEY_CURRENT_USE using
RegSetValueEx(). However, it only affects the current logined user, not
all users under this machine. I want to make one key value under
HKEY_CURRENT_USER the same for all users. I also tried to modify
HKEY_USERS\\.DEFAULT, it doesn't help.

thanks.
 
A

Alon Fliess

Hello,

is there a way to make registry modification for keys under
HKEY_CURRENT_USER for all users in the computer?

I can modify the key values under HKEY_CURRENT_USE using
RegSetValueEx(). However, it only affects the current logined user, not
all users under this machine. I want to make one key value under
HKEY_CURRENT_USER the same for all users. I also tried to modify
HKEY_USERS\\.DEFAULT, it doesn't help.

thanks.

First of all, you should use the HKLM/Software for shared data, but I
supposed that you need to modify something for each user.
You can iterate through all the users under HKEY_USERS and modify each
of them. The .DEFAULT is the system user (the one for the logon
process)
The HIVE file for each user is stored in \Document and
settings\<username>\Ntuser.dat
For the default user (the default file that will be given to a new
user), the file can be found under the \Document and settings\Default
User
Changing this file should copy your setting to each new user account.

Another information that I should mention is that the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList stores the profile list.

I hope that this information is handy.

Alon Fliess
 
M

Mihajlo Cvetanovic

Alon said:
You can iterate through all the users under HKEY_USERS and modify each
of them.

Usually one user doesn't have either read or write privileges over other
user's registry. If OP is writing an application, and this application
uses HKCU, and some value needs to be set for each user, one way to do
this is to set that value in HKLM.

When each user starts the application this value is read and compared to
the value in HKCU, and if the value in HKLM is newer then it is copied
into HKCU. So, a value must have a modification time that is used for
comparison.
 
O

one2001boy

Alon said:
First of all, you should use the HKLM/Software for shared data, but I
supposed that you need to modify something for each user.
You can iterate through all the users under HKEY_USERS and modify each
of them. The .DEFAULT is the system user (the one for the logon
process)
The HIVE file for each user is stored in \Document and
settings\<username>\Ntuser.dat
For the default user (the default file that will be given to a new
user), the file can be found under the \Document and settings\Default
User
Changing this file should copy your setting to each new user account.

Another information that I should mention is that the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList stores the profile list.

Alon,

Thanks so much for your help.

I were told that you can modify \\HKEY_LOCAL_USER, but I don't know why
I cannot find HKEY_LOCAL_USER from regedit.

The registry key I tried to modify is
HKEY_CURRENT_USER\Console\QuickEdit, this key cannot be found under
HKEY_LOCAL_MACHINE.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList cannot such a key.

Thanks for your help.
 
O

one2001boy

Mihajlo said:
Usually one user doesn't have either read or write privileges over other
user's registry. If OP is writing an application, and this application
uses HKCU, and some value needs to be set for each user, one way to do
this is to set that value in HKLM.

When each user starts the application this value is read and compared to
the value in HKCU, and if the value in HKLM is newer then it is copied
into HKCU. So, a value must have a modification time that is used for
comparison.

Hi Mihajlo,
thanks for your help.
the registry value change is via system administrator. so the write
priviliges is not an issue. the problem is that
HKEY_CURRENT_USER\Console\QuickEdit has no match in HKLM\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top