Compare registry value to known list of values

(imported topic written by sowensby91)

I am trying to compare the values of registry keys to some known values to get version of software. I currently have the below working:

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"5.1.10000.584" then 
"5.1 SP1" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"5.1.1000.407" then 
"5.1 AP1" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"5.1.0.398" then 
"5.1 GA" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"5.0.300.326" then 
"5.0 RP2" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"5.0.200.319" then 
"5.0 RP1a" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"5.0.0.297" then 
"5.0 GA" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"4.3.2000.358" then 
"4.3 MP2" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"4.3.1000.350" then 
"4.3 MP1" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"4.3.0.219" then 
"4.3 GA" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"4.2.200.112" then 
"4.2 RP02" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"4.2.100.104" then 
"4.2 RP01" 

else 

if value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry = 
"4.2.3.0" then 
"4.2 GA" 

else value 
"Version" of (keys of it) whose (exist name whose (it as string as lowercase contains 
"volume manager") of it) of keys 
"HKLM\SOFTWARE\Veritas" of registry as string

But I’d like to only query the registry once. I am sure it is more of the “it, whose” clauses, but I am hitting the wall.

Thanks in advance.

(imported comment written by sowensby91)

I think I found my answer here:

Searching for .Net versions

Thanks.