Unable to fix VirtualBox and / or reinstall it

2

I installed Virtual Box on Windows 7 Ultimate x64 and then I upgraded my system to Windows 10.

VirtualBox did work properly with both versions of Windows and I was able to run everything perfectly.

Today I did the downgrade to Windows 7 again and I can't open VirtualBox anymore because I get this error:

Failed to create COM object

Callee RC: REGDB_E_CLASSNOTREG” (0x80040154)

I tried to reinstall it but I get some error messages telling me that I need to choose a different path and that I cannot uninstall the previous version.

How can I fix it or reinstall it?


edit:

Since I wasn't able to uninstall it normally because the path wasn't on C:, I deleted the folder "Virtual Box" with all the files, but I got the same errors

error screenshot


edit 2:

I also did the following procedure:

  1. Open command prompt as administrator
  2. Run the command:

    md `cd D:\Unknown\Users\Administrator\AppData\Local\Temp`
    
  3. Open %temp%

  4. Delete everything I was able to remove in this folder (I couldn't delete FXSAPIDebugLogFile because an error message told me it was already opened in file manager)
  5. Download VirtualBox version 5.0.8
  6. Run the VirtualBox installer for VERSION 5.0.8. and I got the errors described previously (see the screenshot) as soon as it opened
  7. I tried opening %temp%\VirtualBox\ but I couldn't find it .

edit 3:

  • I performed some of the previous steps (3 through 8) by using a second device with Win 8.1 installed to get the .msi file;
  • I performed steps 1 through 4 on the PC I'm trying to reinstall VirtualBox;
  • I copy-pasted the %temp%\VirtualBox\VirtualBox-5.0.8-r103449-MultiArch_amd64.msi file from the second device to the folder D:\Unknown\Users\Administrator\AppData\Local\Temp on my Win 7 PC;
  • I run the installer for VirtualBox 5.0.14 and finally I succeeded in installing it, but now when I open the new VirtualBox I get this error again

    Failed to create COM object
    
    Callee RC: REGDB_E_CLASSNOTREG” (0x80040154)
    
virtualbox
installation
virtualization
uninstall
asked on Super User Feb 2, 2016 by franz1 • edited May 2, 2019 by phuclv

1 Answer

1

If running the installer again does not give you the choice to uninstall VirtualBox, let's try to manually remove it (folders, drivers, and registry entries).

Create a system restore point

Close VirtualBox (kill any VirtualBox related processes)

Confirm that you have deleted C:\Program Files\Oracle\VirtualBox

Delete the following files:

  1. C:\Windows\System32\Drivers\vboxdrv.sys
  2. C:\Windows\System32\Drivers\vboxnetadp.sys
  3. C:\Windows\System32\Drivers\VBoxNetAdp6.sys
  4. C:\Windows\System32\Drivers\vboxnetflt.sys (You may not have this driver depending on what version of VirtualBox you previously installed)
  5. C:\Windows\System32\Drivers\vboxusbmon.sys
  6. C:\Windows\System32\Drivers\vboxusb.sys (You may not have this driver depending on what version of VirtualBox you previously installed)

In the registry navigate to HKLM\System\CurrentControlSet\Services.

Delete the following keys:

  1. VBoxDrv
  2. VBoxNetAdp
  3. VboxNetFit
  4. VBoxNetLwf
  5. VBoxUSBMon
  6. VBoxUSB (You may not have this key depending on what version of VirtualBox you previously installed)

Restart your computer

Download the newest version of VirtualBox

Install VirtualBox

Additional Instructions 1

Run Command Prompt as Administrator Run the following commands

cd "C:\Program Files\Oracle\VirtualBox"
VBoxSVC /ReRegServer
regsvr32 VBoxC.dll

Delete the folder C:\Users\.VirtualBox

Try to run VirtualBox

Additional Instructions 2

  1. Open Command Prompt as Administrator
  2. Run the command below:

    md "C:\users\unknown\appdata\local\temp"

  3. Open %temp%

  4. Delete everything in this folder

  5. Download VirtualBox version 5.0.8 (http://download.virtualbox.org/virtualbox/5.0.8/VirtualBox-5.0.8-103449-Win.exe)

  6. Close all other programs

  7. Run the VirtualBox installer for VERSION 5.0.8. As soon as you get to the first screen that says welcome STOP.

  8. Open %temp%\VirtualBox\

  9. Copy %temp%\VirtualBox\VirtualBox-5.0.8-r103449-MultiArch_amd64.msi to C:\Users\UNKNOWN\AppData\Local\Temp\

  10. Delete the files in %temp%

  11. Now close everything

  12. Run the VirtualBox installer for VERSION 5.0.14

If that fixes the problem, then when it is done and you restart your computer, you can safely delete C:\Users\Unknown. You can delete the files in %temp% again too.

answered on Super User Feb 3, 2016 by user5870571 • edited Feb 4, 2016 by user5870571

User contributions licensed under CC BY-SA 3.0