I’m trying to install an application in a Single Task.
So, What I did was uploaded both Architectures of the application into a single task and then by using conditions I want to chose which one gets deploy.
I was just thinking I can do nested if statements; However, Is there a way of doing OR statements.
Not sure if Office if the apps your are dealing with but a detection method we use for getting the version and architecture might help if it is Office.
Q: if (exists regapp "outlook.exe") then ((preceding text of first ";" of following text of first ((preceding text of first "." of (version of regapp "outlook.exe" as string)) & ":") of "8:Office 97;9:Office 2000;10:Office XP;11:Office 2003;12:Office 2007;14:Office 2010;15:Office 2013;16:Office 2016;") & (if (x64 of operating system) then ((if pathname of it as lowercase contains "(x86)" then " 32-bit" else " 64-bit") of regapp "outlook.exe") else (" 32-bit"))) else "NotInstalled"
A: Office 2016 32-bit
Maybe with a slight tweak that could be used to populate an action parameter then do a condition if to jump to the action suitable for the version detected.
parameter "OfficeVersion" = "{if (exists regapp "outlook.exe") then ((preceding text of first ";" of following text of first ((preceding text of first "." of (version of regapp "outlook.exe" as string)) & ":") of "8:97;9:2000;10:XP;11:2003;12:2007;14:2010;15:2013;16:2016;") & (if (x64 of operating system) then ((if pathname of it as lowercase contains "(x86)" then "x86" else "x64") of regapp "outlook.exe") else ("x86"))) else "NotInstalled"}"
If{parameter "OfficeVersion"} = "2007x86"
// Do Something
elseif{parameter "OfficeVersion"} = "2010x86"
// Do Something
elseif{parameter "OfficeVersion"} = "2010x64"
// Do Something
elseif{parameter "OfficeVersion"} = "2013x86"
// Do Something
endif
I will point out that to the BigFix client, that path is the C:\Program Files (x86) path so you might not be getting what you want. It might be better to look at it with the set (native program files folder; program files x32 folder) where the native will give you 64 on a 64 bit and 32 on the 32 bit
prefetch 31111111111111111111111111 sha1:31111111111111111111111111 size:311 http://BigFixServer.com:52311/Uploads/31111111/MimecastClient.tmp sha256:311111111111
extract 311111111111111
parameter "OfficeVersion" = "{if (exists regapp "outlook.exe") then ((preceding text of first ";" of following text of first ((preceding text of first "." of (version of regapp "outlook.exe" as string)) & ":") of "8:97;9:2000;10:XP;11:2003;12:2007;14:2010;15:2013;16:2016;") & (if (x64 of operating system) then ((if pathname of it as lowercase contains "(x86)" then "x86" else "x64") of regapp "outlook.exe") else ("x86"))) else "NotInstalled"}"
**Failed** If{parameter "OfficeVersion"} = "2007x86"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (32 bit).msi"}" /qn /norestart
elseif{parameter "OfficeVersion"} = "2010x86"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (32 bit).msi"}" /qn /norestart
elseif{parameter "OfficeVersion"} = "2010x64"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (64 bit).msi"}" /qn /norestart
elseif{parameter "OfficeVersion"} = "2013x86"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (32 bit).msi"}" /qn /norestart
elseif{parameter "OfficeVersion"} = "2013x64"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (64 bit).msi"}" /qn /norestart
elseif{parameter "OfficeVersion"} = "2016x86"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (32 bit).msi"}" /qn /norestart
elseif{parameter "OfficeVersion"} = "2016x64"
wait "{pathname of system folder & "\msiexec.exe"}" /i "{(pathname of client folder of current site) & "\__Download\Mimecast for Outlook 7.6.0.26320 (64 bit).msi"}" /qn /norestart
endif
Im trying to see why this is failing now. I really like this idea.