All Forums >> [Scripting] >> WSH & Client Side VBScript >> strkeypath value from 2 different reg paths Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Hi, Had to do this myself recently... The result from the reg lookup is a 0 for a good lookup (string existed) and non-0 for a failure, (basically). The success/failure can be assigned to a varaible at the same time that the return value can be gained from the parameter to the call. Here was my ver:
errOut = objWMIRegistry.getStringValue (HKLM, strAVRegKey, strAVVerRegEntry, arrInfo (19)) If errOut <> 0 Then errOut = objWMIRegistry.getStringValue (HKLM, strAVRegKey2, strAVVerRegEntry2, arrInfo (19)) End If If errOut <> 0 Then arrInfo (19) = "Check Registry!"