Fix MSI installer errors 2502 and 2503 in Windows 10, Windows 8.1 and Windows 7

Sometimes Windows Installer starts to behave unexpectedly in various versions of Windows, including Windows 10, Windows 8.1 and Windows 7. Every error message has an error code but there is no further information given to the user about what action he should take to fix the error. I suddenly started facing one such error out of nowhere. While uninstalling any app which is shipped as an MSI package, it showed errors 2502 and 2503 and then the installation or uninstallation failed. Here is what these errors mean and how you can fix them easily.

MSI installer errors 2502 and 2503 in Windows 10, Windows 8.1 and Windows 7 usually indicate that the folder C:\Windows\Temp has incorrect NTFS permissions.

To let Windows Installer operate normally, this folder need to have full write access permissions and ownership for your user account. In some cases (depending on how messed up your folder permissions are), this won't be enough. You need to give full access permissions to the Administrators group as well for the folder C:\Windows\Temp. Note that this is not the same folder as %tmp% which can be C:\Users\\AppData\Local\Temp\. Here is how you can fix these MSI errors.

Before you proceed, I recommend you to read the following article: How to take ownership and get full access to files and folders in Windows 10. It contains useful information about changing NTFS permissions.

  1. Open File Explorer, and then locate the file or folder you want to take ownership of. In our case, it is the folder
    C:\Windows\Temp
  2. Right-click the file or folder, click Properties, and then click the Security tab.

  3. Click the Advanced button. The "Advanced Security Settings" window will appear.
  4. Click the Add button. The "Permission Entry" window will appear on the screen:
  5. Click "Select a principal" and select your user account:
  6. Set permissions to "Full control":

    Click OK.

Repeat the same for the built-in "Administrators" group.

Now, try to uninstall or install your MSI package. Everything should work properly now.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

10 thoughts on “Fix MSI installer errors 2502 and 2503 in Windows 10, Windows 8.1 and Windows 7”

  1. Try this simple tool from Microsoft:
    https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed

    1. These 2502 and 2503 errors are because a program needs to install using the temp folders and they do not have permission to do so. I have been doing IT for 35+ years and my son wanted to install Minecraft the Java Edition and didn’t want the Windows 10 version. After all, he paid for it. This fixes any 2502 or 2503 error.

      These next steps give permissions to the temp folder to fix not having those errors. “Game Over” computer! Hi Score, me, cyanohydrax.

      Press the Windows key on the keyboard and while holding that key down, press the letter “R”
      The Run command will display
      type cmd
      Hold the control key + the shift key and while holding both of those keys, use the mouse to click the OK button
      Answer Yes if you are prompted with a Yes/No question

      copy and paste these commands

      takeown /f “%systemroot%\Temp” /R /A /D Y
      icacls “%systemroot%\Temp” /inheritance:r /grant:r Users:(OI)(CI)F /T
      icacls “%systemroot%\Temp” /inheritance:r /grant:r Everyone:(OI)(CI)F /T
      icacls “%systemroot%\Temp” /grant Administrators:F /T
      icacls “%systemroot%\Temp” /grant Users:F /T
      icacls “%systemroot%\Temp” /grant SYSTEM:F /T
      icacls “%systemroot%\Temp” /grant Everyone:F /T

      takeown /f “%temp%” /R /A /D Y
      icacls “%temp%” /inheritance:r /grant:r Users:(OI)(CI)F /T
      icacls “%temp%” /inheritance:r /grant:r Everyone:(OI)(CI)F /T
      icacls “%temp%” /grant Administrators:F /T
      icacls “%temp%” /grant Users:F /T
      icacls “%temp%” /grant SYSTEM:F /T
      icacls “%temp%” /grant Everyone:F /T

      Done. No reboot necessary.

      – cyanohydrax

  2. That’s odd, because, since I remember, even in older versions of windows, I never had standard user access to that folder; it was always a system folder…
    Also, only recently I started to have this problem (can’t say since when, but at least since latest spring update, I do). Some apps I installed just months ago without a problem, and now I can’t install or remove any msi app…

    1. Oh yeah, and sure enough, temp is already owned by admin group, with full control of it…
      Also, one app that has this problem already brings up uac prompt on install, yet, still gives me those two errors and won’t install.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.