In this guide I explain how to Deploy a Win32 App with Intune. I have chosen CMtrace because this tool is useful for troubleshooting and analyzing Intune logs, and it is a perfect first example to learn how to Deploy a Win32 App with Intune from scratch.
W32 applications must always be uploaded as .intunewin package. It is not possible to simply upload an .exe file. How to create such an .intunewin package, and how to Deploy a Win32 App with Intune end to end, I will show you now.
Table of contents
Prepare installation sources
- Download the CMtrace installation file from the following link: System Center 2012 R2 Configuration Manager Toolkit

- Install the MSI. After running the MSI you can find the sources in C:\Program Files (x86)\ConfigMgr 2012 Toolkit R2\.

- Copy the CMTrace tool from the ClientTools folder into a temp folder e.g. C:\temp\cmtrace\sources

Install the Microsoft Intune Win32 App Packaging Tool
- Download the tool from the following Github repo: microsoft/Microsoft-Win32-Content-Prep-Tool

- Extract the folder and copy the IntuneWinAppUtil.exe to the temp folder.

Creating the installation and uninstallation script
Create two text files with the name install.bat and deinstall.bat

- Add the following content to the scripts:
install.bat
mkdir c:\windows\_Tools
Xcopy cmtrace.exe c:\windows\_Tools /e /i
deinstall.bat
del c:\windows\_Tools\cmtrace.exe
Hint: The path can of course be chosen as you like
Creating the Intunewin file
- Open PowerShell as administrator and navigate to the temp folder.
- Enter the following command:
Set-ExecutionPolicy Bypass

- Enter the following Command:
.\IntuneWinAppUtil -c C:\temp\cmtrace\sources\ -s C:\temp\cmtrace\sources\install.bat -o C:\temp\cmtrace
- -c = Folder of the setup files
- -s = Setupfile
- -o = Output folder for the .intunewin file

- Now the intunewin installation file is created

Deploy a Win32 App with Intune in the admin center
With the package ready, it is finally time to Deploy a Win32 App with Intune from the Microsoft Intune admin center. Follow the steps below to create the application.
- Navigate to Apps -> Windows
- Click Add
- Select Windows app (Win32) as App type

- Click Select app package file
- Click upload and select the .intunewin file
- Click OK

- Give the application a name and customize the app information.
- Click Next

- Enter the install.bat and deinstall.bat as install/uninstall command
- Change the Device restart behavior to No specific action
- Click Next
Hint: If you use a PowerShell script insert the following command:
%windir%\system32\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -windowstyle hidden -file "File.ps1"

- Select 32-bit and 64-bit as Operating system architecture
- Select a minimum OS Version
Hints: If you want to specify further requirements, such as minimum free disk space, you can do this in this step.
It is also possible to specify a file, a registry value or a script as a requirement.

- Select Manually configure detection rules as Rules format
- Click Add
- Select File as Rule type
- Enter your file path and the file name. The detection method is File or folder exists
- Click Next

- We can skip the dependencies and supersedence step, click next.
Add an assignment. Add a group as required, the app will be installed automatically. If you select available the app will only be offered in the Company Portal for installation. This assignment step is what makes you actually Deploy a Win32 App with Intune to your devices.

When you click on one of the hyperlinks behind the group you still have possibilities to make some additional configurations. E.g. the download type for delivery optimization (Foreground or Background) or you can also hide the installation notifications.

- Click Next > Create
That is everything you need to Deploy a Win32 App with Intune. For more background on packaging requirements, see the official Microsoft Learn Win32 app management documentation, and check out my other Intune guides on jannikreinhard.com for more deployment walkthroughs.
Common pitfalls and troubleshooting
A few mistakes come up again and again when you Deploy a Win32 App with Intune. The most common one is a detection rule that never matches the real install location. If your install command copies the file to C:\windows\_Tools, the detection rule must point to exactly that path, otherwise Intune keeps reporting the app as “not installed” and retries the deployment in a loop.
The second classic issue is a wrong working directory in your batch script. Win32 apps run from a temporary cache folder, so always use absolute paths or change into the script directory first. Finally, if the app installs but the user sees nothing, check the assignment notification settings and the install behaviour (System vs. User) so the deployment runs in the context you expect.
Stay healthy, Cheers
Jannik
[…] to create an Intune Application (.intunewin file) I have explained in detail in my blog using the CMtrace example. You can also find more information in the Microsoft […]
[…] Windows app (Win32) […]
[…] Download the intune.win file from my repository or create a own intune.win file based on the files in my repository. How to create a intune.win file is explained in this blog post. […]
[…] How you can create such a file and how you can create a new Win32 app in Intune I describe in the this blog post. But now I want to explain Start how the local app installation process […]
[…] Win32 app […]
Download link broken