# ScriptRunner Customization

*Applies to: Patch My PC Publisher*

## Overview

The **ScriptRunner Customization** section provides controls that influence how ScriptRunner handles long-running installer executions during client-side installation, as well as how client-side installation logs are cleaned up.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FwAFW2JnM4Ul1hWPXdnS2%2Fimage.png?alt=media&#x26;token=9677910a-114f-4a54-a90b-0c09e12ca3b0" alt="ScriptRunner Customization" width="545"><figcaption></figcaption></figure>

## ScriptRunner should delete log files generated by Manage Installation Logging older than X days

This setting controls how long client-side installation logs generated by ScriptRunner are retained on managed devices. It helps prevent excessive disk usage on endpoints by automatically removing older installation logs once they exceed the specified retention period, while still allowing recent logs to remain available for troubleshooting and support purposes.

* Default valu: 28 days
* Minimum value: 0 days
* Maximum value: 365 days

The default value provides a good balance between log retention and disk cleanup.

## Abort MSI Installations

This option controls how ScriptRunner handles MSI installations that run longer than an expected duration during ScriptRunner execution.

When enabled, ScriptRunner is configured to automatically abort MSI installations on client devices if an installation runs longer than the configured time limit.

* Default timeout: 30 minutes
* Minimum supported value: 30 minutes
* Maximum supported value: 120 minutes

You can increase the timeout value if your environment includes installers that legitimately require more time.

When this option is disabled, ScriptRunner does not enforce a timeout and allows the MSI installation to run indefinitely on the client.

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

If this option is disabled, the deployment platform’s own timeout still applies (for example, ConfigMgr or Intune). In this scenario, the platform may time out the installation and report a failure even if the MSI is still running in the background. \
\
If the MSI later completes successfully after the platform timeout, the installation can still succeed on the device. On the next application evaluation or detection cycle, the app may be re-evaluated and marked as compliant or installed, depending on the platform’s detection logic and evaluation schedule.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.patchmypc.com/patch-my-pc-publisher/administration/advanced/scriptrunner-customization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
