Deploying standard Store apps or modern MSIX packages via Microsoft Intune is straightforward. However, the vast majority of enterprise desktop fleets rely on complex legacy installers—such as heavy security agents (CheckPoint Endpoint Security, FortiClient VPN), proprietary Line-of-Business (LOB) software, multi-tiered database drivers, and CAD tools requiring customized license configurations.
When deployed improperly, these applications fail silently, trigger unexpected midday reboots, or report false-positive installation errors inside the Intune Admin Center. Mastering the Intune Management Extension (IME) execution pipeline, crafting resilient PowerShell wrapper scripts, and building multi-vector custom detection rules is essential for enterprise endpoint reliability.
The 4 Pillars of Resilient Win32 App Packaging
To prevent random installation failures across heterogeneous hardware, every enterprise application package must satisfy four foundational engineering pillars:
/qn /norestart ALLUSERS=1. For EXE wrappers (InnoSetup, InstallShield, Nullsoft), identify vendor-specific silent switches.
3010 (Reboot Required) or 1641 (Hard Reboot Initiated). If unmapped in Intune, IME interprets unexpected non-zero codes as immediate failures. Map 3010 as "Soft Reboot" to allow end-users to restart at their convenience.
Production PowerShell Installation Wrapper Pattern
Rather than invoking raw setup executables in Intune, always package a centralized PowerShell deployment wrapper that handles process killing, directory staging, logging, and error trapping:
# ==============================================================================
# Enterprise Win32 App Installer Wrapper (Deploy-Application.ps1)
# ==============================================================================
[CmdletBinding()]
param()
$AppName = "CheckPointEndpointSecurity"
$AppVersion = "E88.20"
$LogDir = "$env:ProgramData\Microsoft\IntuneManagementExtension\Logs"
$LogFile = "$LogDir\$($AppName)_Install.log"
if (-not (Test-Path $LogDir)) { New-Item -Path $LogDir -ItemType Directory -Force | Out-Null }
function Write-Log {
param([string]$Message)
$stamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
"[$stamp] $Message" | Out-File -FilePath $LogFile -Append -Encoding UTF8
Write-Host "[$stamp] $Message"
}
Write-Log ">>> Starting Installation of $AppName ($AppVersion)..."
# 1. Terminate conflicting processes gracefully
$blockingProcesses = @("EPLogListener", "CPDA", "FortiClient", "Setup")
foreach ($proc in $blockingProcesses) {
Get-Process -Name $proc -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
}
# 2. Execute MSI with Transform and Logging
$msiPath = Join-Path -Path $PSScriptRoot -ChildPath "CheckPointEndpoint.msi"
$mstPath = Join-Path -Path $PSScriptRoot -ChildPath "EnterpriseConfig.mst"
$msiLog = "$LogDir\$($AppName)_MSI.log"
$arguments = "/i `"$msiPath`" TRANSFORMS=`"$mstPath`" /qn /norestart ALLUSERS=1 /lv*v `"$msiLog`""
Write-Log "Invoking msiexec.exe with arguments: $arguments"
$process = Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait -PassThru -NoNewWindow
Write-Log "MSI execution finished with Exit Code: $($process.ExitCode)"
# 3. Handle Exit Codes for Intune Management Extension
switch ($process.ExitCode) {
0 { Write-Log "SUCCESS: Installation completed successfully."; exit 0 }
3010 { Write-Log "SUCCESS: Soft reboot required (Exit Code 3010)."; exit 3010 }
1641 { Write-Log "SUCCESS: Hard reboot initiated (Exit Code 1641)."; exit 1641 }
default {
Write-Log "ERROR: Installation failed with unhandled exit code: $($process.ExitCode)"
exit $process.ExitCode
}
}
Crafting Bulletproof PowerShell Detection Scripts
A custom detection script must follow strict Intune rules:
- If Installed & Valid: Output any string to
STDOUT(e.g.Write-Host "Installed") AND terminate withexit 0. - If Not Installed / Failed: Write nothing to STDOUT OR exit with any non-zero code (e.g.
exit 1).
# ==============================================================================
# Custom Detection Script for Win32 App
# Intune Requirement: Output to STDOUT + Exit 0 = Installed
# ==============================================================================
$targetBinary = "$env:ProgramFiles(x86)\CheckPoint\Endpoint Security\Endpoint Common\cpda.exe"
$minVersion = [version]"88.20.0.12"
if (Test-Path $targetBinary) {
try {
$rawVersion = (Get-ItemProperty -Path $targetBinary).VersionInfo.FileVersion
$currentVersion = [version]($rawVersion -replace '[^\d\.]', '')
if ($currentVersion -ge $minVersion) {
Write-Host "Detected $targetBinary with version $currentVersion (Minimum required: $minVersion)"
exit 0
} else {
# Version is lower than expected
exit 1
}
} catch {
exit 1
}
} else {
# File does not exist on disk
exit 1
}
Troubleshooting IME Logs on the Endpoint
When an application fails to deploy, do not guess. Open an elevated PowerShell session and inspect the dedicated Intune Management Extension logs located at C:\ProgramData\Microsoft\IntuneManagementExtension\Logs:
| Log File Name | Purpose & Troubleshooting Scope |
|---|---|
IntuneManagementExtension.log |
Core policy engine log. Contains Win32 app detection evaluations, CDN download progress, and exit code reporting. |
AgentExecutor.log |
Execution log for PowerShell scripts, Proactive Remediations, and detection script outputs (STDOUT/STDERR). |
ClientHealth.log |
Tracks IME background service health, scheduled task triggers, and remediation engine stability. |
Summary & Implementation Checklist for Engineers
- Extract & Transform: Unpack vendor installers, build MST transform files, and test silent install parameters locally under SYSTEM context (using
PsExec -i -s cmd.exe). - Standardize Wrapper: Use a unified
Deploy-Application.ps1script that redirects all installation output toC:\ProgramData\Microsoft\IntuneManagementExtension\Logs. - Build .intunewin Container: Run
IntuneWinAppUtil.exe -c ".\Source" -s "Deploy-Application.ps1" -o ".\Output". - Configure Detection & Return Codes: Upload the custom detection script and ensure exit code
3010is mapped to Soft Reboot. - Target Pilot Group: Deploy in
Requiredmode to a small test group and reviewAgentExecutor.logbefore broad rollout.
NT AUTHORITY\SYSTEM account does not have access to mapped network drives, user-specific HKCU registry hives, or interactive prompts. Always validate your wrapper with PsExec -i -s to guarantee 100% fidelity with Intune's execution environment.