
Publishing a shortcut to Citrix XenApp
All of us who use Citrix XenApp to publish apps have come across an app that resists being published, either because it has characters that we can't enter in the path, or why it has a somewhat strange command line, This is for example more than two parameters and this is not supported. To solve this type of incident, We can take advantage of the shortcut left by the manufacturer of the application, since in a shortcut (.lnk) it can have any character or all the parameters that such an application has.
We will create a .vbs file (Visual Basic Script) where we will put this text:
'AppLaunch.vbs
On Error Resume Next
Dim sAppPath
Set WshShell = WScript.CreateObject(“WScript.Shell”)
‘ Path to the shortcut
sAppPath = “%comspec%/c RUTAACCESO_DIRECTO.lnk”
‘ Executes the program then closes the script.
Return = WshShell.Run(sAppPath, 1, False)
Wscript.quit
It's a simple VBasic script that will call the shortcut we tell it.
And when publishing the application in question we will call the script with the following command: %Windir%system32wscript.exe “RUTASCRIPT.vbs”