CTX966450
XenApp
XenApp 5_0 for Windows Server 2008
Other
2016-04-15
2014-04-23
This article outlines two options for publishing shortcuts in the XenApp environment.

Objective

This article outlines two options for publishing shortcuts in the XenApp environment.

Instructions

Though it is a best practice to publish applications by their executable, there are certain applications (such as legacy DOS and custom applications) where publishing through a shortcut (.lnk file) is required to maintain proper functionality.??

Complete one of the following procedures to publish shortcuts in your XenApp environment:

Method-1

  1. Create the shortcut and modify its properties as necessary.

  2. Create a batch file with the line of code shown??by copying the code into Notepad, modifying the path to the absolute path of your shortcut, and saving the file with a .bat extension.

    start c:\app\shortcut.lnk

  3. Publish this batch file normally as you would publish an executable.

Method-2

  1. Create the shortcut and modify its properties as necessary.

  2. Create a Visual Basic Script with the code shown??by copying the code into Notepad, modifying the path line to the absolute path of your shortcut, and saving the file with a .vbs extension.

    Note the %comspec% variable with the /c switch.?? This effectively opens a command window, launches the application from its shortcut within the command window, and then closes the command window.?? As of 6/11/2008, this extra variable was observed to be necessary on servers running Windows Server 2003 or Windows 2000 Server with varying service pack levels, although it was not required when executing the script on Windows XP.

     'AppLaunch.vbs On Error Resume Next Dim sAppPath Set WshShell = WScript.CreateObject("WScript.Shell") ' Path to the shortcut sAppPath = "%comspec% /c c:\app\shortcut.lnk" ' Executes the program then closes the script. Return = WshShell.Run(sAppPath, 1, false) Wscript.quit
  3. Publish this script using the absolute path to wscript.exe and the absolute path to the VBScript passed as a parameter. For example:

    c:\windows\system32\wscript.exe "c:\AppLaunch.vbs"

    My App - Publish Application


 

Join the conversation

Citrix Discussions

Open a case

Citrix Support

特别说明


本文来源为Citrix.com所有,翻译后版权归翻译者所有.如需转载请注明出处.

文档版本


.

广告招租


最新留言


.

广告招租


.