How to run an installer file as a script

Pick a library file, add switches, set a time limit, and read exit codes 91 to 94.

Browse
On this page

How to do it

  1. Open RMM, then Scripts, and make a new script. Pick Run file as the type.

    The type is chosen when you create the script and cannot change later. If Run file says paid plans, a trial has no file library. If it says the file library is not set up, ask the company that runs your portal to turn it on.

  2. Press Pick a file.

    The list is the Files page with a Pick button on each row. Press Pick to choose a file. Press Change file to choose another. Close the file list to keep the current one. Only a Ready file that can run is listed. That is .msi and .exe for Windows. It is .sh for Linux and macOS. It is .deb and .rpm for Linux. A file with no extension runs on Linux. A file that is Uploading, Checking or Failed is not listed. A .zip is not listed.

  3. Type the switches.

    Switches go to the file when it runs, such as /S or /norestart. MSI files always run silently, and the portal adds /qn for you. A window switch such as /qb, /qr, /qf or /passive is refused. For an .exe, use its silent switch, such as /S or /quiet. The editor warns you about an .exe with no switch. The warning does not stop you from saving. For a value that differs by client or device, use a variable. The portal fills it in for the device the script runs on. A filled in value may use only letters, digits and . _ : @ + = / , -. If it has anything else, the run stops and names the variable and the client. A secret variable cannot be used in switches.

  4. Set the Time limit (seconds).

    Leave it empty and the portal picks a default. The default is 15 minutes, plus 1 minute for each 100 MiB started, up to 1 hour. Or set your own, from 300 to 3600 seconds. When time runs out, the run is stopped. For an .exe, the portal waits for the installer. It waits for every process the installer started.

  5. Read the Generated script box and save.

    It shows the script the portal builds for the file. You can read it but not type in it. The switches are not in it, because they reach the file as data. A red message under the time limit means something was refused. Fix what it names. Then save. Run it like any script: on a device, on a schedule or from an automation.

  6. Use a library file inside your own script.

    In a PowerShell or Bash script, put the cursor where you need the file. Press Insert file. Pick a Ready file of any kind. The path is in $GtxFilePath in PowerShell. It is in $GTX_FILE_PATH in Bash. Insert file is greyed out for a Command Prompt (cmd) script. If you replace the file later, the check fails with exit code 92. Insert the file again.

What you will have

  • Make a script that runs a library file with no code to write.
  • Pick the file and type its switches.
  • Set a time limit.
  • Use a library file inside your own script.
  • Read exit codes 91, 92, 93 and 94.

Why it works this way: How to run an installer file as a script

The portal builds the script for you. It downloads the file and checks it is the file you uploaded. Then it runs the file and deletes it.

Upload the file on the Files page first. Only a Ready file can be picked.

If it did not work: How to run an installer file as a script

  • Exit 91: the device has too little free disk space for the file.
  • Exit 92: the file did not match the size or fingerprint of the file you uploaded, so it did not run. Insert or pick the file again.
  • Exit 93: the download failed after one retry. The device must reach the file's storage address.
  • Exit 94: on Windows, the installer still had programs running at the time limit. The install may not be done. Give the installer its no-launch switch.
  • Any other code belongs to the file itself. For an MSI, a restart request (3010 or 1641) counts as success.

Questions this page answers

What does the Run file type do?

It runs a file from the file library with no script to write. Pick Run file, pick the file and type its switches.

What do exit codes 91, 92, 93 and 94 mean?

91 is too little disk space. 92 is a file that did not match. 93 is a failed download. 94 is an installer still running at the time limit.

Why is the Insert file button greyed out?

It works only in PowerShell and Bash scripts. It is also greyed out on a trial or when the file library is not set up.

Was this helpful?

Last validated 2026-11-04

Keep digging