Question : VB6 how to load other user registry hives and write the content of a .reg file

Hi Experts,

Is anyone able to help me with programetically loading the regsitry hives for each user on the computer (one at a time) and write the contents of an existing .reg file to each of the user's registry ?

Thanks in advance

Answer : VB6 how to load other user registry hives and write the content of a .reg file

i guess u meant to run this reg file for each of the users, which mean under HKEY_USERS.
under HKEY_USERS there the SIDs entries of each user.
do i guess the reg file should modified as such:

assume the following HKEY_USERS SIDs:

s-1-2-3
s-1-2-4
s-1-2-5

then the.reg file should be modified like this:

[HKEY_USERS\s-1-2-3\Software\Microsoft\Office\14.0\Word\Options]
"PROGRAMDIR"="C:\\Program Files\\Microsoft Office\\Office12\\"
"FirstRun"=dword:00000000
"OptionsDlgSizePos"=hex:48,03,00,00,ad,02,00,00,5c,00,00,00,1b,00,00,00,00,00,\
  00,00
"SQLSecurityCheck"=dword:00000000


[HKEY_USERS\s-1-2-3\Software\Microsoft\Office\14.0\Word\Security]
"Security Levels"=dword:00000000
"AccessVBOM"=dword:00000001
"VBAWarnings"=dword:00000001

[HKEY_USERS\s-1-2-3\Software\Microsoft\Office\14.0\Word\Security\Trusted Locations]

[HKEY_USERS\s-1-2-3\Software\Microsoft\Office\14.0\Word\Security\Trusted Locations\Location0]
"Path"=hex(2):25,00,41,00,50,00,50,00,44,00,41,00,54,00,41,00,25,00,5c,00,4d,\
  00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,54,00,65,00,6d,00,\
  70,00,6c,00,61,00,74,00,65,00,73,00,00,00
"Description"="0"

[HKEY_USERS\s-1-2-3\Software\Microsoft\Office\14.0\Word\Security\Trusted Locations\Location1]
"AllowSubFolders"=dword:00000001
"Path"="C:\\Program Files\\Microsoft Office\\Templates\\"
"Description"="1"

[HKEY_USERS\s-1-2-3\Software\Microsoft\Office\14.0\Word\Security\Trusted Locations\Location2]
"Path"=hex(2):25,00,41,00,50,00,50,00,44,00,41,00,54,00,41,00,25,00,5c,00,4d,\
  00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,57,00,6f,00,72,00,\
  64,00,5c,00,53,00,74,00,61,00,72,00,74,00,75,00,70,00,00,00
"Description"="2"

and same thing to every SID.


is that what you are looking for?



Random Solutions  
 
programming4us programming4us