How to Package and Deploy Windows Applications with Intune
You cannot just upload your app’s installation file directly to Intune, it must be packaged using a small command-line tool: the IntuneWinAppUtil. This archives and compresses the installation to a .intunewim file, and that’s what you upload.
This post will guide you through the process of getting your Win32 app ready for Intune upload (packaging) and configuring it for client installation (deploying)
Win32 applications are your traditional Executable/MSI apps which are then wrapped into intunewin format using the Win32AppGui tool from Microsoft.
I’ve created this folder layout:
One thing to note here is that the packaging tool will grab every file in the Source directory you point it to, so make sure that folder only has source files in it.
The 7zip folder is where the installer is.
The Intunewin folder is where we will store the Intunewin file.
Packaging the app
In the example for this post, I’ll be working with 7-Zip. This only has one file, but if your app installer has multiple files (e.g. subfolders), that is supported too.
- Place your installation file(s) in a dedicated folder. The entire contents of this folder will be archived, so make sure it includes everything you need, but nothing more.
- From the command prompt, run IntuneWinAppUtil.exe, which is the Win32 Content Prep Tool. In the command prompt window, you are prompted for four pieces of info:
- The source folder (created above)
- The setup file (the file that begins app installation when executed)
- An output folder (where the .intunewim file is saved)
- Whether or not you need to specify a catalog folder (only needed if deploying to Windows 10 S mode)
After you complete the last prompt, a stream of output will fill the screen; the last line reporting the app has been packaged.
Deploying the app
- Navigate to Intune Admin Portal and then select Apps > Windows > Add:
2. Choose the app type Windows app (Win32) and click Select:
3. Select your Intunewin file and Ok:
4. Populate any fields on this page. You can also add your icon at the bottom to appear in Company Portal and click Next:
5. On the Program page, you need to enter install and uninstall commands for your app. If you uploaded an MSI file, these are usually prepopulated for you by Intune using the msiexec parameters to do both actions silently.
The install behavior is a key option to get right. Generally, you want to choose System, as this executes the installation with administrative rights. However, there may be circumstances you need to execute in the user context. Click Next:
6. Add any app requirements (64-bit for example). I also usually add the earliest supported Windows OS version here, we don’t want unsupported versions. Click Next:
7. For Intune to know whether or not the app is installed, you need to include detection rules. These are mandatory because, without them, Intune wouldn’t know when to stop trying to install the app, or how to report success/failure. Use the manually configure detection rules and use the MSI rule type. This queries the MSI product code, which for MSIs is a unique identifier for the app. For MSI uploads, it’s populated automatically.Click Ok and Next:
8. Dependencies – If the application requires something else to be installed first, add that here. You can also specify whether to force an install if it is missing. Click Next:
9. The next screen gives Supersedence options. If this is an updated application, select the previous version and you can tell it whether to in-place upgrade or remove and re-install. Click Next:
10. Here, we will deploy the app using Intune by assigning them to All Users group. You can choose how you want to assign the app to users and devices, and there are three options:
- Required: The app is installed on devices in the selected groups.
- Available for enrolled devices: Users install apps from the Company Portal app or the Company Portal website.
- Uninstall: The app is uninstalled from devices in the selected groups.
From the above list of options, select Available for enrolled devices and add the group, because we want the app to be available for installation in Company Portal. Click Next:
11. On the final page for review + create, you can confirm the settings you’ve entered. Hitting create will then upload the application.
After some time, the Company Portal will be installed on your devices: