I need some assistance please in seeing if the file version in the statement below is greater than or lesser than a certain value.
(if (exists file (it & “\Program Files\AGENTSRV.EXE”)) then version of file (it & “\Program Files\AGENTSRV.EXE”) as string else (if exists file (it & “\Program Files\Backup.exe”) then version of file (it & “\Program Files\Backup.exe”) as string else (if exists file (it & “\Program Files\Backup.exe”) then version of file (it & “\Program Files\Backup.exe”) as string else (“NA”)))) of (names of drives whose (type of it = “DRIVE_FIXED”))
This information will be used in a relevance statment for a task to determine whether or not an application push should commence or stop. Any help is much appreciated.
q: (if (exists file (it & “\Program Files\AGENTSRV.EXE”)) then (version of file (it & “\Program Files\AGENTSRV.EXE”) < ") as string else (if exists file (it & “\Program Files\Backup.exe”) then (version of file (it & “\Program Files\Backup.exe”) < “1.2.3.4”) as string else (if exists file (it & “\Program Files\Backup.exe”) then (version of file (it & “\Program Files\Backup.exe”) < “1.2.3.4”) as string else (“NA”)))) of (names of drives whose (type of it = “DRIVE_FIXED”))
But this way might be easier:
// returns true if any of the files are less than version 1.2.3.4
exists it whose (version of it < ") of (files (it & “\Program Files\agentsrv.exe”;it & “\Program Files\Backup.exe”)) of (names of drives whose (type of it = “DRIVE_FIXED”))
Ben thanks…I went with the first one, only because we have 3 different possible paths that the applications could be installed in. I removed the company name so as not to give them any free publicity on your site. This is why two of the paths matched each other. Thanks again!!!