The user cancelled the app installation (0x80070642)
When deploying win32 apps from Intune, in some cases they fail to install. This is an unwanted scenario for any sysadmin. However, the installation failure will need to be investigated. The root of the installation error can vary based on multiple factors, such as dependencies, conflicting processes and many others.
This article will focus on applies to apps published through the Patch My PC Publisher or its younger brother, the SaaS platform.
In some cases, the installation error will be “The user cancelled the installation” with the corresponding error hexadecimal code 0x80070642, also known as ‘1602’ in decimal error code.
Topics covered in this article:
Determine if you are affected
Log path for SCCM: %WinDir%\CCM\Logs\PatchMyPC-ScriptRunner.log
Log path for Intune:%ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-ScriptRunner.log
In the PatchMyPC-ScriptRunner.log you will see this:-
User in session 2 [PatchMyPC] has exited with command: Ignore. ScriptRunner 8/11/2024 8:06:26 AM 1 (0x0001)
User has blocked the update installation process (A conflicting process is still running). ScriptRunner 8/11/2024 8:06:26 AM 1 (0x0001)
End of installation. Exit code is: 1602 ScriptRunner 8/11/2024 8:06:26 AM 1 (0x0001)
In the Intune Admin Center, you will see this error message for the application install status: “ The user cancelled the app installation (0x80070642)”.
Cause
The error code 0x80070642 typically means that the app installation was cancelled / snoozed by the user from the pop-up generated by the Patch My PC Manage Conflicting Processes feature.
Example scenario and repro steps
Products that should be closed while an update is being applied can be found at Known Issues and Considerations when Using Patch My PC – Patch My PC. We will be using the Notepad++ application in the following example, because we know this is an application that must be closed for it to successsfully install. Scenario: An update to this app was published from Patch My PC Publisher to Intune, and based on the assignment, it gets deployed to your client devices. However, out of the 300 targeted devices, 100 devices failed to install the update and returned error : The user cancelled the app installation (0x80070642), in the Intune Admin Center under “Device Install Status”. Repro steps:- Navigate to the “Intune Updates” tab in the Publisher.
- Select Notepad++ (x64).
- Right click the product and select “Manage Conflicting Process”.
The default behavior for these apps is set to Skip Installation when conflicting process are in use.
With this option set and un-changed, the update will install successfully if the application is closed, but it will fail if the app remains open, and it will fail with exit code 1618. https://patchmypc.com/patchmypc-scriptrunner-known-exit-codes.
If you’ve configured the customization to “Notify the user to close the app” and set a specific number for deferrals, the behavior will vary accordingly.
If this customization is enabled, allowing users to defer the installation, then when a user selects the Snooze button, Intune will mark the update as “The user cancelled the app installation,” leading to an error in the Intune portal.
You can customize the behavior when the application is running. For instance, you can trigger a notification asking the user for permission to close the app so the update can proceed successfully. For more detailed guidance, please refer to our comprehensive Knowledge Base article at Manage Conflicting Processes when Updating Third-Party Applications – Patch My PC.
According to the settings above, the user can snooze the update up to 5 times. After the 5th time, there will be one more pop-up and that is when the coutdown will reach 0 and the app will be closed automatically and the update will be installed.
Client side behavior
In the following scenario, Notepad++ was running and when the update was initiated by the Intune Management Extension (IME), the user received a notification configured via the “Manage Conflicting Process” to close the app.
1. IME processes the policy.
2. User selects “Snooze Update”.
3. IME reports installation failed
4. Error reported in the PatchMyPC-Scriptrunner.log.
User in session 2 [PatchMyPC] has exited with command: Ignore. ScriptRunner 8/11/2024 8:06:26 AM 1 (0x0001)
User has blocked the update installation process (A conflicting process is still running). ScriptRunner 8/11/2024 8:06:26 AM 1 (0x0001)
End of installation. Exit code is: 1602 ScriptRunner 8/11/2024 8:06:26 AM 1 (0x0001)
Summary
The Manage Conflicting Processes (MCP) feature allows customers to customize the behavior for application updates when the application is running. For instance, a notification can prompt the user to confirm whether it’s acceptable to close the app for a successful update.
If you use the Manage Conflicting Process feature in Patch My PC, and users choose to defer an update, the exit code of the installation will always be reported back to the Intune service. Intune will consider a 0 exit code as success but Patch My PC cannot manipulate or control how the Intune service interprets other exit codes.
Tip: If you do allow users to postpone the install, don’t allow them to postpone indefinitely or the app may never get updated.
Note: After making any changes to the MCP configuration, you must re-publish the app or update so the latest modifications are incorporated into the existing package in Intune.
When and How to Republish Patch My PC Third-Party Updates – Patch My PC