{"id":6404,"date":"2020-07-05T19:27:31","date_gmt":"2020-07-05T19:27:31","guid":{"rendered":"https:\/\/www.samlogic.net\/blog\/?p=6404"},"modified":"2020-07-05T19:27:31","modified_gmt":"2020-07-05T19:27:31","slug":"how-to-check-if-microsoft-office-is-installed-during-installation","status":"publish","type":"post","link":"https:\/\/www.samlogic.net\/blog\/2020\/07\/how-to-check-if-microsoft-office-is-installed-during-installation\/","title":{"rendered":"How to check if Microsoft Office is installed during an installation"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignright\" src=\"https:\/\/www.samlogic.net\/pad\/icons\/visual_installer.gif\" border=\"0\" alt=\"\">Sometimes it can be useful to check if Microsoft Office is installed in a computer during an installation. There are conditions available in <a href=\"https:\/\/www.samlogic.net\/visual-installer\/visual-installer.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Visual Installer&#8217;s<\/a> script language that can be used for this. The conditions in the script language can examine the following:<\/p>\n<p>\u2022 check whether Microsoft Office is installed in the computer or not<br \/>\n\u2022 check if the installed Microsoft Office is 32 bit or 64 bit<\/p>\n<p>This can be useful if you for example:<\/p>\n<p>\u2022 install files that require that Microsoft Office is installed in the computer<br \/>\n\u2022 install files that require a specific bitness of Microsoft Office (for example 32 bit Office)<br \/>\n\u2022 want to install different files depending on the bitness of Microsoft Office<\/p>\n<p><strong>How to check if Office is installed<\/strong><br \/>\nIf you want to check if Microsoft Office is installed in the end-user&#8217;s computer you can use the <strong>IF OFFICEINSTALLED<\/strong> condition in Visual Installer&#8217;s script language for this purpose. If you want to check the opposite, if Microsoft Office is <em>not<\/em> installed in the computer , you can use the  <strong>IF NOT OFFICEINSTALLED<\/strong> condition instead.<\/p>\n<p>Below you can see how these two conditions can be used:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/vi-script--check-if-office-installed--cropped.png\" alt=\"The 'IF OFFICEINSTALLED' condition\" border=\"0\"><\/p>\n<p><strong>How to check Office bitness<\/strong><br \/>\nThere are <strong>32 bit<\/strong> and a <strong>64 bit<\/strong> versions of Microsoft Office available, and if you distribute executable files or components that co-operate with Microsoft Office (for example with Microsoft Excel or Microsoft Access) the bitness of the executable files or components that you install must often be the same as the bitness of the installed Office.<\/p>\n<p>To handle this in a smooth way, you can use a another condition in Visual Installer&#8217;s scripting language. The name of the condition is <strong>IF OFFICEBIT=??<\/strong> where <strong>??<\/strong> can be <strong>32<\/strong> or <strong>64<\/strong>. For example <strong>IF OFFICEBIT=32<\/strong>, which checks if a 32 bit version of Office is installed.<\/p>\n<p>Below you can see how this condition can be used:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/vi-script--check-office-bitness--cropped.png\" alt=\"The 'IF OFFICEBIT=' condition\" border=\"0\"><\/p>\n<p><strong>Another example<\/strong><br \/>\nBelow is another example, where the conditions above are combined. First the script lines checks if any version of Office is installed in the computer, and thereafter the script lines starts an installation with the same bitness (32 bit or 64 bit) as the installed Office:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/vi-script--office-check--all-conditions--cropped.png\" alt=\"All Office check conditions altogether\" border=\"0\"><\/p>\n<p>If no Office application is installed in the system, an information message box is shown (line 4) and the installation stops (line 5).<\/p>\n<p><strong>See also<\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">&gt;<\/span><\/strong> <a href=\"https:\/\/www.samlogic.net\/visual-installer\/tips\/tips-pages\/visual-installer-scripting-language\/visual-installer-scripting-language.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Visual Installer&#8217;s Scripting Language<\/a><br \/>\n<strong><span style=\"color: #ff0000;\">&gt;<\/span><\/strong> <a href=\"https:\/\/www.samlogic.net\/visual-installer\/news\/visual-installer-2014\/vi2014-new-conditions-check-bitness.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Check if the operating system is 32 bit or 64 bit<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it can be useful to check if Microsoft Office is installed in a computer during an installation. There are conditions available in Visual Installer&#8217;s script language that can be used for this. The conditions in the script language can examine the following: \u2022 check whether Microsoft Office is installed in the computer or not &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.samlogic.net\/blog\/2020\/07\/how-to-check-if-microsoft-office-is-installed-during-installation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to check if Microsoft Office is installed during an installation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[],"_links":{"self":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/6404"}],"collection":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/comments?post=6404"}],"version-history":[{"count":11,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/6404\/revisions"}],"predecessor-version":[{"id":6415,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/6404\/revisions\/6415"}],"wp:attachment":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/media?parent=6404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/categories?post=6404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/tags?post=6404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}