Enable user choice if VirtualBox will be the default VHD handler in Windows

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
RubensRainelli
Posts: 12
Joined: 27. Jul 2017, 17:04

Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by RubensRainelli »

Hello, I use frequently VHD and VHDX as virtual storage, but VirtualBox sets as predefined program to open VHD files, with this setting I'm unable to open VHDs just double clicking on it, and I need to use Disk Management console to mount them.

It's impossible to set them back to Explorer after this hard integration.

Could you kindly let user choice if they want VirtualBox as favourite program for VHD and other extensions?
Maybe this would be perfect until Windows 7, but now, since Windows 8, VHD and VHDX is integrated quite similarly as ZIPs files.

Thanks in advice.

How can users revert back to Windows default for VHD? Setting Explorer as default will not does the trick.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by scottgus1 »

What happens on your PC when you open the VHD in a file window? On my VB host Windows 10 PC, even though Virtualbox's icon is set for VHD's, I still get a Diskpart command window which mounts the VHD on the host OS.
RubensRainelli
Posts: 12
Joined: 27. Jul 2017, 17:04

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by RubensRainelli »

Maybe could be useful to let choose wich .extension files associate :wink:

Anyway the solution is to create a .REG file with next content, since also 7zip has this trouble:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.vhd]
@="Windows.VhdFile"
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by socratis »

@RubensRainelli
I merged your two identical topics. Please do not post the same topic on two different forums. The next time I will not merge them, I will delete them. According to the forum rules, duplicate posts are not allowed. It's not good etiquette...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
RubensRainelli
Posts: 12
Joined: 27. Jul 2017, 17:04

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by RubensRainelli »

socratis wrote:I merged your two identical topics.
Really sorry for this but I didn't know if would be a request or a problem, and set up them one as feature request and one as problem :?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by socratis »

It's never a problem the first time, you didn't know and I don't expect everyone to read the forum rules, so don't worry about it. ;)

And actually it's a very good suggestion, that's why I left the one in the "Suggestions" sub-forum.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
RubensRainelli
Posts: 12
Joined: 27. Jul 2017, 17:04

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by RubensRainelli »

socratis wrote:That's why I left the one in the "Suggestions" sub-forum.
Thanks a lot :-)

Anyway this was a BIG trouble for me before found that register Workaround.

Hope this will help other people with my same needings.

Can I make a new post titled "How to set Windows as default VHD favourite launcher"?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by socratis »

RubensRainelli wrote:Can I make a new post titled "How to set Windows as default VHD favourite launcher"?
I changed the whole title of the thread and its posts to "Enable user choice if VirtualBox will be the default VHD handler in Windows".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
RubensRainelli
Posts: 12
Joined: 27. Jul 2017, 17:04

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by RubensRainelli »

socratis wrote:I changed the whole title of the thread and its posts to "Enable user choice if VirtualBox will be the default VHD handler in Windows".
Not SEO friendly as mine :-D
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by socratis »

Yours wasn't a suggestion for VirtualBox, it was a generic Windows suggestion. There is no way in the seven kingdoms that the developers would act on something like your suggestion... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by scottgus1 »

I want to clear up a bit of misinformation that I posted above. My earlier report that my host mounts the VHD with a double-click despite having Virtualbox installed is because I had made custom scripts to mount and dismount VHDs (and I forgot about the scripts).

I did not know that Windows (10 at least*) has a mount function tied to the double-click on a VHD, if Virtualbox is not installed, in the "Windows.VhdFile" registry key for the .VHD extension that RubensRainelli posted. And the Virtualbox registry information for VHDs does not have a mount-on-the-host-Windows-OS function built in nor point to the default Windows mount command. Virtualbox merely re-titles the VHD from "Disc Image File" to "Virtual Hard Disk" and gives a different icon and nothing else.

*I looked on a Windows 7 host and found that there is no "Windows.VhdFile" registry key. On a Windows 7 PC without Virtualbox installed, the only option to open the VHD is the Open With... box. Windows 7 does not know how to mount a VHD from Explorer, although 7 can mount the VHD from Disk Management. I do not know how Vista, 8 or 8.1 handle VHDs. On Windows 10 hosts without Virtualbox, a Mount command is available for VHDs. With Virtualbox installed on Windows 10, only Open With... is available.

I will second RubensRainelli's suggestion insofar that Virtualbox should continue to allow Windows (10 at least) hosts to mount VHDs directly in Explorer if the Windows OS previously had a VHD Mount command available. It might be possible to read the registry for previous commands for VHDs and copy those commands to the new Virtualbox registry key during Virtualbox installation.

I would point out to Ruben that the registry command he posted may only be good for certain Windows versions (definitely not the two non-Virtualbox Windows 7 PCs I looked at - putting that key in a Windows 7 host may break things). And I would also point out that even if the suggested solution could be filtered for correct Windows versions, it will be unlikely that the developers will change things until Oracle's paid-for virtualization program based on free Virtualbox gets enough customers that also want to continue mounting VHDs on Oracle $VM hosts. However, the developers may like the idea, and a quick trip to the Bugtracker to post an Enhancement Request may not come amiss.
RubensRainelli
Posts: 12
Joined: 27. Jul 2017, 17:04

Re: Enable user choice if VirtualBox will be the default VHD handler in Windows

Post by RubensRainelli »

scottgus1 wrote:I looked on a Windows 7 host and found that there is no "Windows.VhdFile" registry key.
If I remember well this function was put in Windows 8.x never had this on Windows 7.

Windows 7 only support 3 ways:
- mount from disk manament;
- mount with diskpart utility;
- use an PowerShell script (made some months ago and works well, the fastest one).

If I found back Microsoft docuntation I'll absolutely post the scripts for PowerShell
Post Reply