When installing or reinstalling a program if you receive an error saying — Installation fails: Installation ended prematurely because of an error, then it’s mostly because of something which may be left behind by the previous uninstallation – and that is causing this problem. When programs uninstall, they leave behind files, and if the uninstallation wasn’t complete, it would result in such error.
Installation fails: Installation ended prematurely because of an error
Installation ended prematurely because of an error is a generic error which can occur with any software installation or reinstallation. So the solutions we suggest here works for similar issues.
- Use a third-party uninstaller
- Install in Clean Boot state
- Restart Windows Installer service
- Reregister Windows Installer service
- Re-register VBScript.dll.
Once done, make sure to download a fresh copy of the software you want to install.
1] Use a third-party uninstaller
If the software uninstallation weren’t complete, it would leave files which could be the cause. We would suggest you use a third-party uninstaller which can scan for unnecessary files, registry entries and clean up temporary files. Uninstaller programs like IObit Uninstaller, Revo Uninstaller, and others are excellent for daily usage.
2] Install in Clean Boot state
Reboot your computer into Clean Boot state, and then try installing the software. Clean Boot state only runs necessary services, and hence anything which blocks the installation will not be available.
Related read: How to uninstall Programs in Safe Mode
3] Restart the Windows Installer service
- Type services.msc in the Run prompt and hit Enter
- Locate Windows Installer Service.
- If it is running, click the Stop and then the Start button.
- If it is not running, click on the Start button.
This Service can add, modify, and remove applications provided as a Windows Installer (*.msi, *.msp) package. If this service is disabled, any services that explicitly depend on it will fail to start.
4] Re-register Windows Installer Service
- Open Command Prompt or PowerShell with admin privileges.
- Unregister the installer service using msiexec /unreg command.
- Register the installer using msiexec /regserver
Try installing it again.
5] Re-register VBScript.dll
You may need to re-register the VBScript.dll file by executing the following command in an elevated command prompt:
See if this helps.
Lastly, if nothing works, I would recommend you share your Windows event logs with Microsoft customer service.