Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 2502

Error 2502 and 2503: Called RunScript When Not Marked in Progress on Install

10 min read Updated October 5, 2026 Installers, Runtimes & App Deployment

Fix it now

Windows Installer’s client half asked its service half to do something and the service had no transaction open to attach it to. Microsoft publishes 2503 as “Called RunScript when not marked in progress” and 2502 as “Called InstallFinalize when no install in progress”. Underneath, it is nearly always elevation or the ACLs on the two folders the installer writes into.

Run these from an elevated Command Prompt. Try the first line on its own before the rest

msiexec /i "C:\path\to\package.msi"
icacls C:\Windows\Temp /grant "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F"
icacls C:\Windows\Installer /grant "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F"
net stop msiserver
net start msiserver
  1. Close the failed installer and make sure no msiexec window is still open, then start an elevated Command Prompt and run the package from there. A large share of 2502 and 2503 reports end at that line.
  2. If it still fails, run the two icacls lines, restart the service, and try the install again.
  3. If it still fails, capture a log and read it: msiexec /i package.msi /l*v %USERPROFILE%\Desktop\msi.log, then search for the first Return value 3.

Never empty C:\Windows\Installer to reclaim space. It holds the cached packages and patches used to repair, patch and remove everything already installed, and it cannot be rebuilt without the original media.

If the package installs from the elevated prompt you are finished. If not, the next section explains what the two halves of the installer are disagreeing about.

Why it happens

A Windows Installer package runs in two processes. The client sits in your logon session and owns the user interface. The service, msiserver, runs as SYSTEM and does the work: writing files, touching the registry and building the rollback script that lets the whole transaction be undone. Those scripts are written into the hidden folder C:\Windows\Installer, staged through the Temp folder.

The two codes report that disagreement at two different points, and the published wording is worth reading carefully because most accounts of this error swap them. 2503 is raised when the client calls RunScript and the service is not marked as having an install in progress. 2502 is raised when the client calls InstallFinalize – the action that commits the transaction – and the service has no install in progress at all. So 2503 comes first, at the hand-off, and 2502 follows at the commit.

Neither code names the underlying fault, which is why they are so unhelpful alone. What sits underneath is usually one of two things: the client was never elevated, so the service refused to open a per-machine transaction on its behalf; or the transaction could not be created because the identity doing the work could not write where it needed to.

The two companion codes say it in plainer language. 1632 is ERROR_INSTALL_TEMP_UNWRITABLE, published as the Temp folder being full or inaccessible. 1336 reports an error creating a temporary file, and its message carries the folder and the system error code. If either appears next to 2502 and 2503, stop guessing: it is a folder problem and the message tells you which folder.

The package was launched without elevation

You have this one if Double-clicking the MSI fails immediately, and the identical file installs cleanly from an administrative Command Prompt.

  1. Open an elevated Command Prompt and run msiexec /i "full\path\to\package.msi".
  2. To remove a product, use the same approach: msiexec /x {ProductCode}.
  3. For a wrapper setup that needs an elevated shell around it, start the wrapper from that same elevated prompt rather than from Explorer.

Do not enable AlwaysInstallElevated to work around this. It lets any standard user install a package with system rights and is a well-known privilege-escalation route.

SYSTEM or Administrators lost rights on the hidden Installer folder

You have this one if Every MSI on the machine fails the same way, including packages that install without trouble on an identical build.

  1. From an elevated prompt confirm the folder is there: dir /a C:\Windows\Installer.
  2. Restore rights: icacls C:\Windows\Installer /grant "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F".
  3. If the ACL is badly mangled, take ownership first with takeown /f C:\Windows\Installer /r /d y, then reapply the grant.
  4. Restart the service with net stop msiserver and net start msiserver, and retry.

The Temp path is broken, redirected or out of space

You have this one if 1632 or 1336 appears next to the two codes, or the failure follows one user around the estate rather than one machine.

  1. Compare what the account is actually using: run echo %TEMP% in a normal prompt and again in an elevated one.
  2. Confirm the folder exists and is writable, and create it if it is missing.
  3. Check free space with fsutil volume diskfree C:. Windows Installer stages the payload before it commits.
  4. If a profile tool or policy has redirected TEMP to a share, point it at a local path for the duration of the install.

The Windows Installer service is stopped, disabled or wedged

You have this one if Nothing installs at all, and msiexec /i returns immediately with no progress dialog.

  1. Check it from an elevated Command Prompt: sc.exe query msiserver.
  2. If it is disabled, set it back: sc.exe config msiserver start= demand, then net start msiserver.
  3. If an earlier install left it stuck, reboot once – a pending transaction can hold the service until the machine restarts.

Write these as sc.exe rather than sc. In PowerShell, sc is an alias for Set-Content, so sc query msiserver does not query anything.

Full reference

The published wording, side by side

Number Published message What it tells you
2503 Called RunScript when not marked in progress The client tried to hand a script to the service and the service had no install running
2502 Called InstallFinalize when no install in progress The client tried to commit and the service had no install running at all
1632 The Temp folder is either full or inaccessible. Verify that the Temp folder exists and that you can write to it A folder problem, named
1336 There was an error creating a temporary file that is needed to complete this installation. Folder: [3]. System error code: [2] A folder problem, with the folder and the system error

The system error code inside 1336 is the useful part. 5 is access denied and puts you on the permissions cause. 3 and 2 are path and file not found, which point at a TEMP variable aimed somewhere that no longer exists. 112 is out of space.

Reading the symptom back to the fault

What you observe Where to look
Both codes appear, then setup rolls back The rollback script could not be created in C:\Windows\Installer
Only one user account is affected That profile’s TEMP path is missing, redirected or denied
Every MSI on the machine fails the same way ACLs on C:\Windows\Temp or C:\Windows\Installer
1632 also appears The temp target is full, offline or on a drive that is not connected
It works from an elevated prompt but not from Explorer Elevation, not permissions

Commands worth keeping to hand

Command What it does
msiexec /i package.msi Installs in the current, elevated context
msiexec /x {ProductCode} Removes a product without needing the original file
msiexec /i package.msi /l*v log.txt Writes the verbose log that names the failing action
icacls <folder> Prints the current access control list
takeown /f <folder> /r /d y Takes ownership of a folder and everything below it
sc.exe query msiserver Shows the state of the Windows Installer service

Why the folder must not be emptied

C:\Windows\Installer is regularly described online as a cache you can clear. It is not. It holds the cached copy of every installed package and patch, and Windows Installer reads those copies to repair, patch and uninstall products. Deleting them leaves applications that cannot be removed or serviced, and the only way back is the original media for each one. If the folder is genuinely consuming an unreasonable amount of space, the answer is to remove products you no longer need through the normal uninstall route, which lets the installer clean up its own cache entries.

When it fails from an elevated prompt too

  1. Take the verbose log and find the first Return value 3. The action named immediately above it is the one that failed.
  2. Read the lines just before it for a path or a registry key. Those are the concrete thing to check.
  3. Confirm the account really is elevated with whoami /groups rather than assuming the shortcut worked.
  4. Try a second, unrelated MSI. If that also fails, the machine is the problem; if it installs, the package is.
  5. If the machine has a pending restart from an earlier install, take it before drawing any conclusions.

Every code this article covers

Code What it points at Source
2502 InstallFinalize was called when the installer service had no install in progress Microsoft Learn
2503 RunScript was called when the installer service was not marked as having an install in progress Microsoft Learn
1632 The Temp folder is full or inaccessible Microsoft Learn
1336 A temporary file needed to complete the installation could not be created; the message names the folder and the system error code Microsoft Learn

Confirm the fix worked

  1. Run the installer again the ordinary way and confirm it either completes or prompts for elevation and then completes.
  2. Check the product appears in Settings, Apps, Installed apps and that its uninstall entry works.
  3. Run icacls C:\Windows\Installer and confirm SYSTEM and Administrators both hold full control.
  4. Install a second, unrelated MSI to confirm the machine is generally healthy rather than one package being special.
  5. Run sc.exe query msiserver and confirm the service starts on demand rather than being disabled.

Questions people ask about this

Does fixing this cost anything?

No. There is no licence, key or paid tool involved in 2502 or 2503. Every step uses commands that ship with Windows, and the fix is an elevation or permission change on folders you already own.

Which of the two codes comes first?

2503, at the point the client hands a script to the service. 2502 follows when the client calls InstallFinalize to commit and the service still has no install in progress. Plenty of write-ups have this the other way round; Microsoft’s published messages settle it.

Is it safe to run icacls against Windows folders?

Granting SYSTEM and Administrators full control on the Temp and Installer folders restores what Windows sets by default, so the risk is low. What is not safe is a sweeping reset across the whole drive, or removing entries instead of adding them.

The installer still fails from an elevated prompt. What now?

Take the verbose log and search for the first occurrence of Return value 3. The action named just above it is the one that failed, and it usually points at a specific path or registry key you can check directly.

Can I stop this happening across the estate?

Deploy in the system context through your management tool rather than relying on users to elevate, and keep the default ACLs on the Temp and Installer folders in whatever hardening baseline you apply. Those two things remove nearly all of these reports.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix MSI 1619 and 1620: This Installation Package Could Not Be Opened Free Fix Runtime Error R6034: An Application Made an Invalid Attempt to Load the CRT License Error MSI 1921 and 1923: Service Could Not Be Stopped or Installed by the Setup Free Fix 0x80073CFB: The Package Is Already Installed or Cannot Be Downgraded
โ† Back to Knowledge Base