I have an installer that sets the key to HKEY_CURRENT_USER. When I run the installer, it only adds it to the user who installs. Is there a way to add a key to all users at once?
thank
You will need to go through all users under HKEY_USERSrequiring elevated rights. And does not capture users who have not yet been created. This is just the wrong approach.
HKEY_USERS
- HKLM . , HKCU, , HKLM HKCU.
HKLM
HKCU
- , , , . , , .
Active Setup .
, HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\% % . Windows, HKCU\SOFTWARE\Microsoft\Active Setup\Installed Components\% %. , , HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\% %\StubPath.
, , script ( ) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run :
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed \MapDrive" /v "" /d "1" /t REG_SZ/freg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed \MapDrive" /v "StubPath" /d "reg add HKEY_CURRENT_USER\ \Microsoft\Windows\CurrentVersion\Run/v" MountDrive "/d" C:\map.cmd "/t REG_DWORD/f" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed \MapDrive" /v "" /d "1" /t REG_SZ/f
reg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed \MapDrive" /v "StubPath" /d "reg add HKEY_CURRENT_USER\ \Microsoft\Windows\CurrentVersion\Run/v" MountDrive "/d" C:\map.cmd "/t REG_DWORD/f" /f
:
, , , .
http://wpkg.org/Adding_Registry_Settings#Adding_entries_to_HKCU_for_all_users
, Windows 7
/s, HKCU, regedit, /.
HKEY_USERS . C:\Users\Default NTUSER.DAT. (, NAMEHERE).
[HKEY_CURRENT_USER \ [HKEY_USERS\NAMEHERE \ ( , )
reg,
NAMEHERE .
. , , , . , , - , , , . , , delete.
, . , , HKEY_CURRENT_USER\Software\Classes \, . , , - , .
, .
: , . ?
- . .
, , - .
, HKCU, , , , .
Microsoft KB :
http://technet.microsoft.com/en-us/library/bb742499.aspx