VM launchable from the VB menu but not from the .vbox

Discussions related to using VirtualBox on Windows hosts.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

I am still running 5.1.6 on my W10 workstation, so I tried on my W7 home server running 5.1.18: doubleclicking the vbox on a pre-registered guest starts the guest.

The command line for clicking the vbox file does seem to be right on your computer, M. The main Virtualbox window receives the path and name of the vbox file and tries to act on it, but seems to be trying to register all the time, instead of opening if the guest is already registered. Hmmm....
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VM launchable from the VB menu but not from the .vbox

Post by Perryg »

Sorry, that's all I got! Like I said it has been a long time since I tested or used the *.vbox file to start a guest. In Linux I am given a choice to open with a text editor ( my default ) or the program, which I just tested again and it works as advertised. I wonder since this was added and maybe the guest might actually have been created in an older version if that has anything to do with it.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM launchable from the VB menu but not from the .vbox

Post by mpack »

@Scottgus, could you post a screenshot of your "Open with..." window, similar to the one I posted?

IMHO the only explanation is that your file association is different from mine. I also had a quick look through the preferences, but didn't spot anything on point.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM launchable from the VB menu but not from the .vbox

Post by mpack »

Perryg wrote:I wonder since this was added and maybe the guest might actually have been created in an older version if that has anything to do with it.
The DOS7 guest I posted about earlier has "version="1.13-windows"" at the top of the file. I think of this VM as relatively new: it was created to successfully verify a claim that if you deleted all the Windows stuff from a Win98 image you could end up with a working DOS7 system - and indeed you can. Mind you, the datestamp on the VDI says November 2015.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

Sure, here ya go:

Windows 7, 5.1.18:
vbox open with W7.png
vbox open with W7.png (10.9 KiB) Viewed 2027 times
Windows 10, 5.1.6:
vbox open with W10.png
vbox open with W10.png (24.19 KiB) Viewed 2027 times
In both hosts the registry keys for ".vbox" point to "progId_VirtualBox.Shell.vbox", which has the command line:
"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" "%1"
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM launchable from the VB menu but not from the .vbox

Post by mpack »

My registry entries are identical to yours, so this doesn't seem to be a shell association feature. It must be a VirtualBox preference. Any such preference would have to be stored in VirtualBox.xml - I'll go have a look. Now my VirtualBox.xml file may indeed be quite old.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

My newest guests made under VB 5.1.6 and 5.1.18 have 1.15 as the vbox file version. But I have an older guest with a 1.12 vbox file, and that guest also opens with a double-click on the vbox file.
socratis
Site Moderator
Posts: 27329
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: VM launchable from the VB menu but not from the .vbox

Post by socratis »

I even had a bug report filed about this ( with 5.1.8 ) because it was ... crazy. Or driving me crazy. #16161: Opening a VBOX file from Win Explorer opens a 2nd instance of VirtualBox Manager. From the rather short description:
Launch VirtualBox Manager. Double-click (or open) a VBOX file from Windows Explorer/File Manager.
  • If the VM is already registered and not running, it will run. Good.
  • If the VM is already registered and running, it will get the focus. Good.
  • If the VM is not registered, a 2nd instance of VirtualBox Manager opens up just to register the VM, which also appears on the 1st instance as well. Not good.
Especially on Windows, if you couple this, with #14988 it makes things not ... optimal.
And for completion, here's what my registry has to say about this. There are three main chunks: 1st is the generic '.vbox' file association, the 2nd is the handle of that association, and the 3rd is from my user profile, where you can also see that one of my preferred applications to open '.vbox' files is "Notepad" (please don't shoot me, I hadn't installed Notepad++ yet):

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.vbox]
@="progId_VirtualBox.Shell.vbox"
"Content Type"="application/x-virtualbox-vbox"



[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\progId_VirtualBox.Shell.vbox]
@="VirtualBox Machine Definition"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\progId_VirtualBox.Shell.vbox\DefaultIcon]
@="\"C:\\Program Files\\Oracle\\VirtualBox\\VBoxRes.dll\",-201"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\progId_VirtualBox.Shell.vbox\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\progId_VirtualBox.Shell.vbox\shell\open]
@="Open"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\progId_VirtualBox.Shell.vbox\shell\open\command]
@="\"C:\\Program Files\\Oracle\\VirtualBox\\VirtualBox.exe\" \"%1\""



[HKEY_USERS\S-1-5-21-2097230502-2832730963-1703595478-1001\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.vbox]

[HKEY_USERS\S-1-5-21-2097230502-2832730963-1703595478-1001\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.vbox\OpenWithList]
"a"="VirtualBox.exe"
"MRUList"="ab"
"b"="NOTEPAD.EXE"

[HKEY_USERS\S-1-5-21-2097230502-2832730963-1703595478-1001\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.vbox\OpenWithProgids]
"progId_VirtualBox.Shell.vbox"=hex(0):
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: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

Here's my present Virtualbox.xml for a comparison.
VirtualBox - Copy xml.txt
(4.8 KiB) Downloaded 8 times
socratis
Site Moderator
Posts: 27329
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: VM launchable from the VB menu but not from the .vbox

Post by socratis »

mpack wrote:this doesn't seem to be a shell association feature. It must be a VirtualBox preference
I can't see how double-clicking on a .vbox file could involve the VirtualBox.xml file in any way.
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: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

Socratis, when I open a vbox with Notepad all the lines are strung together. I use Wordpad, reads the end-of-line characters better than Notepad. (turn off word-wrap in Wordpad.) Still, I am going to look into Notepad++, sounds interesting...
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM launchable from the VB menu but not from the .vbox

Post by mpack »

socratis wrote:I can't see how double-clicking on a .vbox file could involve the VirtualBox.xml file in any way.
Double clicking the .vbox file opens the manager. Manager options are stored in VirtualBox.xml, so I don't see why it would be a surprise that these have an affect.

Anyway, I have now confirmed that if I hide my ".VirtualBox" folder and let VirtualBox create a new one, then double clicking the .vbox file launches the VM. If I restore the old ".VirtualBox" folder then it resumes its previous behaviour.

I have attached my VirtualBox.xml below. It should be possible for anyone interested to cut and paste their own VM register into this and confirm that this .xml creates the behaviour I describe, though I still don't see the likely culprit in the preferences sections.

I have to say: I actually prefer the behaviour of my own system. While I was able to verify that double clicking the .vbox can launch a VM, I also managed to crash my PC when I managed to do it twice - plus it left a zombie VBoxSVC process in the task list.
Attachments
VirtualBox.xml.zip
(2.13 KiB) Downloaded 7 times
socratis
Site Moderator
Posts: 27329
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: VM launchable from the VB menu but not from the .vbox

Post by socratis »

scottgus1 wrote:when I open a vbox with Notepad all the lines are strung together
You say line feed, I say carriage return, others say form feed. 6 of these, 1/2 dozen of those... ;)
And I opened it ONCE. Windows has a hell of a memory...
scottgus1 wrote:I use Wordpad ... I am going to look into Notepad++
After you're done checking out Notepad++, check its plugins. And because it took me quite a while to figure out two pesky options, 1) to change the font you go to the "Style Editor" and 2) to prevent the last document from being opened, go to the Backup preferences.
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: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

OK, Mpack, I took the bait and here's what I got:
I downloaded you Virtualbox.xml, backed up mine, copied my <MachineRegistry> block over the top of yours, saved, and moved your modified xml over the top of mine & replaced the file. Doubleclicked 1.15 and 1.12 vbox files and....

The guests started without errors. No attempt to register, just guest startup.

Kinda puzzling, ain't it?

Since a new .Virtualbox folder started the launch-the-guest functionality (albeit with host crashes) Maybe there's something else in the old folder that's giving Virtualbox.exe the willies?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM launchable from the VB menu but not from the .vbox

Post by scottgus1 »

Socratis wrote:And I opened it ONCE. Windows has a hell of a memory...
Remove a program from Open With...
https://www.howtogeek.com/howto/18119/r ... -explorer/
In regedit, go to "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"
Then find the .vbox extension key & export it as a backup. Inside are values for the programs marked with single letters. Delete the ones you don't want to see anymore. Windows forgets immediately... Whoosh!!
Post Reply