Monday, February 13, 2023

PAckaging EXEs in Intune using the Win32 Content Prep Tool (Intunewin Files)

 

Deploying .EXE applications via Intune requires you to use the Microsoft Win32 Content Prep Tool to configure the app as a intunewin file that you can then upload into Intune to be deplyoed.

You can also use this method to package other executables or even PowerShell scripts.

DEFINE YOUR SOURCE AND DESTINATION FOLDERS

Before you begin, setup a local folder on your C: drive for the application like below. 

  • Create an Input folder to hold your .exe file and any resources you need packaging alongside it. 
  • Create an Output folder for the final package you will create to upload into Endpoint Manager. 

The Win32 Content Tool can sit in the root folder.

Python will be used as an example which is in the Input folder. 

PACKAGING THE APPLICATION

Open PowerShell in the directory of your app, in the example case it's C:\App\Python. You can open PowerShell quickly under File then Open Windows PowerShell to open it in the current directory. 

Run the IntuneWinAppUtil.exe tool which will ask for the source folder (Your input folder), the setup file (your exe file) and the output folder path. Say No to the Specify Catalog Folder option.

It will take a few seconds to complete the process. 

It will then package that exe you defined in the source folder into an intunewin file within the Output folder. 

UPLOADING THE PACKAGE TO INTUNE

On Endpoint Manager, you want to select Add under the Applications section then pick the app type, Windows app (Win32). 

Upload the intunewin file.

Set the meta data for the app, the name, a description, publisher and a category. 

You need to define the install and uninstall commands. This varies from app to app so do a bit of Googling to find out how to install it via the command line silently. You can include a PowerShell script in your package and reference that as the uninstall if you wanted to be creative for tricky software.

The ones below are from the Python website, some apps provide details on silent installs if it's not the typical /q or /quiet. 

Set the requirements the devices must meet to allow the software to be installed. This can allow you to fine tune where the application can be installed to prevent incompatible devices getting the software.

Detection rules is how Intune can tell if the app is installed or not. The example below checks if a file exists in C:\Windows that is installed during the setup of Python.

You can fly through the rest. You need to then target the application towards a user group or device group. Anything set under Required will force the software to install. I have set it to a user group under the Available for enrolled devices which allows any users in said group to see the application in the Company Portal app and download it if they wish to do so.

No comments:

Post a Comment