(imported comment written by SystemAdmin)
Hello MD.
For the relevance the easiest way may just be to say something like this. There are more succinct ways of doing it with “it” causes but this will work as well. Just more verbose:
//determine arch
q: architecture of operating system
A: x86_64
T: 0.038 ms
I: singular string
q: if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”
A: program files (x86)
T: 0.055 ms
I: singular string
//build the path to the file using the if statement above
q: “C:” & (if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”) & “\path_to_file.exe”
A: C:\program files (x86)\path_to_file.exe
T: 0.072 ms
I: singular string
//Check for the existance of the file
q: exists file (“C:” & (if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”) & “\freerip\freerip3.exe”)
A: True
T: 0.174 ms
I: singular boolean
//finally check if A. the file does not exist OR B. If the file does exist and is less than a certain version.
q: not exists file (“C:” & (if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”) & “\freerip\freerip3.exe”) OR (exists file (“C:” & (if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”) & “\freerip\freerip3.exe”) whose (version of it <= “4”))
A: True
T: 0.324 ms
I: singular boolean
Action:
In action you can use {} for relevance substitution. To execute:
wait “{“C:” & (if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”) & “\path_to_file.exe”}”
same thing for delete:
delete “{“C:” & (if (architecture of operating system = “x86_64”) then “program files (x86)” else “program files”) & “\path_to_file.exe”}”
To replace it you can use “move” or “copy” after you delete the original. For instance:
Move “source file” “destination file”
Same as above for executing a command on the new one:
wait “command_to_run”
Beyond this I would highly recommend the 2 day custom content course for a crash course on the major forms of relevance as well as how best to use the resources.