Just an updated script to check on version 6 products or the latest V5 build
Save as VBS
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = “.”
Set objRegistry = GetObject(“winmgmts:” & strComputer & “rootdefault:StdRegProv”)
Dim strComputer, objWMIService, colSettings, objProcessorstrComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate,authenticationLevel=Pkt}!” _
& strComputer & “rootcimv2”)Set colSettings = objWMIService.ExecQuery _
(“SELECT * FROM Win32_Processor”)For Each objProcessor In colSettings
‘ 9 is x64 Opperating system
if (objProcessor.Architecture) = “9” then
strKeyPath = “SOFTWAREWow6432NodeCortex I.TBackupAssistv5”Else
strKeyPath = “SOFTWARECortex I.TBackupAssistv5”
end if
next
strValueName = “Version”
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue‘Checking if no version 5 key is found. If no key is found, try looking for V6 key
If IsNull(dwValue) Then
Set colSettings = objWMIService.ExecQuery _
(“SELECT * FROM Win32_Processor”)For Each objProcessor In colSettings
‘ 9 is x64 Opperating system
if (objProcessor.Architecture) = “9” then
strKeyPath = “SOFTWAREWow6432NodeCortex I.TBackupAssistv6”Else
strKeyPath = “SOFTWARECortex I.TBackupAssistv6”
end if
next
strValueName = “Version”
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValueend if
‘Cant find a valid BA install
If IsNull(dwValue) Then
Wscript.Echo “Cant find BackupAssist / Script error”
WScript.Quit(1)
elseIf (dwValue) >= “6.1.0” Then
Wscript.Echo “Upgrade not required (” & dwValue & “)”
WScript.Quit(0)
‘Select value between range
elseIf (dwValue) >= “6.0.0” and (dwValue) <= “6.0.9” Then
Wscript.Echo “Upgrade Requied (” & dwValue & “) Version 6.1.0 required”
WScript.Quit(1)elseIf (dwValue) = “5.4.7” Then
Wscript.Echo “Highest V5 installed (” & dwValue & “) Version 6 upgrade recommended”
WScript.Quit(0)
elseIf (dwValue) =< “5.4.6” Then
Wscript.Echo “V5 upgrade required (” & dwValue & “) Version 6 upgrade recommended”
WScript.Quit(1)Else
Wscript.Echo “BackupAssist version problem (” & dwValue & “) Version 6.1.0 required”
WScript.Quit(1)
End if
😛
« Show all emails addresses in Exchange 2007/2010 Fix Exchange 2007 SP3 install – disabled services »