I needed a nice easy script to output the version number of Exchange 2007 to i can see what Server Pack is installed

I have tried this on a few machines and it seems to be working, i am testing more now, fingers crossed.

Const HKEY_LOCAL_MACHINE = &H80000002 
strComputer = “.” 
Set objRegistry = GetObject(“winmgmts:” & strComputer & “rootdefault:StdRegProv”) 
 Dim strComputer, objWMIService, colSettings, objProcessor

strComputer = “.”
strKeyPath = “SOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-18Products461C2B4266EDEF444B864AD6D9E5B613InstallProperties”

strValueName = “displayversion” 
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue 
If IsNull(dwValue) Then 
    Wscript.Echo “Cant find Exchange” 
elseIf (dwValue) >= “” Then
  Wscript.Echo “Upgrade not Reqired SP3 installed(” & dwValue & “)”  
    Wscript.Echo “Upgrade to Exchange 2007 SP3 Requied (” & dwValue & “)” 
End If 

Let me know how it goes for you

« »