Win7 X64 SP1 Ultimate guest running on MacOS 10.8.3 host. Guest has Firefox 19 (32bit) and Office 2013 (64bit). Host has Office 2011 for Mac.
Use Case:
- While using Firefox on the guest, come across a link to a PowerPoint file, e.g., Example.PPTX.
- Click on the link to the PPTX file.
- Opening... prompt comes up; I select "something".
- "Something" opens Example.PPTX with Office 2011 for Mac.
Here is where I run into a problem. Simply using WMwareOpenHost.exe, by itself, is useless, since it requires *2* arguments, not just 1. Selecting the EXE, gives a "this is how to use VMwareHostOpen.exe" dialog, as it doesn like being called with 1 argument. 1st argumetn must either be "--file" or "--url". 2nd one must be the actual file name or URL that we want host application to open.
Since I can't simply ask Firefox to use VMwareHostOpen.exe, I had to create a batch file that looks like the following:
vmopen.cmd
"C:\Program Files\VMware\VMware Tools\VMwareHostOpen.exe" --file "%1"
But, this, in and of itself does not provide a solution, because Firefox saves temporary files to the user's temporary directory specified by the OS environment variables. And these TEMP or TMP directories are NOT shared with the host by default. I would get a "... not shared with the host" error message from VWwareHostOpen.exe.
So ... I do 3 things:
- Setup mirroring for Downloads folder between host and guest. Therefore, I have a "Z:\Downloads" on the guest, where Z: is really "\\vmware-host\Shared Folders"
- Create a "_tmp_\Win7VM" directory on the host's Downloads directory.
- Set the user's TEMP and TMP environment variables on the host to the temp directory structure, i.e., "Z:\Downloads\_tmp_\Win7VM"
Now I have Firefox setup to place files on shared directory with the host before opening these files.
This is where things get interesting ... The "vmopen.cmd" script, when called from Firefox, as part of the File/Open action, receive a short path name, and does *nothing*. It opens a command prompt window and terminates very quickly. In the command prompt window, one would see the following:
C:\Program Files (x86)\Mozilla Firefox>"C:\Program Files\VMware\VMware Tools\VMwareHostOpen.exe" --file "Z:\DOWN~76B\_tmp_\Win7VM\Example.PPTX"
So, it looks like Firefox is passing a short path name to VMwareHostOpen.exe file. Suspecting something is off with the path names, I manually call my script using the long path name, as follows:
vmopen "Z:\Downloads\_tmp_\Win7VM\Example.PPTX"
And guess what? Using the *long* path name, VMwareHostOpen is able to pass this file to the host's PowerPoint 2011 application. And the PPTX file opens in PowerPoint 2011 for Mac.
By the way, this exact same script works flawlessly on a Windows XP guest running on the same host, where all of the OS (WinXP), the calling (Firefox) and called (VMwareHostOpen) items are all 32 bit components.
Now here are 2 questions:
- Is the 64-bit VMwareHostOpen.exe incapable of accepting short path names?
- Is there an easier way of accomplishing my goal, i.e., open Office files using host's Office 2011 applications when clicked from a Firefox running on the guest (Win7 X64)?