Microsoft Intune can deploy Win32 apps to Windows devices. To add your own installer (MSI, EXE, or a folder with scripts), you first wrap it in a .intunewin package using the Microsoft Win32 Content Prep Tool. The tool takes a source folder (containing your setup files and an install script) and produces a single .intunewin file that you upload to Intune. The trickiest part is usually the install and uninstall logic. Handled in a script (e.g. install.ps1 and uninstall.ps1). This guide walks through downloading the tool, building the package, and adding the app in Intune with install and uninstall commands.
What You Need
Before packaging:
- Microsoft Win32 Content Prep Tool . Download from the GitHub repository or the link in Win32 app management on Microsoft Learn. Extract it and use
IntuneWinAppUtil.exe. - Source folder . A folder that contains your installer (e.g.
setup.exe,app.msi) and an install entry point (e.g.install.ps1orinstall.cmd). The tool will pack this folder into one.intunewinfile. - Install and uninstall logic . A script or command that runs the installer (and optionally uninstaller). PowerShell is often used for better error handling and logging.
Build the .intunewin Package
Run IntuneWinAppUtil.exe. The tool will prompt you for:
- Source folder . The path to the folder that contains your setup files and install script (e.g.
C:\Package\MyApp). - Setup file . The file that starts the install (e.g.
install.ps1,install.cmd, orsetup.exe). This is the entry point Intune will run. - Output folder . Where the
.intunewinfile will be created (e.g.C:\Package\Output). - Catalog folder . Usually answer No (N) unless you are creating a catalog package.
If a file with the same name already exists in the output folder, the tool can overwrite it when prompted. When the tool finishes, you will have a .intunewin file (e.g. MyApp.intunewin) ready to upload to Intune.
Add the Win32 App in Intune
In the Microsoft Intune admin center, go to Apps → Windows → Apps. Click Add → App type → Windows app (Win32). On App information, set Name, Description, and Publisher as needed. Click Next. On Program, upload your .intunewin file. Set the Install command and Uninstall command that Intune will run. These must match the entry point you specified when building the package.
Install and Uninstall Commands
If your setup file is install.ps1 and you have uninstall.ps1 in the same folder, use commands that run PowerShell from the extracted package directory. Example:
- Install command .
%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File .\install.ps1 - Uninstall command .
%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File .\uninstall.ps1
Using sysnative ensures the 64-bit PowerShell is used when the Intune agent runs in 32-bit context. Adjust the script names (e.g. install.cmd) if you use batch files. Finish the wizard: set Requirements (OS, disk, etc.), Detection rules (e.g. file or registry so Intune knows when the app is installed), Assignments, and Review + add. For full options, see Win32 app management and Microsoft Win32 Content Prep Tool on GitHub.
Summary
To create a Win32 app (.intunewin) with Microsoft Intune: download the Microsoft Win32 Content Prep Tool, prepare a source folder with your installer and an install script (e.g. install.ps1), run IntuneWinAppUtil.exe and provide the source folder, setup file, and output folder to generate the .intunewin file. In Intune go to Apps → Windows → Apps → Add → Windows app (Win32), upload the .intunewin file, set the install and uninstall commands (e.g. PowerShell calling install.ps1 and uninstall.ps1), configure requirements and detection rules, then assign the app. The install logic in your script is critical. Test it and add error handling and logging so deployments succeed and you can troubleshoot failures.