Skip to content

Latest commit

 

History

History
269 lines (242 loc) · 18.6 KB

MSI.md

File metadata and controls

269 lines (242 loc) · 18.6 KB

MSI Files

.msi files This document gathers resources related to .msi files (aka. Windows installers).

MSI ("Microsoft Silent Installer") files are database files (with components and features) which are executed with the help of msiexec.exe. MSI files are the current recommended method for installations on Microsoft Windows.

🔎 Here are two discussion feeds for people interested in a deeper insight :

MSI are Databases

In case we are suspicious about a Windows installer we can run the Windows command msiexec 1 to extract the files of the .cab archive(s) embedded in the .msi file (see also the WiX element media).

🔎 Visit Microsoft's page Released Versions of Windows Installer to find the correspondance between Windows installer versions and MS Windows OS versions. For instance msiexec has version 5.0 on MS Windows 7 and newer :

> powershell -c "(Get-Item C:\Windows\System32\msiexec.exe).VersionInfo.ProductVersion"
5.0.22621.1

Windows Installers

The following table gives a small overview of Windows installers available for open-source (or free) software products 2 :

MSI file Checksum Signed Name Destination folder (default)
amazon-corretto-11.0.16.8.1-windows-x64.msi MD5 Yes (a) Amazon.com Services LLC C:\Program Files\Amazon Corretto\
calibre-64bit-6.2.1.msi No Yes (b) Kovid Goyal C:\Program Files\Calibre2\
cmake-3.24.0-windows-x86_64.msi SHA256 Yes (a) Kitware, Inc. C:\Program Files\CMake\
cppcheck-2.8-x64-Setup.msi No No n.a. C:\Program Files\Cppcheck\
GitHubDesktopSetup-x64.msi No
(#8730)
Yes (a) GitHub, Inc. C:\Program Files(x86)\GitHubDesktop\
go1.19.windows-amd64.msi SHA256 Yes (a) Google LLC C:\Program Files\Go\
java-1.8.0-openjdk-1.8.0.312-2.b07.dev.redhat.windows.x86_64.msi No Yes (b) Red Hat, Inc. C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.312-2
node-v16.16.0-x64.msi SHA256 Yes (c) OpenJS Foundation C:\Program Files\nodejs\
OpenJDK8U-jdk_x64_windows_hotspot_8u312b07.msi SHA256 Yes (c) Eclipse.org Foundation, Inc. C:\Program Files\Eclipse Adoptium\jdk-8.0.312.7-hotspot\
OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.msi SHA256 Yes (c) Eclipse.org Foundation, Inc. C:\Program Files\Eclipse Adoptium\jdk-11.0.13.8-hotspot\
pandoc-2.19-windows-x86_64.msi No Yes (c) John MacFarlane C:\Program Files\Pandoc\
putty-64bit-0.76-installer.msi MD5/SHA1
SHA256/SHA512
Yes (c) Simon Tatham C:\Program Files\PuTTY\
rust-1.57.0-x86_64-pc-windows-msvc.msi GPG No n.a. C:\Program Files\Rust stable MSVC 1.57\
sapmachine-jdk-11.0.14-ea.7_windows-x64_bin.msi SHA256 No n.a. C:\Program Files\SapMachine\JDK\11\
sbt-1.7.1.msi SHA256 No n.a. C:\Program Files(x86)\sbt\
scala-2.13.8.msi
(Lightbend's installer)
No No n.a. C:\Program Files (x86)\scala\
scala-2.13.8.msi
(our installer)
MD5/SHA256 Yes
(self-signed)
Stéphane Micheloud C:\Program Files\Scala 2\
scala3-3.1.0.msi
(our installer)
MD5/SHA256 Yes
(self-signed)
Stéphane Micheloud C:\Program Files\Scala 3\
TortoiseGit-2.13.0.1-64bit.msi RSA(d) Yes (e) Open Source Developer C:\Program Files\TortoiseGit\
(b) Signer: Symantec SHA256 TimeStamping Signer - G3.
(c) Signer: Sectigo RSA Time Stamping Signer #2.
(e) Signer: Certum EV TSA SHA2.
 

Footnotes

[1] Administrative Installation

With option /a the Windows command msiexec performs a so-called administrative installation. In the following we give 4 examples to illustrate its usage.
> where msiexec
C:\Windows\System32\msiexec.exe
 
> msiexec /a <msi_file_path> /qn TARGETDIR=c:\Temp\unpacked

🔎 Options are:

  • /a - run administrative installation sequence.
  • /qn - run completely silently (alternatively: /qb! for semi-silent).
  • /l*v "Extract.log" - create verbose log file.
  • TARGETDIR=<dir_path> - extract files into <dir_path> (top level folder).
We first extract the contents of scala-2.13.8.msi - the official Scala 2 Windows installer - renamed here to scala-2.13.8_epfl.msi to avoid naming collision with our own Scala 2 Windows installer :
> msiexec /a scala-2.13.8_epfl.msi ^
/qn TARGETDIR=c:\Temp\unpacked
  > tree /f C:\Temp\unpacked | findstr /v /b [a-z] │ scala-2.13.8_epfl.msi └───PFiles └───scala ├───api (600 MB !) ├───bin ├───doc └───lib

🔎 We observe that 3 files/directories are missing compared to the corresponding Zip archive scala-2.13.8.zip, namely the two text files LICENSE and NOTICE and the subdirectory man\.

Now we look at the contents of our Scala 2 Windows installer :
> msiexec /a scala-2.13.7.msi ^
/qn TARGETDIR=c:\Temp\unpacked
  > tree /f C:\Temp\unpacked | findstr /v /b [a-z] │ scala-2.13.8.msi └───PFiles └───Scala 2 │ LICENSE │ NOTICE ├───api (600 MB !) ├───bin ├───doc ├───lib └───man
As next example we look at the contents of the sbt Windows installer named sbt-1.9.3.msi :
> msiexec /a sbt-1.9.3.msi ^
/qn TARGETDIR=c:\Temp\unpacked
  > tree /f c:\Temp\unpacked | findstr /v /b [a-z] │ sbt-1.9.3.msi └───PFiles └───sbt │ LICENSE │ NOTICE ├───bin │ sbt │ sbt-launch.jar │ sbt.bat │ sbtn-x86_64-pc-win32.exe └───conf sbtconfig.txt sbtopts

🔎 We observe that the two experimental thin clients sbtn-x86_64-apple-darwin (MacOS executable) and sbtn-x86_64-pc-linux (Linux executable) are present in Zip file sbt-1.9.3.zip but not in MSi file sbt-1.9.3.msi; that's fine !

Finally we extract the contents of the Java 11 Windows installer named OpenJDK11U-jdk_x64_windows_hotspot_11.0.16_8.msi :
> msiexec /a OpenJDK11U-jdk_x64_windows_hotspot_11.0.16_8.msi ^
/qn TARGETDIR=c:\Temp\unpacked
  > tree /f c:\Temp\unpacked | findstr /v /b [a-z] │ OpenJDK11U-jdk_x64_windows_hotspot_11.0.16_8.msi └───Eclipse Adoptium └───jdk-11.0.16.8-hotspot │ NOTICE │ release ├───bin ├───conf ├───include ├───jmods ├───legal └───lib

[2] Software Distributions

Software distributions can be installed in several ways, not necessarily using MSI files, for instance :
Software distribution Zip archive (a) Setup program (b) Package manager
Apache Maven 3.9 x
Bazel 6.3 x x
Deno 1.x x Homebrew, Chocolatery, Scoop, Cargo
Gradle 7.6 x x SDKMAN (c)
Julia 1.6 x x
LLVM 15 x
Python 3.10 x
R 4.2.2 x (d)
VSCode 1.75 x x
WiX Toolset 3.11 x x
(a) Sometimes both .zip and .tar.gz archives.
(b) Windows executable (.exe extension).
(c) On Windows SDKMAN (written in Bash) requires WSL, Cygwin or MSYS+MinGW.
(d) Signer: Symantec SHA256 TimeStamping Signer - G3.
 

[3] MSI Resources

  • Elastic Windows Installer - Windows installers for the Elastic stack.
  • 👍 InstEd - a free MSI editor built for professionals.
  • lessmi - a tool to view and extract the contents of an Windows Installer.

mics/December 2023