Microsoft released a preview back in October 2018 for deploying Win32 applications through Intune. I wanted to deploy BGInfo to some Windows 10 machines that were enrolled in Intune and joined to Azure AD with a simple method, so I chose to try out the Win32 apps preview in Intune. It turned out to be really easy, and got the job done.
This post will show using the Intune Win32 App Packaging Tool to package up my required files into an .intunewin file, and then in Intune I will run a very basic PowerShell file that will:
- Copy the BGInfo files (x64 version and config file) to C:\Program Files\BGInfo
- Copy a shortcut for BGInfo to the StartUp folder so it can start up each time Windows runs
- Run the BGInfo executable after it has copied everything
Prerequisites for Win32 Apps public preview
- Windows 10 version 1607 or later (Enterprise, Pro, and Education versions)
- Windows 10 client needs to be:
- joined to Azure Active Directory (AAD) or Hybrid Azure Active Directory, and
- enrolled in Intune (MDM-managed)
- Windows application size is capped at 8 GB per app in the public preview
My install.ps1 is very simple and contains:
New-item -itemtype directory -force -path “c:\Program Files\BGInfo”
Copy-item -path “$psscriptroot\bginfo64.exe” -destination “C:\Program Files\BGInfo\bginfo64.exe”
Copy-item -path “$psscriptroot\custom.bgi ” -destination “C:\Program Files\BGInfo\custom.bgi”
Copy-item -path “$psscriptroot\bginfo.lnk” -destination “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\bginfo.lnk”
Start-process “C:\Program Files\BGInfo\Bginfo64.exe” -ArgumentList “`”C:\Program Files\BgInfo\custom.bgi`””,”/timer:0″,”/silent”,”/nolicprompt”
I have downloaded the Win32 packaging tool from https://github.com/Microsoft/Intune-Win32-App-Packaging-Tool and saved it to my C:\Intune
I have a folder called C:\bginfo that contains my BGinfo files:
- Bginfo.lnk – This is the BGInfo shortcut that will be copied to the StartUp folder with the target of “”C:\Program Files\BGInfo\Bginfo64.exe” “C:\Program Files\BgInfo\custom.bgi” /timer:0 /silent /nolicprompt”
- Bginfo64.exe – the executable to run BGInfo
- custom.bgi – this is just my BGInfo configuration
- install.ps1 – this contains the commands for copying the files and is mentioned above
InTuneWinAppUtil.exe is very easy to run it, and it will prompt you for the source folder (the screenshot above with my Bginfo files and powershell file), the setup file (Bginfo64.exe), and the output folder (of where it will place the .intunewin file to upload to Intune).
Once done, it will output the .intunewin file to upload to Intune to deploy.
To create the Win32 app in Intune, login to the Azure portal.azure.com and select Intune > Client Apps > Add
Select Windows app (Win32) – preview for the App type, and browse to the .intunewin package that was created earlier.
Fill in the required information.
For my install command, I have entered in “powershell.exe -executionpolicy Bypass .\install.ps1”
The uninstall command is required as well (I have used the same command which won’t work to uninstall, but I am not concerned about that)
Fill in the requirements.
I have used a detection rule to search for the file Bginfo64.exe in C:\Program Files\BGInfo
Once you finish all the steps, the app needs to upload.
You can now assign the app.
Once the Windows 10 Azure AD Joined and enrolled into Intune device syncs, it will install.
For troubleshooting, you can check the following log – C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log
Demo of a new machine using Autopilot with the Win32 app deployed.
Thanks to Steve Hosking for pointing out to me that I could use PowerShell isntead of a cmd file.