> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a software's install scripts

> Replace the install, uninstall and/or post-install script of ONE custom-package software. Send at least one; omitted scripts are left untouched and nothing else changes (targeting, self-service, auto-update, setup experience). Only custom packages qualify — App Store / VPP, Fleet-maintained apps and IPA are rejected (Fleet re-derives FMA scripts on every update, so an edit there would silently evaporate). The new script runs on EVERY device this software targets, and Fleet cancels all pending installs for the title as soon as a package field changes, so queued installs must be retried. Use it only when the script is wrong for everyone — e.g. an .exe missing its silent-install flag, or an MSI script treating exit 3010/1641 (success, reboot required) as a failure. For one device, use `runDeviceScript`. Read the current scripts with `getSoftware`, show the user the exact before/after diff, and get explicit confirmation before calling.

<span className="badge-write">Key: Write</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json patch /software/{softwareId}/scripts
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /software/{softwareId}/scripts:
    patch:
      tags:
        - Softwares
      summary: Update a software's install scripts
      description: >-
        Replace the install, uninstall and/or post-install script of ONE
        custom-package software. Send at least one; omitted scripts are left
        untouched and nothing else changes (targeting, self-service,
        auto-update, setup experience). Only custom packages qualify — App Store
        / VPP, Fleet-maintained apps and IPA are rejected (Fleet re-derives FMA
        scripts on every update, so an edit there would silently evaporate). The
        new script runs on EVERY device this software targets, and Fleet cancels
        all pending installs for the title as soon as a package field changes,
        so queued installs must be retried. Use it only when the script is wrong
        for everyone — e.g. an .exe missing its silent-install flag, or an MSI
        script treating exit 3010/1641 (success, reboot required) as a failure.
        For one device, use `runDeviceScript`. Read the current scripts with
        `getSoftware`, show the user the exact before/after diff, and get
        explicit confirmation before calling.
      operationId: updateSoftwareScripts
      parameters:
        - name: softwareId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
components:
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````