> For the complete documentation index, see [llms.txt](https://docs.patchmypc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patchmypc.com/patch-my-pc-publisher/customizations/list-customizations/manage-return-codes.md).

# Manage Return Codes option in Patch My PC Publisher

*Applies to: Patch My PC Publisher V3.x*\
*Available at level: Product*\
*Available on tab: WSUS Updates, ConfigMgr Apps, Intune Apps, Intune Updates*

The **Manage Return Codes** right-click option in Patch My PC (PMPC) Publisher lets you control how installer exit codes are interpreted for a product in Publisher.

Each Return Code can be mapped to a specific code type to influence how the installation result is reported and how restart behavior is handled on the client.

This feature is commonly used to suppress reboot behavior or to ensure that non-standard success codes are correctly treated as successful installations.

{% hint style="danger" %}
**Important**

The management platform can also influence how devices respond to Return Codes, particularly regarding restart behavior.

Review the relevant Microsoft documentation for [Intune](https://learn.microsoft.com/en-us/intune/intune-service/apps/apps-win32-app-management#set-win32-app-availability-and-notifications), [ConfigMgr](https://learn.microsoft.com/en-us/intune/configmgr/core/clients/deploy/device-restart-notifications), or [WSUS](https://learn.microsoft.com/en-us/windows/deployment/update/waas-restart) to ensure Return Codes and restart actions behave as expected in your environment.
{% endhint %}

## Return Code Mapping

Each Return Code returned by the installer is associated with a code type. The code type determines how Patch My PC ScriptRunner (which manages the installation) and the management platform interpret the result.

When you select the **Manage Return Codes** right-click option, the **Manage Return Codes** dialog appears, where you can manage Return Codes for the selected product.

<figure><img src="/files/8DMwSL0yYH1GbySlBSSx" alt="Manage Return Codes dialog" width="446"><figcaption></figcaption></figure>

The following Return Codes are commonly used by default:

<table><thead><tr><th width="128.77783203125" valign="top">Return Code</th><th width="123.77777099609375" valign="top">Code Type</th><th valign="top">Meaning</th></tr></thead><tbody><tr><td valign="top">0</td><td valign="top">Success</td><td valign="top">Installation completed successfully</td></tr><tr><td valign="top">1707</td><td valign="top">Success</td><td valign="top">Product is already installed or no action was required</td></tr><tr><td valign="top">3010</td><td valign="top">SoftReboot</td><td valign="top">Installation succeeded and a reboot is recommended</td></tr><tr><td valign="top">1641</td><td valign="top">HardReboot</td><td valign="top">Installation succeeded and triggered an immediate reboot</td></tr><tr><td valign="top">1618</td><td valign="top">Retry</td><td valign="top">Another installation is in progress and the deployment should retry</td></tr></tbody></table>

## Custom Return Codes

Some installers return non-standard exit codes, even when the installation succeeds. In these cases, you can add a custom Return Code and map it to **Success**.

For example, **Brave Browser** always exits with Return Code **19** on a successful installation.

As **19** is not treated as a success code by default, it can be mapped to **Success** so that the successful deployment is reported correctly.

To add a custom Return Code:

1. Locate the relevant product in the Product Tree.
2. Right-click it and select **Manage Return Codes**
3. On the **Manage Return Codes** dialog, click **Add**

<figure><img src="/files/sKhkJknpCzq1UnMHVnCR" alt="Clicking &#x27;Add&#x27; on the &#x27;Manage Return Codes&#x27; dialog" width="446"><figcaption></figcaption></figure>

4. In the **Return Code** field, enter the required Return Code (for example **19**), and if the **Code Type** should be anything other than **Success**, select the relevant value from the **Code Type** dropdown beside the new Return Code.

<figure><img src="/files/vdIndyrxGMxRhU1VzZjG" alt="Configuring the new Return Code" width="449"><figcaption></figcaption></figure>

5. Click **OK** to save your changes.

<figure><img src="/files/yxR9gK1LByHCGSDPTj1E" alt="Clicking &#x27;OK&#x27; to save your changes" width="449"><figcaption></figcaption></figure>

The **Manage Return Codes** dialog updates to show the new Return Code.

<figure><img src="/files/iMn9YTXXQguDiAC0zeIU" alt="&#x27;Manage Return Codes&#x27; dialog showing the new Return Code" width="447"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.patchmypc.com/patch-my-pc-publisher/customizations/list-customizations/manage-return-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
