How to deploy a Win-32 app with Microsoft Intune!

MVP

 

Dear Microsoft Intune Friends,

 

Deploying a .msi app is a more or less simple matter in most cases. However, if you need to deploy an .exe app, it gets a bit more complicated. It takes a little art and science to deploy the app.

What exactly do I mean by that? Well, an .exe app can't just be uploaded to the Intune portal and then deployed. Before we even get started with Intune, we need to figure out how to install and uninstall the Win32 app. This means we need a machine (identical to the machines you manage with Intune) to perform a test install and uninstall on. The challenge here is that installation and uninstallation are performed "seamlessly", more precisely without interaction of a person.

 

I use Notepad++ as an example in this article. The installation and uninstallation of Notepad++ works something like this:

 

Installation (/S for silent - case sensitive):
npp.8.1.5.Installer.exe /S

 

We need the complete program path later in Intune.

"C:\Program Files (x86)\Notepad++\notepad++.exe"

 

The uninstallation works like this:
"C:\Program Files (x86)\Notepad++\uninstall.exe" /S (/S for silent - case sensitive)

 

With this knowledge in hand, we can move forward. No, not in Intune but on our local computer. I have already downloaded the executable file for the test installation. We cannot work with the .exe file in Intune, we have to make this Intune compatible.

 

For this we use the Microsoft Win32 Content Prep Tool from Microsoft (Thanks to the Microsoft team).

https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool

 

Now start a command prompt with elevated privileges and navigate to the IntuneWinAppUtil.exe file. Now you need the complete path to your Notepad++ .exe file and a path for the "packaged" Intune version. It may look something like this:

IntuneWinAppUtil.exe -c C:\Temp\NotepadPP -s C:\Temp\NotepadPP\npp.8.1.5.Installer.exe -o C:\Temp\NotepadPP_Packed -q

 

-c <setup_folder> Setup folder for all setup files. All files in this folder will be compressed into .intunewin file. Only the setup files for this app should be in this folder.

-s <setup_file> Setup file (e.g. setup.exe or setup.msi).
-o <output_file> Output folder for the generated .intunewin file.
-q is specified, it will be in quiet mode.

_Intune_0.JPG_Intune_1.JPG

 

Now we move on to the Microsoft Endpoint Manager Admin Center.

https://endpoint.microsoft.com

 

Navigate to the Apps.

_Intune_2.JPG

 

Select the platform in my example Windows.

_Intune_3.JPG

 

Select Add.

_Intune_4.JPG

 

Select Windows app (Win32).

_Intune_5.JPG_Intune_6.JPG_Intune_7.JPG

 

Now locate your "packaged" Notepad++ file.

_Intune_8.JPG_Intune_9.JPG

Enter some information about the app (especially the required fields).

_Intune_10.JPG

 

Now our collected information on installation and uninstallation comes into play. If your app still has special return codes enter them as well.

_Intune_11.JPG

 

Select operating system and and version, the rest is optional.

_Intune_12.JPG

 

Now we need to configure the dection rules. We don't want Notepad++ to be installed on a
system where Notepad++ is already present.

_Intune_13.JPG_Intune_14.JPG_Intune_15.JPG_Intune_16.JPG

 

There are no dependencies in my example.

_Intune_17.JPG

 

This app does not replace any existing app.

_Intune_18.JPG

 

Now you can specify who should receive this app I choose "All Devices" and "All Users".

_Intune_19.JPG_Intune_20.JPG_Intune_21.JPG

 

Navigate to a system in Intune and click Sync. This is simply to force the installation of the app.

_Intune_22.JPG

 

If you have the possibility to force the synchronization on the physical one, you can check faster if the installation works.

_Intune_23.JPG

 

Now wait a few minutes and Voila the app is there!!!

_Intune_24.JPG

 

Sure, that wasn't the huge highlight now. I just wanted to share my experience. I hope this article was useful.

 

Thank you for taking the time to read the article.


Best regards, Tom Wechsler

 

P.S. All scripts (#PowerShell, Azure CLI, #Terraform, #ARM) that I use can be found on github! https://github.com/tomwechsler

2 Replies

Hi, @TomWechsler Thank you for your post, the instruction is very clear and helpful. Can I check with you, regarding the install command and the uninstall command? Here's my post yesterday https://techcommunity.microsoft.com/t5/microsoft-intune/intunewin-file-install-command-and-uninstall...  And today I found your post.

 

Trying to find out and create a standardise INTUNEWIN file installation guide, for all the diff .exe software. 

 

Install command.

Appreciate if you can guide me what's the difference between the below 1 & 2.

1) msiexec /i "Softwarename.exe" /q

2) Softwarename.exe /sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES

 

I do have tried both install commands, but for command no 1 it seems like doesn't work, laptop run overnight I didn't see the below message popup.

 

Sk73_2-1647060086409.png

 

For command no 2, I have tried twice and got it successfully.

 

It took me a long time can only get the software deployed. If without restarting the computer, I will not get the software deployed as you can see the below attached. You may see the timing, after receiving the 1st notification, I wait until 11 something, then I tried to restart the laptop, then the software only come in.

 

Sk73_3-1647060307637.png

 

Below is my install command:

 

AcroRdrDC2200120085_en_US.exe /sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES

 

Uninstall command:

 

msiexec /x {AC76BA86-7AD7-1033-7B44-AC0F074E4100} /q

 

Below is my detection rules:

 

Sk73_4-1647060633425.png

 

 

 

 

 

 

 

 

 

Since I have never tested this software installation for myself, I can not tell you if it is correct. Regards, Tom