Problem: Trying to launch an application through XenApp 6.5 with a long command line launch path fails with an error “Your request to connect to this Citrix server has been rejected due to insufficient buffers. Please call your system administrator. Click OK to terminate.”

XenApp buffer error

 

Reason: XenApp follows Window’s 256 character limit and worse still since the Citrix executable has to be included in that 256 limit the actual path limit for XenApp is 188 characters, any launch path with more than 188 characters in Citrix will fail with the message above.

Fix: There are multiple ways to work around the issue and one way to fix it, to fix the issue (at least if your using Windows) use the ‘LongCommandLine’ setting which can be set in the ICA connection file (more details here). Since I can’t fix the issue the method I’ll use to work around it is to have a VBScript launch the already existing application shortcut.

So you don’t have to write a different script for every application that uses launch paths longer than allowed you can use a script that accepts arguments for the path and name of the shortcut.

i.e.

wscript "C:\Path\to\script\start_sh.vbs" "FOLDER1" “FOLDER2” "SHORTCUT"
wscript "C:\Path\to\script\start_sh.vbs" "Accessories" "Paint"

XenApp location string
 

The example above would launch MSpaint, the example below is a similar example using duff data but gives a better idea of how the script can be used in a real world scenario for an App-V application. The script itself is stored within the App-V package but it could be stored anywhere locally on each Citrix server – obviously distributing the script still has to be taken care of in that scenario.

wscript "C:\ProgramData\Microsoft\AppV\Client\Integration\66AD086E-D220-43A4-8407-E00BAA2F4AC3\Root\start_sh.vbs" "AppFolder" "ShortcutName"

You can find the script at the following location Start Shcut Withargs .vbs