FYI - You don't need to tokenize your script to use the tokenized function. Just call the correct version - 4.53 or 4.6x.

As for your function
  • Why are you passing the $inifile value to the function but defining it in the function? This is not valid.
  • You aren't passing "$ServerName" to the function but are using it in the function. This will fail if Explicit is used (recommended, and required for any KORG published function). Either pass it or define it in the COMMON section of the INI file and read it in the function.
  • Why define the groups as a hard coded array? You should get this from a different section of the INI file - $Groups=ReadProfileString($Ini,'COMMON','Groups') - then it can change without any code mods. You should never really embed data into your scripts like this..
  • You should use an Exit 0 at the end of the function - the zero indicates success. If you have errors reading the file, return with Exit 2 (file not found).
As for Antivirus detection, you should search for the WMIGetAVI() UDF. This uses an external data file to allow a single UDF to detect any AV product and version, as well as return custom attribute pairs. The first 3 values returned are always the same format. No custom coding is needed - just define the AV product parameters and detection methods in the INI file.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D