In Part 1, I had a look at all the available app types that Intune offers, and described how – at least until we see Windows Package Manager integration – that the Windows app (Win32) type is probably the most flexible and powerful of the available app types. Sure, the Microsoft 365 Apps option has a nice wizard and might make more sense to use for deploying Office desktop apps to your fleet of managed devices, but I can’t tell you how many issues I see posted on social media describing how that app type – especially when combined with other app types such as Win32 apps – creates all kinda of unexpected delays and failures. That is why, in this post, I will look at the Microsoft Win32 Content Prep Tool, and in Part 3, provides examples such as using this to deploy M365 Apps in a more reliable way. But let’s not get ahead of ourselves.
What is the Win32 Content Prep Tool?
The Content Prep Tool is a Microsoft tool available from GitHub, that allows you to process any folder containing Windows Desktop (Classic) applications and installers, and convert the application installation files into the required “*.intunewin” file format needed for Win32 app deployment. To the naked eye, it works similar to grabbing a folder containing a multi-file installer and zipping it up into a single archive. The big difference here, is the Content Prep Tool also detects the parameters required by MEM to determine the application installation state, such as identifying the Package Code value for an MSI setup, as well as taking care of the encryption and hash steps to ensure the package is complete and hasn’t been tampered with. After you use this tool on your apps, you will be able to upload and assign the apps in the MEM console, using the Windows app (Win32) option.
What are the Win32 Content Prep Tool Prerequisites?
To use Win32 app management, you must meet the following:
- The client PC must run Windows 10 (1607) or later
- The SKU of Windows on the PC must be Enterprise, Education, or Pro versions
- The PC must exist in Azure Active Directory (Azure AD or AAD) and be enrolled. Specifically, the device state must be one of AAD registered, AAD joined (AADJ), or Hybrid AAD Domain joined (HAADJ).
- The Intune management extension must be present on the devices es that are Azure AD registered, Azure AD joined, hybrid domain joined, and group policy enrolled.
- The application size is under 8 GB per app. This can be extended if needed but requires a support case with Microsoft to enable your tenant.
If you meet the requirements, the next step if to obtain and use the Microsoft Win32 Content Prep Tool.
Obtaining the Win32 Content Prep Tool
You can download the Microsoft Win32 Content Prep Tool from GitHub as a .zip file. The zipped file will contain a folder named Microsoft-Win32-Content-Prep-Tool-master, beneath which you will find the prep tool, the license, a readme, and the release notes. To get the latest version.
- Navigate to the Content Prep Tool GitHub project site:
- Click the green Code button, then select Download ZIP from the menu. A file named Microsoft-Win32-Content-Prep-Tool-master.zip file should automatically start to download.
- Locate the Zip file in your Downloads folder, then extract it. Open the Microsoft-Win32-Content-Prep-Tool-master folder that is inside the parent folder.
- Ensure that your packaging PC has .NET Framework 4.7.2 installed, as this tool is a .NET Console application and needs these runtime files.
That’s it. You now have the Win32 Content Prep Tool. Now, we need to do some basic preparation.
Preparing and Using the Win32 Content Prep Tool
The important part here is that the Microsoft Win32 Content Prep Tool “zips” all files and subfolders when it creates the intunewin file, so we need to be sure that we use clearly separate folders for the input and output locations, and be careful to keep the Microsoft Win32 Content Prep Tool separate from the installer files and folders we are capturing. Obviously, we don’t want to include the tool or other unnecessary files and folders in the intunewin file. Setup doesn’t take much, I simply recommend:
- Create a folder on the local disk, or a network share, with a useful name like Packages.
- Within the Packages folder, create a folder named In, and another named Out. These can be anything you like, this is just an example.
- Copy the contents of the prep tool Zip file to the root of the Packages folder. You only need the IntuneWinAppUtil.exe file, but it won’t hurt having all the included files there.
- Review the Microsoft License Terms for Microsoft Win32 Content Prep Tool. Print and retain a copy of the license terms for your records. By downloading and using Microsoft Win32 Content Prep Tool, you agree to such license terms. If you do not accept them, do not use the software.
And now we’re ready to use the tool. For each application, to further help isolate it an ensure we don’t accidentally capture any unnecessary files, create a folder within the In folder and put all the application files, scripts, and sub-folders beneath that.
When running the IntuneWinAppUtil.exe, you can provide command line parameters if you would like to automate the process, but you are not required to: Simply executing the tool will guide you to input the required parameters step by step.
The command line parameters that are available, are:
-h Displays the application help -v Displays the version (Only available starting version 1.8.2) -c Setup folder. All files in this folder will be compressed into intunewin -s Setup file (e.g. setup.exe or setup.msi). -o Output folder for the generated intunewin file. -a Catalog folder/files. Needed for use with Win10 S mode. -q Quiet mode. If the output file already exists, it will be overwritten.
An example of command-line usage might be:
IntuneWinAppUtil -c “C:\Packages\In\SomeApp” -s “setup.exe” -o “C:\Packages\Out” -q
Example: Capturing 7-Zip via MSI
In this example, I will demonstrate using the manual (not command-line) method for generating and uploading a 7-Zip package as a Win32 app in MEM. Specifically, I will be using the MSI version of 7-zip, because it provides better options for detection method, while also providing a simple example of the extended information gathering by the content prep tool.
- Visit the 7-Zip download page, locate the 64-bit MSI version, and download it:
- Create a new folder for this project within the In folder we prepared earlier. In this case, I will use a folder named 7-Zip v22.01 and put the files I need into that folder.
- Move the 7-Zip MSI from your downloads (in my case, named 7z2201-x64.msi) into the new 7-Zip v22.01 folder we created.
- Now run the IntuneWinAppUtil.exe tool from the root of the Packages folder. No command line arguments needed.
- The first prompt will be “Please specify the source folder”. For this we’ll add the full path to our new 7-Zip folder, which is “C:\Packages\In\7-Zip v22.01”, then press Enter.
- The second prompt will be “Please specify the setup file:”. For this, I will enter the MSI name, which is “7z2201-x64.msi”, then press Enter.
- The third prompt will be “Please specify the output folder:”. Here, we will enter the path to our Out folder, which is “C:\Packages\Out”, then press Enter.
- Finally, we will be asked “Do you want to specify a catalog folder (Y/N)?”, for which we will answer N (case doesn’t matter) and press Enter. If you are providing Win32 applications to devices running in Windows 10 S Mode (or SE), this will be a requirement, but is beyond the scope of this post.
- The Content Prep Tool will now scan the source folder and setup file, compress the source folder, encrypt the contents, generate a SHA256 hash for the package, then export the result to the Out folder. The resulting file name is “7z2201-x64.intunewin” though you can now rename this to anything you like.
We are now ready to upload this package via the MEM console and complete the rest of the application configuration, using that awesome Windows app (Win32) option. Join me in Part 3, when I look at how we are managing the deployment of Microsoft 365 Apps using the Content Prep Tool and Intune Win32 app type to improve deployment reliability.
You must be logged in to post a comment.