XenApp: Publishing streaming package

Access Management console is required to publish application streaming package in XenApp.

Below are the steps required to publish streaming package.

Prerequisite:

  1. Citrix Access Management console should be installed on the XenApp farm.
  2. Person who is publishing application icon should have full administrative rights on Access management console and should have atleast read access rights on the shared location where streaming package is stored.
  3. Application users should also has read access rights on the shared location where streaming package is stored.
  4. Streaming client should be installed on the user’s machine.

Steps:

  1. Double click on the desktop icon “Access Management Console” or launch the exe “CmiLaunch.exe” from "C:\Program Files\Common Files\Citrix\Access Management Console – Framework\". Citrix Access Management console window will be launched. Left side of window will have tree structure as shown below. It has a node for Presentation server and under it, there is a node for XenApp farm. It has different folders under it to manage the farm. For this article, our interest is the “Applications” folder under it.           image 
  2. Right Click on “Applications” folder and Select New –> Create Folder as  shown below:            image
  3. Following screen will appear: image                                Enter the application name and click ok. It will create “Office” folder under the applications node.
  4. Right click on “Office” folder and select New –> Publish application. “Welcome” screen will appear: Click Nextimage
  5. “Name” screen will appear, add the following details and Click Next:                                                                                     Display Name: MSOffice – Word | Application description: MSOffice – Wordimage
  6. “Type” screen will appear, Select the radio button for “Application” and then select radio button for “Application from a server”. From Server application type dropdown, select “Streamed to server” and Click Next.image
  7. “Location” screen will appear, browse to the application profile location and then select the required application from Application to launch dropdown list and then click Next. image
  8. “Servers” screen will appear, Click on “Add” button to add all the servers where you want application to stream to. By stream to, I mean, application will be run in isolation from that server. Servers added here will be having load balancing.image
  9. “Users” screen will appear for adding users who will have access rights on the published icon. Click Add button and it will open “second screen”. On that screen, click on “Add List of Names” button to add the users. “third Screen” will appear. Enter the users into the screen and click “Check Names” button to see the validity of the entered users. Once verified click Ok. Click Ok on second screen and click Next on First screen.                              Note: You can add any number of users from the below screens but the best practice is to have active directory group containing all the required users and that group can be added directly to the below screen. With active directory group it is very easy to manage users. By manage I mean, addition and deletion of users.image
  10. “Shortcut Presentation” screen will appear. Enter “Office” folder in the textbox for “Client application folder”. If the user access is through web ICA, do not check the checkbox for “add to the client’s start menu” and “add shortcut to the client’s desktop”.                                                                                 Note: You should enter the folder name that you have created at step 2 above. Users will see the application icon under this folder in their web ICA session. image Check for the application icon displayed on this screen. If you want to change it, click on change icon button, following screen will appear, select the appropriate radio button and get the required application icon and click Ok and then click Next to the parent screen.image
  11. “Publish immediately” screen will appear, select the checkbox for “Configure advanced application settings now” and click next.image
  12. Access control screen will appear: Keep the default options and click Next.image
  13. “Content redirection” screen will appear: select the required extensions and click Next.                                                        Note: For more information, refer to my article: https://mdaslam.wordpress.com/2009/09/09/associating-published-applications-with-file-types/image
  14. Alternate profiles: Keep the default value and click Next.image
  15. “Limits” screen will appear: Depending on the application architecture and the bandwidth, check the checkbox for “Limit instances allowed to run in server farm” and then add Maximum instances. Click Next.image
  16. “Client options” screen will appear: Select the different options based on your requirements like the bandwidth, security or printing requirements. Click Next.                                                  Note: For Client audio, refer to the article https://mdaslam.wordpress.com/2009/11/24/xenapp-legacy-audio/image
  17. “Appearance” screen will appear: Select the appropriate session window size and required color depth. Click Finish.                 Note: For seamless mode, selecting any value under “session window size” will not make any difference. For Color depth, refer to my article: https://mdaslam.wordpress.com/2009/09/22/xenapp-colors-depth-in-published-application-properties/image After this step, application icon will be published and available under “Office” folder. Users who are given access to this icon, will be able to see it in Web ICA session.  

                                                            –Finish–

XenApp: Application Streaming package creation

Streaming is the virtualization technique. It enables applications to be delivered to client devices and run in a protected, virtual environment.  Applications are managed in a centralized Application Hub, but are streamed to the client device and run in an isolation environment.  Applications become an on-demand service that is always available and up-to-date.

Streaming package needs to be created using the Streaming profiler. Once created successfully, it needs to be published for the user community

For explaining the package creation steps, I am creating streaming package for MS Word component of MS office. You can select any component of MS office or if you want, you can select all components.

Steps to create streaming package:

  1. Create a shared location like {\\ServerName\\Apps\App_Profiles\} to store the final streaming packages.
  2. Streaming package is created using Streaming Profiler. To run streaming profiler go to {All Programs > Citrix > Streaming Profiler} and click on Streaming Profiler. Following screen will appear:image
  3. Click on New Profile button, following screen will appear: Enter Profile name as “MSOffice – Word” and Click Next.image
  4. Select radio button for “Relaxed security” and click Next.image
  5. Some applications are designed to interface directly with other applications to provide interoperability and extended functionality. Use this page to set up Inter-Isolation Communication in which profiled applications can communicate on the client device. Click Browse to locate your other profiles. Select the profiles to add and use the buttons to rank the selected profiles in order of priority, top being the highest rank. If you don’t want to set up Inter-Isolation Communication, click Next.image
  6. Select the checkbox for the target operating system and languages, and click Next. You can also select multiple values. image
  7.   Select radio button for “Advanced Install” and click Next. Note: For simple install we can also select “Quick Install” option.image
  8. Select the radio button for “Run install program or command line script” and click Next.                                                             Note: As per the below screen, following options are available: 1) Run install program or command line script – This is required for first time installation or for multiple installation for the same package.                                                                                      2) Install IE plugins, web application, or online updated -  It is required, if you want to install IE plugins or Microsoft updates.  3) Select files and folders – This is required to change/update {addition and deletion of files are allowed} or to view the file/folder structure.                                                                     4) Edit Registry – This is required to edit the registry entry.         5) Continue with none of the aboveimage
  9. Select the installation program / command line script and click Next. For EXE, just select the exe location. For MSI, use meiexec /i with MSI location. image
  10. Click on “Launch Installer” button as shown belowimage             Application setup will start running. Follow all the setup steps and finish the application installation.
  11. On application installation completion, following screen will appear, Select the radio button for “Finish Installations”.                                                                         Note: For additional actions, radio button for “Perform additional installations” can be selected. image
  12. Below screen will appear, containing the list of applications that are installed on this package. You can select application from this list and click on “Run” button to run that application. Some application requires some settings to be done after launching it for the first time. Those type of activities can be done using this screen.image
  13. Once the application is executed in above step for the first time, exit the application and its status will be changed to “Application Run” as shown below: image
  14. If you want to add/modify/delete any application, use the below screen: Click Nextimage
  15. You can sign the profile using below screen: Click Nextimage
  16. Profile summary will appear in the below screen. Click Finish to finish the profile creation.image
  17. On successful creation of profile, following main screen will appear. Click on the save button as shown in circle in below screenshot to save the profile:image
  18. After clicking save button, following screen will appear: Enter shared path as per step 1 and click “Save”. Profile will be saved to the shared location.image
  19. Resultant Folder structure of profile as saved at shared location: image  Please note the files “MSOffice – Word.profile” and a cab file. *.profile file contains the information about application installed and  cab file contains all the files and folder with proper structure. To see all files and folder, rename it to *.zip and open it.

For installation time using streaming and traditional technique, refer to the link: 

https://mdaslam.wordpress.com/2009/09/16/installation-time-study-using-citrix-streaming-and-traditional-installation-techniques/

XenApp: Automated content publish in XenApp

Purpose:

To publish content like “www.google.com” in XenApp automatically using PowerShell script.

Pre-requisite:

Following are the prerequisites for setting up the environment to execute PowerShell script to publish application in XenApp:

  1. .Net Framework 3.5 SP1 {Download it from Microsoft website}
  2. Microsoft PowerShell 1.0 {Download it from Microsoft website}
  3. XenApp Command technology preview{Download it from citrix site: https://www.citrix.com/English/ss/downloads/details.asp?downloadId=1687620&productId=186#top} : These commands are a PowerShell Tool Pack that allows managing most aspects related to XenApp.  They cover all of MFCOM functionality for features available in XenApp 5 and include functionality from both AMC and CMC.

Install all the above components in the given order onto the XenApp environment.

Solution: 

Below script is the solution. It has four parts:

  • Creation of input box for application information – {Line 10 – 99}
  • Creation of new folder under Applications folder {Applications/Test} – {Line 106}
  • Publishing content – {Line 108 – 115}
  • Addition of users/groups to the application –{Line 117-118}

    Script:

       1: # =========================================================

       2: # 

       3: # AUTHOR: Mohd Aslam

       4: # DATE  : 7/15/2010

       5: # 

       6: # COMMENT: This script will publish content like website in 

       7: #          XenApp

       8: # 

       9: # =========================================================

      10: [void] [System.Reflection.Assembly]::LoadWithPartialName(

      11: "System.Drawing") 

      12: [void] [System.Reflection.Assembly]::LoadWithPartialName(

      13: "System.Windows.Forms") 

      14:  

      15: $objForm = New-Object System.Windows.Forms.Form 

      16: $objForm.Text = "Server Desktop publish information"

      17: $objForm.Size = New-Object System.Drawing.Size(430,200) 

      18: $objForm.StartPosition = "CenterScreen"

      19:  

      20: $objForm.KeyPreview = $True

      21: $objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter") 

      22:     {$x=$objTextBox.Text;$objForm.Close()}})

      23: $objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape") 

      24:     {$objForm.Close()}})

      25:  

      26: $OKButton = New-Object System.Windows.Forms.Button

      27: $OKButton.Location = New-Object System.Drawing.Size(190,140)

      28: $OKButton.Size = New-Object System.Drawing.Size(75,23)

      29: $OKButton.Text = "OK"

      30: $OKButton.Add_Click(

      31: {

      32: $AppName=$objAppName.Text;

      33: $AppUsers=$objAppUsers.Text;

      34: $AppCons=$objAppCons.Text;

      35: $objForm.Close()

      36: }

      37: )

      38: $objForm.Controls.Add($OKButton)

      39:  

      40: $CancelButton = New-Object System.Windows.Forms.Button

      41: $CancelButton.Location = New-Object System.Drawing.Size(290,140)

      42: $CancelButton.Size = New-Object System.Drawing.Size(75,23)

      43: $CancelButton.Text = "Cancel"

      44: $CancelButton.Add_Click(

      45: {

      46: $objForm.Close()

      47: }

      48: )

      49: $objForm.Controls.Add($CancelButton)

      50:  

      51: $objLabel = New-Object System.Windows.Forms.Label

      52: $objLabel.Location = New-Object System.Drawing.Size(10,15) 

      53: $objLabel.Size = New-Object System.Drawing.Size(280,20) 

      54: $objLabel.Text = "Please enter the information in the space below:"

      55: $objForm.Controls.Add($objLabel) 

      56:  

      57: $objLbl_AppName = New-Object System.Windows.Forms.Label

      58: $objLbl_AppName.Location = New-Object System.Drawing.Size(10,40) 

      59: $objLbl_AppName.Size = New-Object System.Drawing.Size(160,20) 

      60: $objLbl_AppName.Text = "Publish Name:"

      61: $objForm.Controls.Add($objLbl_AppName) 

      62:  

      63: $objAppName = New-Object System.Windows.Forms.TextBox 

      64: $objAppName.Location = New-Object System.Drawing.Size(190,40) 

      65: $objAppName.Size = New-Object System.Drawing.Size(205,20) 

      66: $objForm.Controls.Add($objAppName) 

      67:  

      68: $objLbl_AppCon = New-Object System.Windows.Forms.Label

      69: $objLbl_AppCon.Location = New-Object System.Drawing.Size(10,70) 

      70: $objLbl_AppCon.Size = New-Object System.Drawing.Size(160,20) 

      71: $objLbl_AppCon.Text = "Content:"

      72: $objForm.Controls.Add($objLbl_AppCon) 

      73:  

      74: $objAppCons = New-Object System.Windows.Forms.TextBox 

      75: $objAppCons.Location = New-Object System.Drawing.Size(190,70) 

      76: $objAppCons.Size = New-Object System.Drawing.Size(205,20) 

      77: $objForm.Controls.Add($objAppCons) 

      78:  

      79: $objLbl_AppUsers = New-Object System.Windows.Forms.Label

      80: $objLbl_AppUsers.Location = New-Object System.Drawing.Size(10,100) 

      81: $objLbl_AppUsers.Size = New-Object System.Drawing.Size(160,20) 

      82: $objLbl_AppUsers.Text = "Application Users*:"

      83: $objForm.Controls.Add($objLbl_AppUsers) 

      84:  

      85: $objAppUsers = New-Object System.Windows.Forms.TextBox 

      86: $objAppUsers.Location = New-Object System.Drawing.Size(190,100) 

      87: $objAppUsers.Size = New-Object System.Drawing.Size(205,20) 

      88: $objForm.Controls.Add($objAppUsers) 

      89:  

      90: $objLbl_Server = New-Object System.Windows.Forms.Label

      91: $objLbl_Server.Location = New-Object System.Drawing.Size(10,120) 

      92: $objLbl_Server.Size = New-Object System.Drawing.Size(180,20) 

      93: $objLbl_Server.Text = "*: Enter ';' separated data if any"

      94: $objForm.Controls.Add($objLbl_Server) 

      95:  

      96: $objForm.Topmost = $True

      97:  

      98: $objForm.Add_Shown({$objForm.Activate()})

      99: [void] $objForm.ShowDialog()

     100:  

     101: If($AppCons.Substring(0,3) -eq "www")

     102: {

     103:     $AppCons = "http://" + $AppCons

     104: }

     105:  

     106: New-XAFolder Applications/Desktops

     107:  

     108: New-XAApplication -BrowserName $AppName `

     109: -ApplicationType "Content" `

     110: -ContentAddress $AppCons `

     111: -DisplayName $AppName -FolderPath "Applications/Desktops" `

     112: -Enabled $true `

     113: -AnonymousConnectionsAllowed $false `

     114: -AddToClientStartMenu $false `

     115: -ClientFolder "Desktops"`

     116:  

     117: Add-XAApplicationAccount -BrowserName $AppName `

     118: -Accounts $AppUsers.Split(";") 

     How to Run above script?:

    Save above script to some location with .ps1 extension. To Run above script, go to “Programs > Citrix > XenApp Commands” and click “Windows PowerShell with XenApp Commands (CTP2)” icon. It will launch PowerShell command prompt.

    On the PowerShell command prompt, write script name with full location and click enter. Script will run and below screen will be displayed:

    image

    Enter all the required data and click “Ok”. For application users, multiple data can be entered separated by “;”.

    Following screen will be displayed containing information about the published content.

    image

    To confirm the successful publish, go to access management console and see the published icon as:

    image

    Right click on Web-Contents icon and see the properties as below:

    image

     

                                                                    –Finish–

  • XenApp: Content publish

    Access Management console is required to publish any application installed on XenApp.

    Below are the steps required to publish an application exe. I have taken “http://www.google.com” as an example to explain the procedure. It can be used to publish exe of any application.

    Prerequisite:

    1. Citrix Access Management console should be installed on the XenApp farm.
    2. Person who is publishing application icon should have full administrative rights on Access management console.

    Steps:

    1. Double click on the desktop icon “Access Management Console” or launch the exe “CmiLaunch.exe” from "C:\Program Files\Common Files\Citrix\Access Management Console – Framework\". Citrix Access Management console window will be launched. Left side of window will have tree structure as shown below. It has a node for Presentation server and under it, there is a node for XenApp farm. It has different folders under it to manage the farm. For this article, our interest is the “Applications” folder under it.           image 
    2. Right Click on “Applications” folder and Select New –> Create Folder as  shown below:            image
    3. Following screen will appear: image                                Enter the application name and click ok. It will create “WebContent” folder under the applications node.
    4. Right click on “WebContent” folder and select New –> Publish application. “Welcome” screen will appear: Click Nextimage
    5. “Name” screen will appear, add the following details and Click Next:                                                                                     Display Name: WebContent – Google | Application description: WebContent – Googleimage
    6. “Type” screen will appear, Select the radio button for “Content” and Click Next.                                                                       image
    7. “Location” screen will appear, add content address as “http://www.google.com” and click next.                               Note: You can put any http:// address or file:// address or UNC path.image
    8. “Users” screen will appear for adding users who will have access rights on the published icon. Click Add button and it will open “second screen”. On that screen, click on “Add List of Names” button to add the users. “third Screen” will appear. Enter the users into the screen and click “Check Names” button to see the validity of the entered users. Once verified click Ok. Click Ok on second screen and click Next on First screen.                              Note: You can add any number of users from the below screens but the best practice is to have active directory group containing all the required users and that group can be added directly to the below screen. With active directory group it is very easy to manage users. By manage I mean, addition and deletion of users.image
    9. “Shortcut Presentation” screen will appear. Enter “WebContent” folder in the textbox for “Client application folder”. If the user access is through web ICA, do not check the checkbox for “add to the client’s start menu” and “add shortcut to the client’s desktop”.                                                                                 Note: You should enter the folder name that you have created at step 2 above. Users will see the application icon under this folder in their web ICA session. image Check for the application icon displayed on this screen. If you want to change it, click on change icon button, following screen will appear, select the appropriate radio button and get the required application icon and click Ok and then click Next to the parent screen.image
    10. “Publish immediately” screen will appear, select the checkbox for “Configure advanced application settings now” and click next.image
    11. Access control screen will appear: Keep the default options and click Next.image
    12. After this step, application icon will be published and available under “WebContent” folder. Users who are given access to this icon, will be able to see it in Web ICA session. Under access management console it will look as:image   

                                                                –Finish–