0
How to create a regitry key inside the user GUID? I need to do this by VBS, it will run on 500 users more or less.
Original key, for example:
HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Internet Account Manager\Accounts\00000006
I need to create a key (00000099) below the "Accounts" beside the key "00000006".
It Works! I have the key... – mdoria – 2015-09-23T12:03:23.743
Thankyou It Works! I have the key!
I trying to write subkeys with RegWrite... but i dont have sucess...
Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.RegWrite "HKCU\Identities"&sKey&"\Software\Microsoft\Internet Account Manager\Accounts", "00000099"
I'm trying... – mdoria – 2015-09-23T12:14:24.600
I forogt how crazy RegWrite is in that regards. If you want to use it you would have to write WshShell.RegWrite "HKCU\Identities"&sKey&"\Software\Microsoft\Internet Account Manager\Accounts\00000099", "", "REG_SZ" thus creating a default value as an empty string which is not 100% standard but would probably work. If you want it 100% correct use CreateKey or create a dummy reg_Sz under 00000099 and delete it – Syberdoor – 2015-09-23T12:26:09.690
Tks for response, I really dont know much of it.
It's working. The only problem is that the key "00000099" is being created in the wrong place.
It seems que the RegWrite can not read the full adress with the "&sKey&" in the middle .
See the situation: http://imageshack.com/a/img538/7536/WzpUZj.jpg
This could happen if you write the regWrite outside of the For...Next. You should either just insert that regwrite in the loop, or if you want to use the key for different stuff that should not be looped you have to save it. Like in the loop have guid = sKey. In the code above the sKey variable is only valid for the time of the loop. After the loop it is empty – Syberdoor – 2015-09-23T14:04:13.127