The Win32App feature is a powerful method of deploying applications. Like SCCM applications, you can basically deploy any application, or even content, regardless the file extension. As long the application has install and uninstall scripts, it can be deployed.

In this post we deploy cmtrace.exe directly on the user desktop

Main steps when using win32apps in Intune are:

  • Create intunewin package
  • Create Intune App
  • Deploy App
  • Validate de deployment
  • Create the intunewin package

Create intunewin package

  • Create a new folder and copy cmtrace.exe to that location. In my example I created c:\pkg\cmtrace
  • Create the 2 install and unistall scripts as follows. The below scripts are one of the most simple scripts you can create. I use them to highlight the fact that the 2 scripts can be as simple as one line scripts that copy or delete a file or 10000 lines PS scripts that performs checks, sets registry keys, install dependencies, etc.

  • Install : copy cmtrace.exe %userprofile%\desktop
  • Uninstall : del %userprofile%\desktop\cmtrace.exe
  • Download the IntuneWinAppUtil tool to c:\pkg folder
  • Run the file and specify the source folder and the cmtrace.exe file as in the image below

Now, the intunewin file is ready to be uploaded to Intune

Create Intune App

  • Intune -> Client Apps -> Apps -> Add
  • For app type select Windows app (Win32)
  • For app package file add the newly created intunewin file , click OK
  • Change the Name to Cmtrace, add description and publisher and click on
  • In Program blade add the install.cmd to install command and to Uninstall command.
  • Change install behavior to user
  • OS architecture select both
  • Minimum OS Win 10 1607 and click OK

  • For detection rules select manually configure detection rules, click add
  • For rule type select File
  • Set path to %userprofile%\desktop
  • Set File or folder cmtrace.exe
  • Set detection method to File or Folder exists and click OK

  • Click OK and then Add

Wait till your app gets ready

Deploy App

Now it is time to deploy the app

  • In the App blade, click on the newly created Cmtrace application
  • Click Assignments and Add Group

  • For Assignment type select required
  • Click Included groups then in the new blade Select groups to include
  • Click the desired group. In my case I created CoreApps groups and added my user to this group

  • Click Select, OK, OK and Save the Assignment
  • Let’s sync up the device for Intune to check for new apps and polices
  • Click Intune -> Devices –> All Devices
  • Select your device and click Sync

  • Click yes in the notification window

In a few minutes the application has been deployed as seen below

Validate Deployment

Once the deployment is initiated, the computer will notify that “Your IT department required changes …”. Soon the cmtrace.exe file will appear on your desktop

Now is time to put cmtrace to good use. Go to ProgramData\Microsoft\IntuneManagementExtension\Logs

The logs will show that Cmtrace app has been processed.