This article shows how shortcuts can be created and managed in documents (such as PDF, Word, and so on) and in scripts with Microsoft App-V. New shortcuts for websites (URLs) can be created directly with the App-V Management Server, that are then inserted into the Start menus of certain AD groups. The applications run outside the virtual environment, since one leaves “the bubble” through the local scripts.
In Citrix XenApp 6.5 there is shortcut management for documents, web links or even scripts. This means that it is possible in the System Management for XenApp to create a shortcut and then later to have this shortcut automatically be made available in the Start menu or even in the Citrix web interface (now Store Front). This function is no longer available as of XenDesktop 7.x.
One of our customers had a whole pile of shortcuts and the requirement to integrate them somehow in the new XenDesktop 7.9 with App-V. In short, we found a solution with App-V to manage the Start menu shortcuts and applications. The prerequisite for this is the App-V Management and Publishing Server, in order to authorize shortcuts for groups.
First one needs to be aware that App-V 5 acts differently when the application linked to by a shortcut is in the Windows file system and not in the package. Assume for example there is a file MyScript.cmd under c:\program files\scripts\
With an App-V sequencing, a shortcut (or desktop shortcut) to this file will be created. Depending upon whether the batch file MyScript.cmd is located on the client system or not, the shortcut must be created differently when this shortcut app is published with an App-V client.
First scenario; the file MyScript.cmd is not located on the client:
The link is generated for the virtual file system, because the App-V client cannot recognize the local file.This scenario will not work at all, because the file or script is not located in the package. This is an automatic function of the client.
Second scenario; the file MyScript.cmd is located on the client:
"C:\Program Files\scripts\myscript.cmd" /appvve:EE5C98F4-4785-4109-B268-DAB3416EA81A_12D55889-FF33-4403-A069-AD39283AC129
Thus a shortcut is generated to a local file (the script) with a /appvve: parameter. The script is then started in a virtual environment. However everything that is started in the external script ends up outside of it again. For example, when notepad.exe in the script is started with “Start Notepad.exe”.
“Get-AppVVirtualprocess” won't show any running virtual applications. The App-V Publishing Server creates a shortcut to the Desktop or to the Start menu with the publishing of the App-V application.
Now it gets interesting. An App-V shortcut can also contain start parameters. We have here a short VBS script through which websites are made available. This functions exactly the same for all other types of documents.
' Andreas Nick 2016 ' Assign a browsers for a web url ' example wscript.exe http://www.software-virtualisierung.de Dim g_cmdArgs g_cmdArgs = "" ParseCmdLine if g_cmdArgs = "" Then Wscript.echo "Command line arguments are required." Wscript.quit 0 End If Dim syncCmd ContentArgs = " " & g_cmdArgs Dim psCmd psCmd = """C:\Program Files (x86)\Internet Explorer\iexplore.exe""" & ContentArgs Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") 'Wscript.echo psCmd WshShell.Run psCmd, 1 ' Reset error handling On Error Goto 0 WScript.Quit 0 Sub ParseCmdLine() dim objArgs dim argsCount dim x Set objArgs = Wscript.Arguments argsCount = objArgs.count x = 0 While x < argsCount g_cmdArgs = g_cmdArgs & " " & objArgs(x) x = x + 1 Wend End Sub
Now a shortcut needs to be created again in the sequencing process. This time to “wscript.exe” and to the VBSScript. An additional parameter is the website to start. REMEMBER: the script (the .exe, myscript.cmd or other) in turn must be in the physical file system of the sequencer and the client. Otherwise it won't work. Here, it is wscript.exe and webstart.vbs.
C:\Windows\System32\wscript.exe „C:\program files\scripts\weblauncher\WebLauncher.vbs“ http://www.software-virtualisierung.de
C:\Windows\System32\wscript.exe C:\startup\weblauncher\WebLauncher.vbs http://www.andreasnick.com /appvve:DA3CCEB5-84E1-47B9-8EA5-921DBFA708A8_9E043A63-69A0-4958-87CD-24EB13F840DA
The VBS Script starts Internet Explorer with the desired page as the parameter.
After publishing, the shortcuts appear in the Start menu. The start occurs finally in a virtual environment, although the /APPVVE: parameter is contained in the call.
In the App-V Management Server it is easily possible to generate one or several shortcuts with different end addresses. And that simply with the “command line arguments”.
After synchronizing with the App-V Publishing Server both shortcuts appear in the Start menu. Unfortunately not always with the same icon. One can possibly create App-V packages grouped by icon (for example an application package for all PDF documents in a company with the Adobe PDF icon).
The best is saved for last
Since we have converted a great number of Citrix content apps, we have of course for this very purpose a functioning automatic conversion that works with techniques similar to our “XenApp Streaming to App-V Converter”. Please send me an email if you have a need for a tool or a service for converting Citrix shortcuts.
Just kidding, it gets even better at the end
Since the need to alter shortcuts and to create new ones is great, I've built just a tool for that. It will be released shortly as freeware. Here is a screenshot to the tool:
The tool is started with a sequencer and automatically steers the sequencing process through the creation of a shortcut app.
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.
Thanks! Now I can make connection groups between 2 packages.
Is it possible to create 2 shortcuts with this script?
Like Production and Test in the same App-V package?
It's not that easy. You'd have to change the script. And the tool must be started on a sequencer! But you can create new shortcuts directly on the Publishing Server. There is a screenshot in the blog.
Kinda late after 2,5 years but I am looking for a tool like App-V Shortcut Creator.
Did you release it? And if so where can I download it?
And in all those years, nobody's asked for it. I didn't notice it. The download is now also in the blog. We just had the topic at the German App-V event M.A.D. Day (Modern Application Deployment) - I briefly presented the tool. The spectators only realized what this is good for and I had some follow-up dates :-) Have fun with it!