Deploy a Win32 App with Intune (Cmtrace)

In this blog post I explain how to deploy a Win32 app via Intune. I have choos CMtracert because this tool is useful for troubleshooting and analyzing Intune logs.

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 i will show you now.

Prepare installation sources

  • 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\soureces

 

Install the  Microsoft Intune Win32 App Packaging 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

Creating the Win32 App in intune

  • Navigate to Apps -> Windows
  • Click Add
  • Select Windows app (Win32) as App type
  • Click Select app package file
  • Click upload und 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/unistall command
  • Change the Device restart behavior to No specific action
  • Click Next

Hint: If you use an 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 Operation 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 depentencies and supersedence step click next.

Add an assignment. Add a group a required, the app will be installed automatically. If you select availale the app will only be offered in the Company Portal for installation.

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

  • Click Next > Create

Stay healthy, Cheers
Jannik

6 thoughts on “Deploy a Win32 App with Intune (Cmtrace)

Comments are closed.