# Wrap Files into MSI

> Wrap files into a single MSI package for deployment via Applivery MDM — deploy custom Apps, Scripts, and installers on Windows Devices.

Source: https://docs.applivery.com/en/device-management/windows/app-management/wrapping-msi-files/  •  Last updated: 2026-03-24

**Key topics:** MSI packaging process, Using batch files to trigger PowerShell scripts, Deploying applications via MDM, MSI Wrapper tool, MSI, MDM, Applivery, Windows, PowerShell, MSI Wrapper, EXEMSI

---

**TL;DR:** Learn how to package files into an MSI for easy deployment via MDM, enabling custom application and script installations on Windows devices.

Wrapping files into a single MSI file is helpful when deploying custom applications or scripts through Applivery MDM. Once packaged, the MSI can be uploaded to Applivery and deployed like any standard application, triggering your custom scripts or installers on target Devices.

## Common use cases

Wrapping into a single MSI is useful for:

-   Installing `.exe` applications.
    
-   Installing `.msix` or `.msixbundle` packages.
    
-   Deploying custom scripts.
    

:::info
MSI files deployed through Applivery are executed with **administrator privileges** under the **SYSTEM account** in Windows. Keep this in mind when deploying scripts or applications intended for user-level execution, as they will also run in the SYSTEM context.
:::

## How it works

The most straightforward approach is to include all necessary files in a folder, along with a **batch** file (`.bat`). This batch script serves as the entry point, allowing it to call PowerShell scripts or launch installers.

**Example: Deploying** `xbox.msixbundle`

**Create a batch file (installXbox.bat) to trigger a PowerShell script**

```batch
@echo off
powershell.exe -ExecutionPolicy Bypass -File "%~dp0installXboxApp.ps1"
```

**Create the PowerShell script (installXboxApp.ps1) to install the App**

```powershell
Dism /Online /Add-ProvisionedAppxPackage /PackagePath:".\xbox.msixbundle" /SkipLicense
exit 0
```

**Place the following files in a single folder**

-   `installXbox.bat`
    
-   `installXboxApp.ps1`
    
-   `xbox.msixbundle`

## Creating an MSI with EXEMSI’s MSI Wrapper

There are multiple tools available to create MSI packages. In this guide, we’ll use **MSI Wrapper by EXEMSI** — a simple utility that offers both free and paid versions.

:::info
The free version adds a watermark to the MSI file name but does not limit functionality.
:::

### Prepare Your Files

Before wrapping, create a folder with **only** the necessary files (e.g., batch file, scripts, app packages).

:::warning
MSI files cannot execute PowerShell scripts directly. You must use a `.bat` file to trigger any PowerShell logic.
:::

In this example, the batch file is set as the **primary executable**. When the MSI is run, the batch script initiates the PowerShell script, which performs the actual installation.

**Open MSI Wrapper and click Next to begin the configuration process**

![step-1](https://www.applivery.com/wp-content/uploads/2025/08/step-1.png "step-1 | Applivery")

**Select the batch file as the executable (this is your trigger file)**

-   Make sure to **check the box** to include all files in the setup folder.
    
-   Choose the appropriate **platform architecture** (usually x64).
    

![step-2](https://www.applivery.com/wp-content/uploads/2025/08/step-2.png "step-2 | Applivery")

**Set the installation context based on your deployment needs**

-   In most cases, you’ll want to install for **all users** or **system-wide**.
    

![step-3](https://www.applivery.com/wp-content/uploads/2025/08/step-3.png "step-3 | Applivery")

**Define the application identity**

-   Enter an **Application ID** (any string of your choice).
    
-   Click to **generate a new Upgrade Code**.
    

![](https://www.applivery.com/wp-content/uploads/2025/08/step-4.png "step-4 | Applivery")

**Fill in product details manually**

-   Provide the **Product Name**, **Manufacturer**, and **Version**.
    
-   Click **Next** through the remaining steps.
    

![](https://www.applivery.com/wp-content/uploads/2025/08/step-5.png "step-5 | Applivery")

**Click Build to generate the MSI file**

-   The output MSI will be created in the **same directory** as your source files.
    

![step-6](https://www.applivery.com/wp-content/uploads/2025/08/step-6.png "step-6 | Applivery")
