'What are error 2503 and error 2502 in mongo db?

I'm trying to install mongo db, but when installing compass it's not working properly. I tried to uninstall and reinstall, but when uninstalling it give two errors: error 2503 and error 2502.

I found an answer here, but it doesn't work.



Solution 1:[1]

Fix For Windows error 2502, 2503

msiexec /unreg
msiexec /regserver
taskkill /IM explorer.exe /F
start explorer.exe

I have successfully resolved the problem Thanks

Solution 2:[2]

I had this issue and solved it by adding full permission to the windows Temp folder.

Solution 3:[3]

The codes 2503 and 2502 are windows installer error codes (See: here for a list of all windows installer error codes & messages); The issue can come up when installing many programs, so googling this issue will likely lead you to general windows tech support.

For me, I believe the issue was with my clock being un-synced as I was previously playing with set-date on PowerShell to change my system clock.

There are many other suggested fixes which often include the following general steps:

  • Relaxing file permissions on C:\Windows\Installer
  • Relaxing file permissions on C:\Windows\TEMP
  • Unregistering and reregistering the Windows Installer as suggested in @AnilRana's answer using msiexec /unreg & msiexec /regserver

For more potential solutions, I recommend searching for error 2503 at https://answers.microsoft.com/ and searching through tech support threads to find suggestions.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anil Rana
Solution 2 Mahdi Farhani
Solution 3 Josh Desmond