Intune Deployment Guide
Return codes and install behavior in Intune
Return codes tell Intune how to interpret the result of a Win32 app installation. Restart behavior controls what happens when that result requires or recommends a reboot.
What return codes do
After the install command finishes, Intune reads the process exit code and maps it to a result type. That mapping affects the deployment status, retry behavior, and restart experience.
The installer, CMD file, or PowerShell script exits with a numeric code.
The code is matched to Success, Retry, Soft reboot, Hard reboot, or Failed.
The Program tab restart setting decides how Intune reacts to reboot-related results.
Detection and reporting confirm whether the app is installed successfully.
Default return codes
Intune adds common return codes by default when you create a Win32 app. Keep them unless testing shows that the installer returns a custom code that needs to be mapped.
Specify return codes to indicate post-installation behavior.
| Code type | What it means | Practical note |
|---|---|---|
| Success | The installer completed successfully. | Use for normal success codes such as 0 or vendor-specific success values. |
| Retry | Intune retries the installation. | Commonly used for temporary installer conflicts such as another install already running. |
| Soft reboot | The install completed, but a restart is needed to finish. | Intune can continue with other Win32 apps, but the user is notified that restart is required. |
| Hard reboot | The install requires a restart before continuing. | Additional Win32 app processing waits until the device restarts. |
| Failed | The install failed. | Use when a code should clearly report failure. |
Device restart behavior
The Device restart behavior setting determines how Intune handles return codes that indicate a reboot. The same return code can feel different to users depending on this setting.
| Restart behavior | How to use it |
|---|---|
| Determine behavior based on return codes | Use when you want Intune to react directly to the configured return code mapping. |
| No specific action | Use when restarts should be suppressed during installation where possible. |
| App install may force a device restart | Common default choice. The app can complete normally, and reboot-related codes notify the user appropriately. |
| Intune will force a mandatory device restart | Use only when the deployment must restart the device after successful installation. |
Restart grace period
Restart grace period settings are configured in the assignment experience, but they depend on the Program tab restart behavior. Use them carefully for required apps that may force a reboot.
When to customize return codes
Do not add custom return codes just to make a failed deployment look successful. Add or change mappings only when you have tested the installer and confirmed that the code has a predictable meaning.
- Keep default return codes for common MSI and EXE installers.
- Add vendor-specific success codes only after testing.
- Map reboot-required codes intentionally so the user experience is predictable.
- Use logs when Intune reports failure but the app appears installed.
Practical examples
| Scenario | Recommended handling |
|---|---|
Installer exits with 0 | Map as Success. |
Installer exits with 3010 | Map as Soft reboot so installation can complete while notifying the user. |
Installer exits with 1641 | Map as Hard reboot when a restart must happen before more Win32 app processing. |
Installer exits with 1618 | Map as Retry because another installer may already be running. |
Script succeeds but exits with 1 | Fix the script exit code instead of mapping failure to success. |
Quick checklist
- Test the installer locally and record the exit code.
- Keep
0,1707,3010,1641, and1618mapped correctly. - Choose restart behavior before broad deployment.
- Use a pilot group to confirm the reboot experience.
- Check Intune Management Extension logs if status does not match the device state.
Troubleshooting
| Issue | What to check |
|---|---|
| Install succeeded but Intune shows failed | Check whether the installer returned an unmapped code or whether detection failed after installation. |
| Device keeps asking for restart | Review the return code type and the configured Device restart behavior. |
| Next Win32 app does not install | Check whether the previous app returned a Hard reboot code and is blocking further processing. |
| Retry happens repeatedly | Review installer conflicts, pending installs, and whether return code 1618 is expected. |
| PowerShell script reports failure | Ensure the script exits with the intended code, such as exit 0 for success. |

Leave a feedback
Include versions, steps, and any error text if you have them.