> 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/predefined-scripts.md).

# Predefined Scripts 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*

Patch My PC (PMPC) defined pre- and post-scripts are provided for specific products that cannot fully manage certain scenarios on their own. A common example is software that is unable to remove older versions during an upgrade, such as Oracle Java.

The **Predefined Scripts** right-click option automatically downloads and bundles the PMPC pre- and post-scripts with the application or updates them whenever the application is published using Publisher.

## Required Scripts

**Required Scripts** are enforced and cannot be modified or disabled. They are always executed as part of the installation or update to ensure the application installs correctly.

## Recommended Scripts

**Recommended Scripts** are optional. Although they are included with the application or update, they can be disabled if you prefer not to use them.

<figure><img src="/files/0BxSBfZi1FcljyV83tqv" alt="Recommended Scripts" width="563"><figcaption></figcaption></figure>

### Review the Recommended Script

To view the PMPC recommended script:

1. Click the **Predefined Scripts** right-click customization option for the product in the Product Tree.
2. Click **View** to open the script in a browser and review its contents.
3. Review the **Description** field to understand what the script does and when it runs.

{% hint style="info" %}
**Note**

Recommended scripts are hosted by PMPC and are referenced by URL. They are not editable from the Publisher UI.
{% endhint %}

### Configure Script Behavior

The following options control how the recommended script behaves:

* **Don’t attempt software update if the pre-script returns an exit code other than 0 or 3010**\
  When enabled, the installation or update stops if the recommended script fails. This option is enabled by default and prevents the deployment from continuing if required cleanup actions cannot be completed.
* **Disable the Patch My PC recommended pre-update script for this product**\
  When enabled, the recommended script is skipped for this product. This option is available only for recommended scripts and does not apply to required scripts.


---

# 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/predefined-scripts.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.
