More Windows 10 Fun: Installing VirtualBox

Having upgraded my computer to Windows 10, I found myself unable to install updates to VirtualBox. After downloading the 4.3.40 (build 101610) release, clicking the installer immediately gave the error:

Failed to create extraction path 'C:\Users\jeremy\AppData\Local\Temp\VirtualBox': VERR_ALREADY_EXISTS

Googling this message gave two themes: First was “you cannot upgrade the VirtualBox Guest Extensions while you have a VM in the ‘saved’ state” (a common theme on the VirtualBox forums) and then separately some source code which raised the error when it couldn’t create a temporary directory. But it didn’t give me pointers to any useful fixes.

Having tried various approaches including trying to install VirtualBox 5 instead, uninstalling VirtualBox 4 before running the 4 and 5 installers, and Windows Compatibility settings, I finally hit upon this solution:

Open a command prompt, and change directory to the location where you have downloaded the VirtualBox installer. Then run:

VirtualBox-4.3.40-101610-Win.exe --path .\tmp --extract

(Use the correct .exe file name for the version you have downloaded)

This will extract the MSI installer files to a directory called “tmp”. Then run the MSI from this folder.

Having done that, the installer completes OK.

Updated to add: In the comments, Chaomai pointed out another solution to this problem. Having now had a chance to test it, I can confirm his approach works for me as well.

If you see the error below, his suggestion is to look in the current user’s AppData/Temp folder. (which is accessible via the %TEMP% environment variable on most machines) Here you will find a file called VirtualBox with no extension:

VirtualBox File

Delete this file, and re-running the installer will succeed. Cheers Chaomai.


8 thoughts on “More Windows 10 Fun: Installing VirtualBox

  1. Thanks for the solution!

    I got another way to fix it:
    Check C:\Users\jeremy\AppData\Local\Temp. There should be a text file, which name is exactly ‘VirtualBox’.

    Delete it and the installer will perform installation correctly.

    • Run the setupfile in compatibility mode.
      Right Click VirtualBox setup file—Properties—-compatibility
      Select Run this Program in compatibility mode (windows server 2008 sp1)
      Note : my Host OS/Physical OS running on windows 2008 R2.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.