Page 3 of 3

Re: help combining 2 scripts

Posted: Fri Mar 07, 2014 7:18 am
by jjimenez
thank you. I think i can use that.

Ultimately it has to satisfy 1 of 3 results while checking the 2 reg keys, but only outputing 1 result.

installed up to date
installed not up to date
not installed

but thanks again.

Re: help combining 2 scripts

Posted: Fri Mar 07, 2014 7:53 am
by jvierra
You are at liberty to change the messages to say anything you like.

Re: help combining 2 scripts

Posted: Fri Mar 07, 2014 9:23 am
by jjimenez
this appears to work properly.
VBScript Code
Double-click the code block to select all.
sProductIdentifier = "{25D1F70B-0B90-495C-8ADC-4FF0855EF92E}"
dversion = "11.9.4.634"
 
sVersion = GetProductVersion("HKLM\software\microsoft\windows\currentversion\uninstall\" & sProductIdentifier & "\DisplayVersion")
sVersion1 = GetProductVersion("HKLM\software\wow6432node\microsoft\windows\currentversion\uninstall\" & sProductIdentifier & "\DisplayVersion")

If (sVersion >= dversion) Then
	wscript.echo "Compliant"

Elseif sVersion <> "" Then
    WScript.Echo sVersion

ElseIf (sVersion1 >= dversion) Then
	wscript.echo "Compliant"

Elseif sVersion1 <> "" Then
    WScript.Echo sVersion1
    
Else wscript.echo "Not Installed"

  WScript.Quit
End If
 
Function GetProductVersion(sValuePath)
    On Error Resume Next
    GetProductVersion = createobject("wscript.shell").Regread( sValuePath ) 
End Function
thanks for all the help.