To address the apparent issue shown above, I had to find a way to get a short name and convert it to its long name equivalent in a batch file. I found a solution in the following link and did some customizations myself:
http://www.computerhope.com/forum/index.php/topic,76293.msg499556.html#msg499556
[1] Take the VBscript bit from above, and save it to a file: LongFileName.vbs.
set oArgs = Wscript.Arguments
wscript.echo LongName(oArgs(0))
Function LongName(strFName)
Const ScFSO = "Scripting.FileSystemObject"
Const WScSh = "WScript.Shell"
With WScript.CreateObject(WScSh).CreateShortcut("dummy.lnk")
.TargetPath = CreateObject(ScFSO).GetFile(strFName)
LongName = .TargetPath
End With
End Function
[2] Take the last 2 lines from the batch file and add it to my original batch file vmopen.cmd.
set sfn=%1
for /f "Tokens=*" %%a in ( ' cscript //nologo "%~dp0\LongFileName.vbs" %sfn% ' ) do set lfn=%%a
echo %lfn%
"C:\Program Files\VMware\VMware Tools\VMwareHostOpen.exe" --file "%lfn%"
[3] Keep the 2 files above in the same directory, that is shared with the host (could be the guest too, doesn't matter), e.g., Z:\Downloads
[4] Configure the Windows' TEMP and TMP directories to a shared location with the host, e.g., Z:\Downloads\TEMP
[5] Configure Firefox to use the new vmopen.cmd script when asked in the Opening dialog box.