Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Empty Reg MultiString

$
0
0
So, I want to check a REG_MULTI_SZ in a key and if it is empty then do something. However, my script keeps reporting that it contains data when it does not. Whats wrong?


Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-3\HP Universal Printing PCL 5 (v5.4)"
strValueName = "Dependent Files"
objRegistry.GetMultiStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue,arrValues

If IsNull(arrValues) Then
Wscript.Echo "Empty."
Else
Wscript.Echo "The value contains data."
End If

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>