This should be an easy versioning question

(imported topic written by SystemAdmin)

Below the meat of the relevence querys the version of McAfee on the server, if its not installed it should return 0.0.0

I wanted to say if () < " then true else false

Q: (if (exists key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\VirusScan” of registry) then (values “szCurrentVersionNumber” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\VirusScan” of registry as string) else if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion” of registry) then (values “szProductVer” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion” of registry as string) else if (exists key “HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection” of registry) then (values “szProductVer” of key “HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection” of registry as string) else “0.0.0”) as version)

E: 0.0.0

this is the same as above except the “if” at the start and the ending of it… but this doesnt work

if ((if (exists key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\VirusScan” of registry) then (values “szCurrentVersionNumber” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\VirusScan” of registry as string) else if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion” of registry) then (values “szProductVer” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion” of registry as string) else if (exists key “HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection” of registry) then (values “szProductVer” of key “HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection” of registry as string) else “0.0.0”) as version) < “8.7.0” then true else false

how do i query for a version ?

(imported comment written by NoahSalzman)

"The left operand of '<'t like the possibility that “values” will return multiple results as it can’t compare plural values to a single 8.7.0 value.

So, try changing every values “szProductVer” to

value “szProductVer”

.

(imported comment written by SystemAdmin)

noah

"The left operand of '<'t like the possibility that “values” will return multiple results as it can’t compare plural values to a single 8.7.0 value.

So, try changing every values “szProductVer” to value “szProductVer”.

Thank You That worked great

if ((if (exists key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\VirusScan” of registry) then (value “szCurrentVersionNumber” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\VirusScan” of registry as string) else if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion” of registry) then (value “szProductVer” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion” of registry as string) else if (exists key “HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection” of registry) then (value “szProductVer” of key “HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection” of registry as string) else “0.0.0”) as version) < " then true else false