On and off for the last few weeks I have been trying to get VirtualBox 3.0.2 installed on my Windows 7 RC device with no real success :(. During every install I ended up getting the dreaded “Setup wizard end prematurely” and subsequently VirtualBox wouldn't get installed and it would be back to the drawing board.
Well, after some troubleshooting and some customizing of the MSI file I have finally got VirtualBox installed and running :) but wanted to put this post together for those that are running into the same issue.
So, let’s get to it :)
First, let me define what my system is
1) Windows 7 Ultimate RC 64bit.
2) No previous version of Virtual Box installed on this device.
What your going to need:
1) Orca MSI Editor
2) Windows Driver Kit (MSDN Downloads)
Running the downloaded install of VirtualBox you will get the following installation error. The dreaded “Setup wizard ended prematurely”! That’s never good!
After looking at the log file, you will notice a curious error
”DIFXAPP: ERROR - The operating system you are running on is not supported. Only Windows 2000, Windows XP, Windows Server 2003 and Windows “
After, looking at the above message it appears that DIFXAPP is having a problem some where, my first theory is that the VirtualBox installer is using an older version of the DIFXAPP dll.
So, armed with the above theory, lets update the MSI installer with the updated versions of DIFXAPP dlls.
The first thing we need to do, is to download the Windows Driver Kit (Specifically I downloaded the driver kit for Windows 7). This download contains the updated DIFXAPP file that we are going to need to replace the ones in the MSI. Right now it looks like this download is on the MSDN Subscribers site so you will probably need a MSDN Subscription in order to download it. You can access the site here.
After you have downloaded and installed the Windows Driver Kit we are going to need to update the MSI with these new updated files. I know what your thinking, We didn't get an MSI when we downloaded, we got an EXE. No problem, let me explain. When we run the virtualbox insaller, the EXE extracts and MSI called VirtualBox-3.0.2-r49928-MultiArch_amd64.msi, as see in the following image.
Now, where exactly is this file? The MSI file will get extracted to the users temp appdata folder. On Windows 7 it will be located in the following location
C:Users[YourUsername]AppDataLocalTempVirtualBox
So, now that we have all the necessary files, we need to put it all together and update the MSI file with the updated DIFXAPP dlls. The first thing we are going to want to do is to open up the above MSI file in the Microsoft ORCA MSI Editor. Once you do you will see the following. Note the Binary item in the left pane in selected and in the right pane you can see the DIFX*.dll files that we are going to need to replace.
The next thing we need to do is to delete the DIFX*.dll items from the MSI. You can do this by right clicking on the DIFxApp.dll and selecting “Drop Row” from the menu that pops up. You will need to do this for the DIFxAppA.dll as well. Like the following
The next thing is is to re-add the updated DIFX files we got from the updated Windows Driver Kit to the MSI file. We can do this by right clicking and selecting “Add Row”
Now we need to select the updated DIFxApp.dll we extracted from the Windows Driver Kit we downloaded earlier. In my installation it is located here
C:WinDDK7100.0.0redistDIFxDIFxAppWixLibamd64
Make sure the Name Attribute is the exact name as the DLL name. For example, the name for the DIFxApp.dll you be DIFxApp.dll
You will need to do this once for the DIFxApp.dll and once for the DIFxAppA.dll files. Like the following screen shots.
Once that is complete, you will need to save the MSI file from ORCA. Make sure you just do a File->Save. If you do a SaveAs the MSI will lose information and it will not work.
Once you complete the save you will now be able to run the MSI and get VirtualBox installed.
I am working on a quick video to show the results and should have it up soon. If you have any questions/comments feel free to comment and ping my on twitter twitter.com/johnmcbride