vbscript to read registry keys and its subkeys

I want to change the Source file Server path location in the reg path HKEY_CLASSES_ROOT\Installer\Products\Product GUID\SourceList\Net\1 of every client machines, as we have removed the existing Application server with a new one...We were able to change the old server path to new server path using the "replace" function in vbscript. Set objWS = CreateObject("WScript.Shell")

oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath,strValueName,strValue
but we are stuck in reading the reg values.... Product GUID is a variable.First we have to read till that path and then after reading one GUID, again we have to read the complete path HKEY_CLASSES_ROOT\Installer\Products\<Product GUID>\SourceList\Net\1 and then change the server name Please let me know anyone have encountered any situation like this.

Answers

Firstly, I hope now you can see why people use DNS aliases for things like deployment servers?

Secondly, which part are you having problems with? How to loop through the keys or mangling the GUID to its "compressed" form? Either way, solutions have been posted here many times.

For reading the keys, their values and data, check out the registry class which is part of the JSWare class pack (actually, I think I've posted the entire script here before). It has functions EnumKeys and EnumValuesAndData (or similar names).

For mangling and unmangling GUIDs, searching my posts for the word "munge" should turn up 2 functions for that.

Install a script debugger. At the very least, try the Microsoft Script Debugger but better, if you install Visual Studio Express Edition, use that. You can then 'Debug.Print [variable_name]' or 'Debug.Print err.number' and so on.