Manage and secure applications · Topic 1 of 5
Preparing and Deploying Win32, LOB and Store Apps
MD-102 app deployment: package Win32 apps as intunewin, set detection and requirement rules, deploy LOB and Store apps, and choose required or available.
- 5 min
- Win32 apps use .intunewin files made with the Win32 Content Prep Tool. All detection rules must be met.
- Detection runs before and after install, as SYSTEM. Script rules treat STDERR output as not installed.
- Return codes include Success, Failed, Hard reboot, Soft reboot and Retry (three attempts, five minutes apart).
What it is
Intune deploys several kinds of apps, and each needs different preparation. Win32 apps are packaged as .intunewin files and offer the most control. Line of business (LOB) apps are single installer files such as MSI. Microsoft Store apps come from the Store. Choosing the type, then setting the intent (required or available) and the rules that detect installation, decides whether the app arrives correctly.
How it works
Preparing a Win32 app
- Get the installer files and the silent install command.
- Use the Microsoft Win32 Content Prep Tool (
IntuneWinAppUtil.exe) to wrap the folder into a .intunewin file. - In Intune, add an app of type Windows app (Win32) and upload the file.
- Set the install command and uninstall command, the install behavior (system or user) and the device restart behavior.
- Add requirement rules, detection rules, return codes, and optional dependencies and supersedence.
- Assign the app.
Detection rules
At least one detection rule is required, and all rules must be true for the app to count as installed. Types:
| Rule | Checks |
|---|---|
| MSI | A product code (and optionally version) |
| File or folder | A path exists, a version or a date |
| Registry | A key or value |
| Custom script | A PowerShell script. Exit code 0 with output on STDOUT means installed, and anything written to STDERR means not installed |
Detection runs before the download (so an app that is already present is skipped) and after the install (to confirm success). Detection runs as SYSTEM, so a per user path such as one with %username% will not resolve to the signed in user.
Requirement rules
Requirement rules decide whether the app applies to a device, before it downloads. You can require a minimum OS architecture and version, disk space, memory, processors, and add file, registry or script based rules. A device that does not meet them reports Not applicable.
Return codes, dependencies and supersedence
- Return codes map installer exit codes to results: Success, Failed, Hard reboot, Soft reboot and Retry. Retry tries again up to three times, waiting 5 minutes between attempts. A hard reboot blocks the next Win32 app until the device restarts, while a soft reboot does not.
- Dependencies install another app first. They are checked before detection.
- Supersedence replaces an older app with a newer one. Toggle Uninstall previous version off for an in place update, or on to remove the old app first. A chain can have up to 10 nodes, and you need the Relate permission.
Line of business apps
An LOB app is a single file you upload: MSI, MSIX or APPX for Windows, .ipa for iOS and .apk for Android. Intune detects installation by product code or bundle ID. LOB apps are simpler and have fewer options than Win32. Do not mix LOB (MSI) and Win32 installs during Autopilot with the ESP, because they compete for the same installer.
Microsoft Store apps
Add a Microsoft Store app (new), which searches the Store and uses the package manager, rather than the retired Store for Business flow. Windows apps can install in user or device context. Store apps update automatically, and are good for apps the Store already publishes.
Assignment intent
| Intent | Meaning |
|---|---|
| Required | Installs automatically, and is reinstalled if missing (detected within about 24 hours) |
| Available for enrolled devices | Appears in the Company Portal for the user to install |
| Uninstall | Removes the app from the group |
Assign to users for apps the person needs, and to devices for apps that belong to the machine, such as drivers or kiosk apps. Use assignment filters to exclude devices, and scope tags to limit who sees the app.
A worked scenario
An engineer packages a CAD tool as .intunewin, sets the silent switch, and adds a detection rule for the executable file version and a requirement rule for 64 bit Windows 11 with 16 GB of memory. She adds the Visual C++ runtime as a dependency and marks the app Required for the engineering group. When version 2 arrives, she adds supersedence with Uninstall previous version off. A second tool is only occasionally needed, so it is Available in the Company Portal.
What to remember for the exam
- Win32 apps use .intunewin files made with the Win32 Content Prep Tool. All detection rules must be met.
- Detection runs before and after install, as SYSTEM. Script rules treat STDERR output as not installed.
- Return codes include Success, Failed, Hard reboot, Soft reboot and Retry (three attempts, five minutes apart).
- Use Required to force install and Available for Company Portal. Dependencies install first.
- Do not mix LOB and Win32 apps during Autopilot with the ESP.
A Win32 app that keeps reinstalling usually has a detection rule that is never met.
How the exam asks about this
- "Install a program that needs custom silent switches and a pre check of disk space." A Win32 app with a requirement rule.
- "Intune says installed, but the app is missing." The detection rule was already met on the device.
- "Install the runtime before the app." A dependency.
- "Let staff choose when to install." Available for enrolled devices.
Common mistakes
Per user paths in detection rules. Detection runs as SYSTEM.
Using LOB for apps that need rules. Use Win32.
Forgetting uninstall commands. Uninstall intent then fails.
Mixing LOB and Win32 in the ESP.
Check yourself
Which tool prepares a Win32 app?
The Microsoft Win32 Content Prep Tool, producing a .intunewin file.
How many detection rules must be true?
All of them.
What does the Retry return code do?
Tries the install again up to three times, five minutes apart.
Topic 1 of 5 in Manage and secure applications
Test yourself on Manage and secure applications
The full Microsoft MD-102 question bank has 658 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.