When Outlook is published as "c:\program files\office03\OFFICE11\OUTLOOK.EXE" "%**" and client to server content redirection is enabled, mailto (.mmm) file type launches, but .msg files displayed the following error message:
"The command line argument is not valid. Verify the switch you are using"
Note: This issue might not occur with all versions or service pack combinations of Microsoft Outlook.
Install Exchange 2003 and Service Pack 2.
Create two user accounts and set them up for an exchange mailbox.
Install Outlook 2007 on a XenApp 4.5 Hotfix Rollup Pack 03 server.
Publish Outlook as "c:\program files\office03\OFFICE12\OUTLOOK.EXE" "%**".
Enable all file types for Outlook.
Set up a Web Interface 4.6 Program Neighborhood Agent site.
Install a workstation with the 11.x Program Neighborhood Agent client.
Note: Do not install Outlook or the Office Suite.
Launch Outlook as user 1 and send user 2 an e-mail.
As user 1, open up the e-mail and do a File > Save as > Save, to save the e-mail as a .msg on the client c:\ drive.
Close the published Outlook.
Double-click the .msg file and see the preceding command line argument error.
From Start > Run on the workstation, type mailto:user2@yourdomain.com and notice the mailto link launches Outlook.
Change Outlook’s command line to the following line and repeat steps 11 and 12. Now the .msg launches but the mailto link fails with the cmdline argument error:
c:\program files\office03\OFFICE12\OUTLOOK.EXE" /f "%*
Note: Launch a regular fixed-window published Outlook with command line "c:\program files\office03\OFFICE11\OUTLOOK.EXE" "%**" and both the .msg file and mailto options open. Customers expect the same behavior when running a published application.
Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.
Client to server content redirection does not work for .msg files and for mailto: links in some versions on Microsoft Outlook. To enable this fix, set the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI
Name: PublishedAppCommandLineFlag
Type: REG_DWORD
Data: 0x2
[From PSE450R04W2K3016][#208999]
As a workaround, modify the command in the location section of the published application for Outlook to appear as follows:
"c:\program files\microsoft office\OFFICE11\outlook.EXE" /f "%*"
Note: This command line modification action breaks all other Outlook file type associations. Publishing two copies of Outlook, one with the /f switch and one without is not an acceptable solution.
Microsoft security update MS08-015 makes the following change:
To open a saved .MSG file, Microsoft Outlook requires /f <msgfilename> to be in the executable command instead of just <msgfilename> as it was before. This causes an issue when wfcrun32 <appname> /param:"/f %1" is called because of the /f after the /param. Wfcrun32 works fine if the /f is removed, but Outlook fails to open the file and claims the command line switch is invalid.