intunemdms.com

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.

01Install command runs

The installer, CMD file, or PowerShell script exits with a numeric code.

02Intune maps the code

The code is matched to Success, Retry, Soft reboot, Hard reboot, or Failed.

03Restart behavior applies

The Program tab restart setting decides how Intune reacts to reboot-related results.

04Status is reported

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.

Program□ ×

Specify return codes to indicate post-installation behavior.

Return codeCode type
0Success
1707Success
3010Soft reboot
1641Hard reboot
1618Retry
+ Add
Code typeWhat it meansPractical note
SuccessThe installer completed successfully.Use for normal success codes such as 0 or vendor-specific success values.
RetryIntune retries the installation.Commonly used for temporary installer conflicts such as another install already running.
Soft rebootThe 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 rebootThe install requires a restart before continuing.Additional Win32 app processing waits until the device restarts.
FailedThe 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.

Program□ ×
SystemUser
App install may force a device restart
3010 → Soft reboot, 1641 → Hard reboot
Restart behaviorHow to use it
Determine behavior based on return codesUse when you want Intune to react directly to the configured return code mapping.
No specific actionUse when restarts should be suppressed during installation where possible.
App install may force a device restartCommon default choice. The app can complete normally, and reboot-related codes notify the user appropriately.
Intune will force a mandatory device restartUse 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.

Assignments□ ×
Enabled
1440 minutes
15 minutes
YesNo

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

ScenarioRecommended handling
Installer exits with 0Map as Success.
Installer exits with 3010Map as Soft reboot so installation can complete while notifying the user.
Installer exits with 1641Map as Hard reboot when a restart must happen before more Win32 app processing.
Installer exits with 1618Map as Retry because another installer may already be running.
Script succeeds but exits with 1Fix 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, and 1618 mapped 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

IssueWhat to check
Install succeeded but Intune shows failedCheck whether the installer returned an unmapped code or whether detection failed after installation.
Device keeps asking for restartReview the return code type and the configured Device restart behavior.
Next Win32 app does not installCheck whether the previous app returned a Hard reboot code and is blocking further processing.
Retry happens repeatedlyReview installer conflicts, pending installs, and whether return code 1618 is expected.
PowerShell script reports failureEnsure 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.