{"id":2238,"date":"2014-02-17T18:24:16","date_gmt":"2014-02-17T16:24:16","guid":{"rendered":"http:\/\/www.samlogic.net\/blog\/?p=2238"},"modified":"2019-07-07T21:14:35","modified_gmt":"2019-07-07T21:14:35","slug":"how-to-complete-msi-installation-1-before-2-starts","status":"publish","type":"post","link":"https:\/\/www.samlogic.net\/blog\/2014\/02\/how-to-complete-msi-installation-1-before-2-starts\/","title":{"rendered":"How to complete MSI installation #1 before #2 starts (when running multiple installations)"},"content":{"rendered":"<p>Sometimes it is necessary to run and complete one MSI installation before the next MSI installation starts. This may happens if your software is dependent of some specific prerequisites, also during the installation. One common problem is that one component can not be installed and registered in the system, in a proper way, before some basic components that it needs are installed first. The installation of these basic components must be completed first, otherwise the next installation may fail.<\/p>\n<p><img decoding=\"async\" class=\"alignright\" src=\"https:\/\/www.samlogic.net\/pad\/icons\/visual_installer.gif\" border=\"0\" alt=\"\">It is possible to create setup packages where one installation is completed before the next one starts, but this can normally be tricky to achieve. But with the new script command <strong>MSIEXEC<\/strong> that we have added to <a href=\"https:\/\/www.samlogic.net\/visual-installer\/visual-installer.htm\">Visual Installer<\/a>, this is very easy done.<\/p>\n<p>The <strong>MSIEXEC<\/strong> command is used to install MSI packages and <strong>MSIEXEC<\/strong> has a parameter with the name <strong>%Wait<\/strong> that is useful when multiple MSI setup packages need to be installed, and they must be installed in a specific order. If you set this parameter to <strong>WAIT<\/strong> Visual Installer will pause its own setup process until the installation of the MSI package is completed. Thereafter the installation (for example processing of more script lines) will continue.<\/p>\n<p><strong>Example<\/strong><br \/>\nBelow we will show you an example of how to use the <strong>MSIEXEC<\/strong> command.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/vi-script-window-msiexec-and-wait-cropped.png\" alt=\"MSIEXEC\"><\/p>\n<p>In this example Visual Installer will first install MSI file #1 (<strong>MySetup1.msi<\/strong>), waits until the installation of the MSI file is completed, and then install MSI file #2 (<strong>MySetup2.msi<\/strong>), and wait until this installation is completed, and then continue the rest of the installation.<\/p>\n<p>(The script command <strong>MESSAGE<\/strong> can be used to inform the user what happens during the setup process. If the MSI installations are time consuming it can be a good idea to inform the user that another installation is running for the moment.)<\/p>\n<p><img decoding=\"async\" class=\"alignright\" src=\"https:\/\/www.samlogic.net\/shared\/tips-and-tricks-w160.jpg\" border=\"0\" alt=\"\"><strong>More information about MSIEXEC<\/strong><br \/>\nFor more details about the new <strong>MSIEXEC<\/strong> script command, and for more examples of usage, see this tips &amp; tricks page:<br \/>\n<strong><span style=\"color: #ff0000;\">&gt;<\/span><\/strong> <a href=\"https:\/\/www.samlogic.net\/visual-installer\/tips\/tips-pages\/run-msi-installation-from-script\/run-msi-installation-from-script.htm\">Tip: Run MSI installation from script<\/a><\/p>\n<p><strong>See also<\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">&gt;<\/span><\/strong> <a href=\"https:\/\/www.samlogic.net\/blog\/2014\/02\/visual-installer-new-script-command-that-handles-msi-installations\/\">Visual Installer: New script command that handles MSI installations<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it is necessary to run and complete one MSI installation before the next MSI installation starts. This may happens if your software is dependent of some specific prerequisites, also during the installation. One common problem is that one component can not be installed and registered in the system, in a proper way, before some &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.samlogic.net\/blog\/2014\/02\/how-to-complete-msi-installation-1-before-2-starts\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to complete MSI installation #1 before #2 starts (when running multiple installations)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,15],"tags":[],"_links":{"self":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/2238"}],"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=2238"}],"version-history":[{"count":1,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/2238\/revisions"}],"predecessor-version":[{"id":6115,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/2238\/revisions\/6115"}],"wp:attachment":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/media?parent=2238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/categories?post=2238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/tags?post=2238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}