--- title: "MSI Wrapper" section: "Windows" sectionSlug: "windows-hardening" sourcePath: "src/windows-hardening/windows-local-privilege-escalation/msi-wrapper.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/windows-hardening/windows-local-privilege-escalation/msi-wrapper.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0" --- # MSI Wrapper MSI Wrapper can package an executable or script as a Windows Installer (`.msi`) file. Download and start the free edition, then select the executable to package.[[3]](#references) To run a sequence of commands, select a `.bat` file as the input rather than packaging `cmd.exe`.[[1]](#references) ![Selecting the source executable or batch script in MSI Wrapper](https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/188de82beb54e70956b2952367a0af91d26758b8/src/images/image%20%28417%29.png) Configure the execution context and other installer properties carefully: ![Configuring the application ID and security context in MSI Wrapper](https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/188de82beb54e70956b2952367a0af91d26758b8/src/images/image%20%28312%29.png) ![Configuring installer properties in MSI Wrapper](https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/188de82beb54e70956b2952367a0af91d26758b8/src/images/image%20%28346%29.png) ![Reviewing the MSI Wrapper build settings](https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/188de82beb54e70956b2952367a0af91d26758b8/src/images/image%20%281072%29.png) These values can be changed when packaging a custom binary. Continue through the remaining wizard pages and select **Build** to generate the installer.[[1]](#references) > [!WARNING] > Creating an MSI does not by itself grant elevated privileges. Whether installation is elevated depends on Windows Installer policy, package context, and user authorization. Microsoft warns that enabling `AlwaysInstallElevated` for both the user and computer lets non-administrators install packages with system privileges.[[2]](#references) ## References - [1] [MSI Wrapper documentation - Getting started](https://www.exemsi.com/documentation/getting-started/) - [2] [Microsoft Learn - Installing a package with elevated privileges for a non-admin](https://learn.microsoft.com/en-us/windows/win32/msi/installing-a-package-with-elevated-privileges-for-a-non-admin) - [3] [MSI Wrapper - Download](https://www.exemsi.com/download/)