Deploy using Active Directory and sample startup scripts

You can use Active Directory Group Policy scripts to pre-deploy Citrix Receiver 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 Receiver 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 CitrixReceiver.exe. The scripts are located on the Citrix Receiver for Windows Download page.

  • CheckAndDeployReceiverPerMachineStartupScript.bat
  • CheckAndRemoveReceiverPerMachineStartupScript.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 Receiver logs directory. The Citrix sample scripts include functionality to properly remove these configuration files.

To use the startup scripts to deploy Receiver 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 Receiver 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-hand 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 then close the window.
  5. In the Properties menu, click Add and use Browse to find and add the newly created script.

To deploy Citrix Receiver 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 as any user.
  3. Verify that Program and Features (Add or Remove Programs in previous OS versions) contain the newly installed package.

To remove Citrix Receiver 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 Program and Features (Add or Remove Programs in previous OS versions) removed the previously installed package.

Use the per-user sample startup scripts

Citrix recommends using per-computer startup scripts. For Windows per-user deployments, the following two Citrix Receiver for Windows per-user scripts are included on the XenDesktop and XenApp media in the Citrix Receiver for Windows and Plug-ins\Windows\Receiver\Startup_Logon_Scripts folder.

  • CheckAndDeployReceiverPerUserLogonScript.bat
  • CheckAndRemoveReceiverPerUserLogonScript.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 Receiver 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 Receiver 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.