VMware Communities
JMprod
Contributor
Contributor

Opening files in 'Default host application'

VMware gives me the following error-message when I press the PDF or Excel-button in my accounting program. Normally this should start Preview or Excel in macOS (it works with Parallel). Both PDF-files and Excel-files open normally in the default macOS when I double click on them from outside the accounting application.

 

Screenshot 2020-11-23 at 13.54.50.png

Tags (1)
17 Replies
JMprod
Contributor
Contributor

Anyone know what causes this error message and what it means?

Reply
0 Kudos
JMprod
Contributor
Contributor

Does anybody who work with VMware read this forum?

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

@JMprod 

VMTN is a user community forum, where most people post in their own time. While I am an employee and moderator, everything I do here is voluntary.

Perhaps @Mikero will be able to help you.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
JMprod
Contributor
Contributor

Ok - should this be sent to some official support e-mail then? This could be a bug? Parallels has no problem in opening the default application.

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

@JMprod 

There isn't a "support" email that I'm aware of. Fusion has paid-for support but I believe that's associated with minimum numbers of licenses. Maybe check here: https://www.vmware.com/support/fusion.html

Other than that, you would have to wait for another VMTN user (and I include employees in that) to see this thread and be able to help.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
JMprod
Contributor
Contributor

Anybody who may explain what/why this error-message is?

Reply
0 Kudos
JMprod
Contributor
Contributor

OCR of the error message (to aid forum searching):

Default Host Application

Opens a file or URL in the default application on the host
machine.

Usage:

VMwareHostOpen.exe --file <path>
VMwareHostOpen.exe --url <url>

JMprod
Contributor
Contributor

BTW: Do someone read the forum and update the documentation of VMware accordingly? As an example, some other users and I found out that it's impossible to open files in the macOS host environment, if the virtual machine had previously been used with Parallels.

If new users coming from Parallels to VMware, will they now get an alert about this? Or do they need to search this forum for such documentation?

Reply
0 Kudos
arifsaha
Contributor
Contributor

I experienced this as well. The only work around is to change the default app for those files/functions to a MS Windows applications. 🙁

Reply
0 Kudos
JMprod
Contributor
Contributor

Hmm, that can barely be considered a work-around, more like avoiding core functionality 🙂

 

Does VMware Fusion not support Windows applications to open files in default macOS applications?

 

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

Actually it does work... I remember reading your question earlier, but never played with it myself.

Then a while after that, a similar question came up for VMware Workstation and I decided to dive into this for a bit.

See here:
https://communities.vmware.com/t5/VMware-Workstation-Pro/Has-there-ever-been-a-solution-to-opening-a...

My guess is that the part that you're missing is either the option that enables it (of which I provide a screenshot in the post above) or that your files are not on a vmware shared folder.
The files you want to open _must_ be on a file location directly accessible by the host.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
JMprod
Contributor
Contributor

Thanks! But unfortunately the information here does not seem to help. The files are located in a shared folder, and the option of opening files in the host application is already enabled. 

Hmm.

Reply
0 Kudos
wila
Immortal
Immortal

and you're getting the error from the first screen right?

Seems like it isn't passing parameters then, or the wrong parameters.

The file association is handled via the registry.
I'm not sure how comfortable you are looking there, but here is how it should look like.

Open regedit, under HKEY_CLASSES_ROOT.

Browse down to VMwareHostOpen.AssocFile and navigate to the command part underneath.

See screenshot:

wila_0-1622125340707.png

 

As you can see the default value there is that it will run a program "VMwareHostOpen.exe", but note the parameters --file "%1"

It seems like the parameters are missing in your case.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
JMprod
Contributor
Contributor

‘Unfortunatly’ the parameters on my setup seems correct and just as you posted in your screenshot 😕 

Reply
0 Kudos
wila
Immortal
Immortal

OK.. well no worries. Not giving up that easily.

I found another piece of the puzzle is also in the registry and I missed it.

HKEY_CLASSES_ROOT\Applications\VMwareHostOpen.exe\shell\open\command

It should have the same contents as above...

If it does, then something else is going on and we have to go one level deeper to see what is being passed to the VMwareHostOpen binary. If does not, then you found the culprit and can skip the rest below and adjust it accordingly.

Let's see what we can do if it does have the same contents.
The screenshot from your first post appears to suggest that either no parameters are passed or the wrong parameters. It does start the VMwareHostOpen application, so that part it is doing correctly.

In order to "sniff" on the parameters being passed, I wrote the following super advanced (not really) batch file.

VMwareHostTest.bat

and it's contents looks like this:

@ECHO OFF
ECHO "vmware HOST TEST"
:Loop
IF "%1"=="" GOTO CONTINUE
ECHO "PARAM " %1
SHIFT
GOTO Loop
:Continue
ECHO "DONE"
PAUSE

and I create a folder c:\Test and put the above file in there.

Then I used regedit to point to this batch file instead of the VMwareHostOpen.exe application.
I first saved the registry edits to a backup string entry for easy recovery of the original content.

I did this for both registry locations!

The result of trying to open a picture which first started Preview on my host now looks like this:

wila_0-1622160107753.png

as you can see it shows the expected parameters on my end. (but then again here it worked)

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
JMprod
Contributor
Contributor

Thanks, still the same error message in the application (it tries to open .pdf's). PDF's still open in the host application after the changes I made in the registry editor. However, if I try to open a screenshot image. A command prompt icon flashes by at the task bar in Windows, and no file opens, however the command prompt window does not stay open (or open at all?), so I'm not able to read anything from it.

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

The command windows should stay open, that's what the last line "PAUSE" is for.

If you double click the batch file from Windows explorer, does it stay open?

I just copied and pasted from the post above to a new batch file on my Win10 box and just double clicking then results in the following:

wila_0-1622188920693.png

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos