Windows Intune – C# Application Installation Wrapper

Windows Intune is a great tool to manage and distribute applications to end users. If your software comes as an msi-file (.msi) or an exe-file (.exe) with support for silent installation parameters it can be added and deployed through the Windows Intune Portal.

But what if you want to run a script? Well there is a way around that.

I’ve built a simple installation wrapper in C# that reads commands from an xml-file.

In this example I want to run a PowerShell script that install fonts on client computers.

In the ApplicationSettings.xml I specify the command to run:

powershell.exe -ExecutionPolicy Bypass -File Add-Font.ps1 -path Setup\Fonts

In the “Add Software…” wizard I point to my installer.exe.

When I distribute it to my end users the following will happen:

  1. Intune client will download all the files to the computer.
  2. Execute installer.exe
  3. Installer.exe will read ApplicationSettings.xml and run the specified command.
  4. PowerShell script will run and install fonts.

If I want to run multiple commands add them to the ApplicationSettings.xml.

Best regards,

Marcus Kjell

Posted in Blog, Microsoft Intune.