Removing VirtualBox to get Windows Phone Emulator Working

Created   

Categories: ,

I always preferred VirtualBox’s simplicity over the Enterprise class complexity of Windows 8 Hyper-V.
However, in order to get a working Windows Phone 8 Emulator working, you need to use Hyper-V.
Unfortunately when trying to do this, I got an error saying that the virtual switch could not be created. I tried some fixes from StackOverflow and ServerFault, but they didn’t work. I couldn’t create nay kind of virtual switch in Hyper-V. A common theme from my searching was that VirtualBox was involved.

Uninstalling VirtualBox manually didn’t help.
Looking in the registry, I noticed hundreds of network adapters with a VirtualBox driver (just search the registry for ‘vbox’)
I couldn’t delete these keys even with Admin privileges
Apparently I needed to run Regedit as ‘System’
THe easiest way to do this was using SysInternals Psexec

C:\Windows\System32\> psexec /i /s regedit

/i means ‘interactive’, or allow the program to display a UI
/s means run the program as the ‘system’ user

Because there were so many to delete, it was easier to export the parent key, edit in Notepad, then save as a .reg file and re-import.

After doing this, removing all references to ‘vbox’ and ‘virtualbox’ from the registry, deleting other invisible network adapters from the registry, running cccleaner, rebooting, removing Hyper-V from Windows, rebooting again, Adding Hyper-V to windows… I finally got my emulator to work.

Lesson: Don’t ever install VirtualBox, stick to Hyper-V (as long as you meet Microsoft’s bizarrely restrictive processor requirements of course)

Comments