Removing periods from a relevance

(imported topic written by SystemAdmin)

I would like to check a property for 2 conditions

1 version of McAfee Engine has a property of 5300 and the second has a property of 5.3.00

they are both the same engne version, how would I strip out the periods to check for false

if either 5300 or 5.3.00 are present ?

if( if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersionMajor” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersion32Major” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (value “szEngineVer” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx” of registry as string))) contains “5300” then True else False

Q: if( if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersionMajor” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersion32Major” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (value “szEngineVer” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx” of registry as string))) contains “5.3.00” then True else False

(imported comment written by BenKus)

Hi mamacher,

Just add to the beginning of the expression:

concatenation of substrings separated by “.” of …

Like:

q: concatenation of substrings separated by “.” of "5.3.00"
A: 5300

Which should turn into:

Q: if( if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersionMajor” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersion32Major” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (concatenation of substrings separated by “.” of (value “szEngineVer” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx” of registry as string)))) contains “5300” then True else False

Or something close to that…

Ben

(imported comment written by SystemAdmin)

Awsome… Thank you :slight_smile:

this is what i have now

if( concatenation of substrings separated by “.” of (if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersionMajor” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry) then (value “EngineVersion32Major” of key “HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AVEngine” of registry as string) else (value “szEngineVer” of key “HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx” of registry as string)))) contains “5300” then false else true

thanks again