mdlister
asked on
usuing vbs how can i read a binary reg value from the HKEY_USERS registry and rename the key so that i can import different keys?
Morning, I am looking to pin icons to the desktop for 10,000+ users as part of the office 2007 roll out, currently office icons are built in to the standard image build which will be removed at the end of the year, i have found the registry keys that contain the settings for every user profile on the machine under HKEY_USERS, i would normally add the registry key import to the logon script but as we are doing a stagered roleout of office i thought a wsh/vbs script may do the trick.
I have a script that installed office 2007 and then adds additional reg keys however it will not add them to every users profile on the machine so i was hoping to write something that would loop though all they sid's and add the keys how ever when i have tried i am able to read the first key and store that as a variable but when i try to output it to another key to create a backup before i go ahead and change keys i get a data mismatch.
Is there a way to read and write binary reg keys in a script that will loop through all the sid's and change the keys or do i need to come up with a different approach?
I have a script that installed office 2007 and then adds additional reg keys however it will not add them to every users profile on the machine so i was hoping to write something that would loop though all they sid's and add the keys how ever when i have tried i am able to read the first key and store that as a variable but when i try to output it to another key to create a backup before i go ahead and change keys i get a data mismatch.
Is there a way to read and write binary reg keys in a script that will loop through all the sid's and change the keys or do i need to come up with a different approach?
Set Shell = CreateObject("WScript.Shell")
arr = Shell.RegRead("HKEY_USERS\S-1-5-21-1008850429-2325668040-1177597070-84490\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage\favorites")
a=arr
b=arr
For I = LBound(arr) To UBound(arr)
a(I) = CInt(arr(I))
b(I) = Hex (CInt(arr(I)))
Next
Wscript.Echo "The registry key name's decimal value is", Join(a),",", "the hex value is", Join(b),"."
msgbox Join(a),,"The decimal value is"
msgbox Join(b),,"The hexadecimal value is"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window