Configure Scripts in a Patch My PC Cloud Deployment
Applies to: Patch My PC Cloud
The Scripts tool in the Patch My PC (PMPC) Cloud deployment wizard allows you to configure settings for install and uninstall scripts.
This includes regular PowerShell (.ps1) scripts as well as PSADT scripts, which can be specified directly in our Portal without having to upload the required PSADT module files separately.
Important
Currently, scripts containing "${env:ProgramFiles(x86)}" or "${env:ProgramFiles}" cannot be uploaded as Cloudflare is falsely identifying them as a false positive related to Log4j exploits. We are actively working with them to resolve this, but as this is outside our control, we cannot provide an estimated resolution time.
To work around this issue, see the Resolution section of "TypeError: Failed to fetch" error when trying to upload a Pre or Post Script.
To add a script:
Add the Scripts tool.
Click the Scripts tool.

Click Add beside the relevant script option to add a script, then configure the required settings as per the relevant articles:
Pre-Install Script - a script that can be run before the installer runs.
Post-Install Script - a script that can be run after the installer runs.
Pre-Uninstall Script - a script that can be run before the uninstaller runs.
Post-Uninstall Script - a script that can be run after the uninstaller runs.

Important
Checking the Enable PSADT Module checkbox causes the following behaviors:
When creating a deployment:
If a PSADT script is included and you have not manually interacted with the checkbox, it will be automatically enabled.
If you manually change the checkbox state, your selection will be preserved.
When editing a deployment:
The checkbox is treated as manually configured, and its state will not be automatically changed.
If a PSADT script is added during edit, the checkbox will not be auto-enabled and must be adjusted manually if needed.
Deploying Scripted Custom Apps
As previously mentioned, if you deploy a Custom App where the Installer Type is set to Installation Script, the Scripts tool is automatically added to your deployment.
The Scripts tool will also show the Install File and Uninstall Command fields. Clicking View next to these fields opens the Script Editor, which displays the associated script (this is read-only, so you cannot make any changes).

Next Steps
If you do not want to configure any additional settings, click Next to move to the Assignments tab.
Otherwise, navigate to the relevant tool to configure the required settings, which are explained in the relevant section.
Last updated
Was this helpful?
