help combining 2 scripts
Posted: Wed Mar 05, 2014 12:24 pm
I'd like the following script to only put out one result. Either the 64bit app is compliant/non compliant/ or not installed or the 32 bit section is such.
VBScript Code
Double-click the code block to select all.const HKEY_LOCAL_MACHINE = &H80000002 on error resume next Dim dversion, GUIDid dversion = "6.1.20913.0" GUIDid = "{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}" set oWsh = createobject("wscript.shell") Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") strKeyPath = "software\microsoft\windows\currentversion\uninstall" sDisplayVersion = oWsh.Regread("HKLM\" & strKeyPath & "\" & GUIDid & "\DisplayVersion") oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue if err.number <>0 then wscript.echo "Not-Installed" err.clear else If Eval("sDisplayVersion >= dversion") Then wscript.echo "Compliant" Elseif Eval("sDisplayVersion < dversion") Then wscript.echo sDisplayVersion End if End if strKeyPath = "software\wow6432node\microsoft\windows\currentversion\uninstall" sDisplayVersion = oWsh.Regread("HKLM\" & strKeyPath & "\" & GUIDid & "\DisplayVersion") oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue if err.number <>0 then wscript.echo "Not-Installed" err.clear else If Eval("sDisplayVersion >= dversion") Then wscript.echo "Compliant" Elseif Eval("sDisplayVersion < dversion") Then wscript.echo sDisplayVersion End if End ifit does both right now, please help me seperate them.