Deploy using Active Directory and sample startup scripts

You can use Active Directory Group Policy scripts to pre-deploy Citrix Workspace app for Windows on systems based on your Active Directory organizational structure. Citrix recommends using the scripts rather than extracting the .msi files because the scripts allow for a single point for installation, upgrade, and uninstall; they consolidate the Citrix entries in Programs and Features, and make it easier to detect the version of Citrix Workspace app for Windows that is deployed. Use the Scripts setting in the Group Policy Management Console (GPMC) under Computer Configuration or User Configuration. For general information about startup scripts, see Microsoft documentation.

Citrix includes sample per-computer startup scripts to install and uninstall CitrixWorkspaceApp.exe. The scripts are located on the Citrix Workspace app for Windows Download page.

  • CheckAndDeployWorkspacePerMachineStartupScript.bat
  • CheckAndRemoveWorkspacePerMachineStartupScript.bat

When the scripts are executed during Startup or Shutdown of an Active Directory Group Policy, custom configuration files might be created in the Default User profile of a system. If not removed, these configuration files can prevent some users from accessing the Citrix Workspace logs directory. The Citrix sample scripts include functionality to properly remove these configuration files.

To use the startup scripts to deploy Citrix Workspace app with Active Directory

  1. Create the Organizational Unit (OU) for each script.
  2. Create a Group Policy Object (GPO) for the newly created OU.

Modify sample scripts

Modify the scripts by editing these parameters in the header section of each file:

  • Current Version of package. The specified version number is validated and if it is not present the deployment proceeds. For example, set DesiredVersion= 3.3.0.XXXX to exactly match the version specified. If you specify a partial version, for example, 3.3.0, it matches any version with that prefix (3.3.0.1111, 3.3.0.7777, and so on).
  • Package Location/Deployment directory. This specifies the network share containing the packages and is not authenticated by the script. The shared folder must have Read permission for EVERYONE.
  • Script Logging Directory. This specifies the network share where the install logs are copied and is not authenticated by the script. The shared folder must have Read and Write permissions for EVERYONE.
  • Package Installer Command Line Options. These command line options are passed to the installer. For the command line syntax, see Configure and install Workspace for Windows using command-line parameters.

To add the per-computer startup scripts

  1. Open the Group Policy Management Console.
  2. Select Computer Configuration > Policies > Windows Settings > Scripts (Startup/Shutdown).
  3. In the right pane of the Group Policy Management Console, select Startup.
  4. In the Properties menu, click Show Files, copy the appropriate script to the folder displayed, and close the dialog.
  5. In the Properties menu, click Add and select Browse to add the newly created script.

To deploy Citrix Workspace app for Windows per-computer

  1. Move the user devices designated to receive this deployment to the OU you created.
  2. Reboot the user device and log on.
  3. Verify that the newly installed package is listed in the Program and Features.

To remove Citrix Workspace app for Windows per-computer

  1. Move the user devices designated for the removal to the OU you created.
  2. Reboot the user device and log on as any user.
  3. Verify that the newly installed package is listed in the Program and Features.

Use the per-user sample startup scripts

Citrix recommends using per-computer startup scripts. For Windows per-user deployments, the following two Citrix Workspace app for Windows per-user scripts are included on the Citrix Virtual Apps and Desktops media in the Citrix Workspace for Windows and Plug-ins\Windows\Workspace\Startup_Logon_Scripts folder.

  • CheckAndDeployWorkspacePerUserLogonScript.bat
  • CheckAndRemoveWorkspacePerUserLogonScript.bat

To setup the per-user startup scripts

  1. Open the Group Policy Management Console.
  2. Select User Configuration > Policies > Windows Settings > Scripts.
  3. In the right-hand pane of the Group Policy Management Console, select log on
  4. In the Logon Properties menu, click Show Files, copy the appropriate script to the folder displayed, and then close the window.
  5. In the Logon Properties menu, click Add and use Browse to find and add the newly created script.

To deploy Citrix Workspace app for Windows per-user

  1. Move the users designated to receive this deployment to the OU you created.
  2. Reboot the user device and log on as the specified user.
  3. Verify that Program and Features (Add or Remove Programs in previous OS versions) contain the newly installed package.

To remove Citrix Workspace app for Windows per-user

  1. Move the users designated for the removal to the OU you created.
  2. Reboot the user device and log on as the specified user.
  3. Verify that Program and Features (Add or Remove Programs in previous OS versions) removed the previously installed package.