changing a registry key to all SID's

G

Guest

Hi all,
I made a .reg file.
the key that i intend to change is located inside a user SID.

(EX:
HKEY_USERS\S-1-5-21-2018322775-1434109735-2322020850-500\AppEvents\EventLabels\.Default)

how can i make the change to all users, (disgarding the SID) withe a .reg
file ?

thanks,
oren.
 
D

David H. Lipman

Oren ( ???? )

The following News Group is more apropos: microsoft.public.windows.server.scripting


Dave




| Hi all,
| I made a .reg file.
| the key that i intend to change is located inside a user SID.
|
| (EX:
| HKEY_USERS\S-1-5-21-2018322775-1434109735-2322020850-500\AppEvents\EventLabels\.Default)
|
| how can i make the change to all users, (disgarding the SID) withe a .reg
| file ?
|
| thanks,
| oren.
 
D

Doug Knox MS-MVP

You can't. When you see HKEY_USERS\S-1-5-21-201........... that indicates that this user account is specifically logged into the computer. Users that aren't logged on won't appear here. For example, if you're the only user logged on, then your SID will be listed in HKEY_USERS, and is really just a different name for HKEY_CURRENT_USER.

What you can do is change your REG file to point to HKEY_CURRENT_USER\AppEvents\EventLabels\.Default, then place a shortcut in Documents and Settings\All Users\Start Menu\Programs\Startup that runs:

REGEDIT /S <your reg file>

This will force the REG file to be entered, silently, when the user logs on.

You could also place this command in the Registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run.

Note: If you have disabled Registry editing for a user, then they're account will not be able to import the REG file. In this case, a VB Script would be more appropriate.
 
T

Torgeir Bakken \(MVP\)

Doug said:
You can't. When you see HKEY_USERS\S-1-5-21-201........... that
indicates that this user account is specifically logged into the
computer. Users that aren't logged on won't appear here. For
example, if you're the only user logged on, then your SID will be
listed in HKEY_USERS, and is really just a different name for
HKEY_CURRENT_USER.
Hi

You can do this if using a script instead of a reg file, by enumerating
all user profiles on the computer, and loading the individual user's
registry hive and then do the registry change. You can use the command
line tool reg.exe that comes builtin with WinXP to do both the hive
loading and the registry change.

But if one of your suggestion is acceptable for oren, they are easier
to implement ;-)
 
G

Guest

thanks, doug,
I chose the first option you suggested,
Torgeir, i tried ur way too but it didnt work 4 me.

oren.
 

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