Cannot uninstall or reinstall LibreOffice after HDD failure

I’m on Windows 7. I had LibreOffice installed on a hard drive (G:) which had a hardware failure. I removed the drive from the computer (now there is no drive letter G: in my system) and now I would like to reinstall LibreOffice to another drive (C:). The problem is, the installation setup gives “Error 1327.Invalid Drive: G:” and closes. If I try to uninstall LibreOffice, I get the same error. So, I cannot remove the old (non-existing version), and the installer thinks that I already have LibreOffice installed on drive G: but it cannot do a reinstall because there is no drive G: in the system.

Please help.

Install Ccleaner (if you don’t already have that) and run a check for registry errors. That will give you a long list of registry items that refer to the now missing G: drive. Select all of them and delete. Then try again to install LibreOffice. If that still fails, you may have to run the registry editor, then find all keys with LibreOffice in them and delete them. After that restart the computer an install libreoffice again.