WINDOWS INSTALLER ERROR
Error 2502 and 2503: The Installer Has Encountered an Unexpected Error
2502 and 2503 are internal errors of Windows Installer. Their texts name two of its steps, RunScript and InstallFinalize, called while no installation was marked as in progress.
WHAT WINDOWS SAYS
Called RunScript when not marked in progress.
Message 2502 is "Called InstallFinalize when no install in progress." Microsoft's event list gives the general sentence used for internal errors: "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is [1].", where [1] is the number.
Wording from Microsoft's documentation, linked under Sources.
TECHNICAL SUMMARY
| Number | 2503, 2502 |
|---|---|
| Where it appears | Message shown by a setup |
| In PC Tweaker Uninstaller | Shows the exit code |
What causes Error 2502 and 2503
- Microsoft documents codes above 2000 as internal errors that have no authored message text, and says they can occur if the installation package has been incorrectly authored.
- Microsoft publishes no list of causes specific to 2502 or 2503. Advice found elsewhere for these two numbers is not from Microsoft's documentation, and we have not reproduced it in a test, so it is not repeated here.
How to fix Error 2502 and 2503, safest step first
With no article for these codes, the steps are those of Microsoft's general page for programs that will not install or uninstall, in its order:
Restart the PC and try once more
Use Start > Power > Restart. It is the first solution on Microsoft's page for programs that will not install or uninstall.
To undo: Nothing to undo: a restart changes no setting.
Repair the app from Settings, if it offers that
Select Start > Settings > Apps > Installed apps, select the app, then Advanced options > Repair. Microsoft lists this as its second solution and notes that not all desktop apps support it. Reset is the next button on the same page: Windows states there that the app's data will be deleted, so keep it for last.
To undo: Repair has no undo button, and Reset cannot be undone because it deletes the app's data. A restore point made beforehand brings back the previous state of the program.
Uninstall from Settings instead of the program's own shortcut
Select Start > Settings > Apps > Installed apps, select the app, choose Uninstall and follow the instructions. This is Microsoft's third solution.
To undo: Install the program again from its setup. Whether your settings survive a reinstall depends on the program.
Make a restore point before the steps that change something
Select Start, type Create a restore point, open it, and on the System Protection tab choose Create. Microsoft notes that System Protection is not turned on by default; if Create is greyed out, choose Configure and turn it on for the system drive first.
To undo: A restore point changes nothing by itself. To go back later, run System Restore and pick it: Microsoft says it reverts system files, the registry and installed programs, and leaves your personal files alone.
On Windows 10, run Microsoft's Program Install and Uninstall troubleshooter
Microsoft's page offers the download under its Windows 10 tab. Microsoft says it fixes corrupted registry keys on 64-bit systems, corrupted registry keys that control update data, and problems that prevent programs from being installed, completely uninstalled or updated, or that block uninstalling through Add or Remove Programs. On Windows 11 the same page gives the Settings steps instead.
To undo: The troubleshooter has no undo of its own, which is why a restore point comes before it.
Get a current installer from the publisher, or ask its support
Download the program's current setup from its publisher and run that one. Microsoft's page ends with contacting the app publisher for support. Since Microsoft ties internal errors to how a package was authored, a current setup from the publisher is the one to try.
To undo: Nothing to undo until a setup completes; after that, uninstalling the program is the way back.
Repeat it once with a log, to see the step that failed
From an administrator Command Prompt run
msiexec.exe /x {ProductCode} /L*V "%TEMP%\msi-remove.log", with the program's product code in place of {ProductCode}. Microsoft documents /x as uninstall and /L*V as logging all information including verbose output. Open the log and read the lines just before the error number.To undo: This runs the real setup or removal again, so it is not a dry run. The log is a text file you can delete.
Check it yourself, without changing anything
Find the message in the Application log (PowerShell)
Microsoft documents event 10005 as the installer's unexpected-error message; its text holds the error code and the arguments. Nothing is changed.
PowerShellGet-WinEvent -FilterHashtable @{ LogName='Application'; ProviderName='MsiInstaller'; Id=10005 } -MaxEvents 5 | Format-List TimeCreated, MessageRead what Windows Installer logged (PowerShell)
Microsoft documents event 1033 (installation completed with status) and 1034 (removal completed with status): each names the product, its version and the status number, which is 0 on success. Nothing is changed.
PowerShellGet-WinEvent -FilterHashtable @{ LogName='Application'; ProviderName='MsiInstaller'; Id=1033,1034 } -MaxEvents 10 | Format-List TimeCreated, Id, Message
What PC Tweaker Uninstaller does with Error 2502 and 2503
Shows the exit codePC Tweaker Uninstaller removes a Windows Installer program with the command it shows you first in the Removal Brief, msiexec.exe /x {ProductCode} /qn /norestart, after asking Windows for a restore point when the removal needs administrator rights. For a program installed for all users it starts that command with administrator rights, after one Windows prompt. Because that run is silent, no message box with this number appears: the report shows the exit code msiexec.exe returned and says the program may not be fully removed, and the attempt is kept in the Removal Ledger with that code. We have not tested whether a removal that fails with 2503 from Settings completes this way, so we do not claim it does.
PC Tweaker Uninstaller: see the exact command before a removal runs
Common questions
Why do errors 2502 and 2503 appear together?
They are two internal messages: 2503 is "Called RunScript when not marked in progress" and 2502 is "Called InstallFinalize when no install in progress". Both say a step was reached without an installation in progress.
Do 2502 and 2503 mean the installer file is damaged?
Microsoft says internal errors above 2000 can occur if the installation package has been incorrectly authored. It does not list other causes for these two, so a current setup from the publisher is the first thing to try.
Is there an official Microsoft fix for error 2503?
Not a dedicated one. Microsoft documents the two messages and offers its general steps for programs that will not install or uninstall: restart, repair from Settings, uninstall from Settings and, on Windows 10, the Program Install and Uninstall troubleshooter.