by: Helge, published: Aug 29, 2022, in

Windows Installer Errors 2503 & 2502: Called RunScript when not marked in progress & Called InstallFinalize when no install in progress

This is a quick post on how to troubleshoot situations where you get error 2503 (Called RunScript when not marked in progress) followed by error 2502 (Called InstallFinalize when no install in progress) when trying to install or uninstall software with Windows Installer.

Situation

When you try to install or uninstall an MSI package (thus invoking Windows Installer), you get two errors in the following order:

  1. Error 2503: Called RunScript when not marked in progress
  2. Error 2502: Called InstallFinalize when no install in progress

Troubleshooting Strategy

When you search for Windows Installer (MSI) errors 2503 and 2502, you find many articles that mention file system permission issues as the cause. To figure out where exactly permissions could be missing, I created a Process Monitor trace of the system activity and filtered for msiexec.exe errors. This is what I got:

Analysis

Windows Installer (msiexec.exe) tries to create a TMP file in C:\Windows\Temp, which fails with Access denied. The reason for the failure is that it tries to create the file while non-elevated, in other words, with standard user permissions. Standard users don’t have write permissions in C:\Windows\Temp by default, though.

Solutions/Workarounds

In my case, I believe the root cause was an issue with the MSI package, which needs to be fixed by the software vendor that authored it. There are, however, workarounds:

Workaround 1: Elevate

Don’t rely on the installer to elevate at the right point in time. Start the installer with elevated rights yourself, e.g., from an elevated command prompt.

Workaround 2: Temporarily Assign Write Permissions

Temporarily assign write permissions to C:\Windows\Temp. This is easy with my free tool SetACL Studio.

Tip: don’t modify an existing ACE (permissions entry), e.g., for the group Users. Instead, add a new ACE for your user account. This makes it easier to reverse your changes afterwards.

Previous Article Identifying MS Teams Application Instances & Counting App Starts
Next Article DNS Exfiltration & Tunneling: How it Works & DNSteal Demo Setup