Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180923

How to get guest Firefox to open Office files with host Office applications

$
0
0

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:

  1. While using Firefox on the guest, come across a link to a PowerPoint file, e.g., Example.PPTX.
  2. Click on the link to the PPTX file.
  3. Opening... prompt comes up; I select "something".
  4. "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:

  1. 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"
  2. Create a "_tmp_\Win7VM" directory on the host's Downloads directory.
  3. 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:

  1. Is the 64-bit VMwareHostOpen.exe incapable of accepting short path names?
  2. 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)?

Viewing all articles
Browse latest Browse all 180923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>