The MsiPackage constructor accepts pathToInstallerFile as the first argument. _pathToUninstallLogFile = pathToUninstallLogFile _pathToInstallLogFile = pathToInstallLogFile _pathToInstallerFile = pathToInstallerFile / /// Path to the installer file /// Path to the install log file (optional) /// Path to the uninstall log file (optional) public MsiPackage( The solution I am presenting centres around the abstraction of an MSI package into the MsiPackage class.īelow is the constructor for MsiPackage which features three separate parameters.
#Autoit msi wrapper full#
The full source code shown in this article can be found within the accompanying GitHub repository. I’ll be using C# to launch the msiexec program. This is the approach that we will take in the sections that follow.
#Autoit msi wrapper install#
Whenever you want to install MSI packages programmatically the most common approach is to interact with the msiexec program directly from your code by running it as a hidden process and specifying the appropriate set of arguments. Working with MSI packages programmatically The Windows Installer page on the Microsoft Docs website provides very detailed documentation regarding how Windows Installer works and how you can make use of its many advanced features to accomplish your goals. As per the name, Windows Installer, it only works on Windows. MSI packages are essentially database files that hold all of the binaries, dialogs and settings which are required to install a Windows program. The installer provides new capabilities to advertise features without installing them, to install products on demand, and to add user customizations. Windows Installer enables the efficient installation and configuration of your products and applications running on Windows. Microsoft Windows Installer is an installation and configuration service provided with Windows… Here are some abstracts from the Microsoft Docs on what Windows Installer is. Microsoft has since changed the official name to Windows Installer. The name ‘MSI’ comes from the original name for the technology Microsoft Installer. MSI is an installer package file format for Windows. Let’s start with a little bit of background on MSI packages.
In this article, I’m going to show you how you can silently install and uninstall applications by leveraging the msiexec command-line program using C#. On occasion, you may find the need to install or uninstall an MSI package programmatically, for example, whenever you need to automate a software installation or update. MSI packages remain a popular means of distributing applications for installation on Windows devices.