Silent Installation for KingswaySoft Toolkits

29 August 2024
KingswaySoft Team

One of the most exciting steps after deciding to use our solution for your integration needs is properly installing our software in your environment. Generally speaking, this can be done by first downloading the software from our website, then extracting the installation package from the saved zip file, and launching the installer by executing the .msi file. This is generally a manual process and requires human intervention. When doing so, you would be working with the installer interactively and would need to go through various screens and prompts until completion. If your installation involves only a small number of machines, this process should work perfectly fine. However, in cases where the installation is done by an Admin, based on policy, or all installations are required to be fully automated using system provisioning scripts, you will have to look for the unattended silent installation approach.

To achieve this, we can leverage the Msiexec command in the Windows system to launch the installation of an MSI (Microsoft Software Installer) file from the command line. In this blog post, we will go through the process of working with this command to demonstrate how easy it is to set up, so your installations can be performed without required user interaction.

Highlight of Benefits When Silently Installing

  • The process takes less time overall since there is no user interaction with prompts or license acceptance. This is especially true as the number of users or the number of toolkits each requires increases.
  • There would be no user interface apart from a bar to indicate the current progress. This helps to ensure a consistent installation experience between machines.
  • The installation may be optionally logged for greater visibility of the installation process.

To begin, you would first download the toolkits needed and have the MSI file saved in a known location in your file system. In this blog post, we will install our HubSpot toolkit as an example; the same procedure can be applied to any other toolkit desired making sure the file path is correct.

Example of the Command and an Overview of the Parameters Set

msiexec /i D:\Users\test.user\test\IntegrationToolkit-HubSpot-x64.msi /qn /lv D:\Users\test.user\test\logs\file.log ACCEPT_EULA=1

1. msiexec will call the Msiexec executable program to interpret the MSI file you want to work with.

2. The parameter we include in the command; in this case /i for a normal installation.

3. The path to the installer file we downloaded before. Please note that adding the full path is recommended over a relative path as you may come across behaviors such as FileNotFound, as an example.

4. Additional parameter we would include: /qn to specify there is no UI during the installation process.

Optionally, you may log into a specific file to capture the details during the installation process. This may be appended as it is shown in the above snippet.

5. The parameter /lv in our example provides logging information, specifically verbose output, which provides more information about the installation.

6. The full path to the log file where the information will be written to.

7. Lastly, public properties may be included in the command and they come in the form of PROPERTY_NAME=Value. Our component only requires to explicitly state the acceptance of the EULA License agreement; and when set to 1 is True.


As shown in the image below, the log will also indicate whether the process was successful. This may be used as an alternative to checking if the existing software is installed under the Control Panel, or if the License Manager is present when searched.

Upgrading Toolkit to Newer Version or Uninstalling 

The process for upgrading an existing toolkit is identical to the initial installation, as the installer checks for an older version and replaces it with the current one. However, as a best practice, we generally recommend performing a full uninstall before installing a different version. If you have an existing toolkit installed and need to use an earlier version, you would also need to uninstall the current version before running the installation command above. The uninstall command is nearly identical to the installation command, with the only change being the /x parameter, which lets the command know the MSI file will be used to uninstall the software. Shown below is an example of this command.

msiexec /x D:\Users\test.user\test\IntegrationToolkit-HubSpot-x64.msi /qn /lv D:\Users\test.user\test\logs\file.log

Conclusion

In this blog post, we have shown that installing/upgrading/uninstalling our toolkits can be easily done using the Msiexec command. The process is straightforward, and once set up, it can scale for both number of toolkits and number of machines. This approach saves time and ensures consistent installation across all machines, as there is no user interaction involved. You can apply this method to any of our toolkit to give you greater control over your installation process.

We hope this post was helpful and provided helpful insights into working with the Msiexec command and with our toolkits.

Archive

Tags