Citrix Receiver 4.x deployment script

 

This is an updated version of my Citrix Receiver deployment script. It is the closest way to make the new CitrixReceiver work similar as the old PNAgent.

This version works with Citrix Receiver 4.x versions. This script will:

  • Terminate all running citrix processes before installation
  • Uninstall all previous versions of Citrix Receiver, Online Plugin and PNAgent.
  • Enable single signon for for Citrix Receiver using only registry settings, no need for GPO’s.
  • Put all Citrix Shortcuts under a “CitrixApps” folder on the Start-Menu. Categories in storefront will be used as subfolders in the start menu.
  • A default storefront address will be added.

The script needs to run as administrator, and you have to reboot the computer after install, to enable SSON.

You have to change the storefront URL in the script.

This script is provided as-is, I’m not responsible for your use of the script. Please test it before use in production.

 

—————————————————-start script——————————————————————-

@echo off
PUSHD "%~dp0"
 
taskkill /im:ssonsvr.exe /f
taskkill /im:pnamain.exe /f
taskkill /im:wfcrun32.exe /f
taskkill /im:wfica32.exe /f

 
IF EXIST "%ALLUSERSPROFILE%CitrixCitrix online plug-inTrolleyExpress.exe" (
echo Uninstalling old Citrix client
"%ALLUSERSPROFILE%CitrixCitrix online plug-inTrolleyExpress.exe" /uninstall /cleanup
)

 
IF EXIST "C:ProgramDataCitrixCitrix online plug-in – webTrolleyExpress.exe" (
echo Uninstalling old Citrix client
C:ProgramDataCitrixCitrix online plug-in – webTrolleyExpress.exe /uninstall /cleanupFull
)

 
IF EXIST "C:ProgramDataCitrixCitrix online plug-inTrolleyExpress.exe" (
echo Uninstalling old Citrix client
C:ProgramDataCitrixCitrix online plug-inTrolleyExpress.exe /uninstall /cleanup
)

 
IF EXIST "%ALLUSERSPROFILE%CitrixCitrix ReceiverTrolleyExpress.exe" (
echo Uninstalling old Citrix client
"%ALLUSERSPROFILE%CitrixCitrix ReceiverTrolleyExpress.exe" /uninstall /cleanup
)

 
reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /QB
)

 
reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{DAA13EB6-C53F-4038-9880-C310500B49E9} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {DAA13EB6-C53F-4038-9880-C310500B49E9} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{956F3E9A-3AED-40F8-8522-5F6A524CFC3E} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {956F3E9A-3AED-40F8-8522-5F6A524CFC3E} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{8F5F8B07-50AC-401F-A441-A37740851A5C} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {8F5F8B07-50AC-401F-A441-A37740851A5C} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{2C42ED1E-6315-4E63-89E6-057EA114EBB8} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {2C42ED1E-6315-4E63-89E6-057EA114EBB8} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{76E4A642-BC3E-438A-8450-0C15A36B5B18l} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {76E4A642-BC3E-438A-8450-0C15A36B5B18l} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{4E21223F-8D6C-446E-9CD3-587D206A8400} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {4E21223F-8D6C-446E-9CD3-587D206A8400} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{E92B7A19-5FD5-4AEE-9FEF-7AD5DD3A675E} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {E92B7A19-5FD5-4AEE-9FEF-7AD5DD3A675E} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{DF1D5FEC-D67C-43C8-9230-41F5DF350196} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {DF1D5FEC-D67C-43C8-9230-41F5DF350196} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{D989BCC0-757C-4FB6-893C-512DF4382656} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {D989BCC0-757C-4FB6-893C-512DF4382656} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{7A1FB67F-A340-472A-97C3-A6AFFE078AAE} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {7A1FB67F-A340-472A-97C3-A6AFFE078AAE} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{B2AE44CB-2AAB-4C08-A54B-D264BD604DA8} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {B2AE44CB-2AAB-4C08-A54B-D264BD604DA8} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{E89956F9-5B89-470E-818D-BD46102D0A01} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {E89956F9-5B89-470E-818D-BD46102D0A01} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{42ACCB45-3363-47E0-94E9-F0074CC8BC56} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {42ACCB45-3363-47E0-94E9-F0074CC8BC56} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{2624B680-02BC-4CBC-839C-DA20DF6EF6EC} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {2624B680-02BC-4CBC-839C-DA20DF6EF6EC} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{331741EC-DD63-4DA8-957E-D0C70412EF54} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {331741EC-DD63-4DA8-957E-D0C70412EF54} /QB
)

reg query HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall{388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /QB
)

 
echo Installing Citrix Receiver 4.1
CitrixReceiver.exe /silent /includeSSON ENABLE_SSON=yes STORE0="Store;https://storefront.mydomain.com/Citrix/Store/discovery;on; Citrix Applications" ALLOWADDSTORE=A STARTMENUDIR="CitrixApps" LEGACYFTAICONS=True ADDLOCAL=ReceiverInside,ICA_Client,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d
REG ADD HKLMSOFTWAREWow6432NodeCitrixAuthManager /v ConnectionSecurityMode /t REG_SZ /d Any /f
REG ADD HKLMSOFTWAREWow6432NodePoliciesCitrix /f /v EnableFTU /t REG_DWORD /d 0
REG ADD HKLMSOFTWAREWOW6432NODECitrixDazzle /f /v UseCategoryAsStartMenuPath /t REG_SZ /d True
REG ADD HKLMSOFTWARECitrixAuthManager /v ConnectionSecurityMode /t REG_SZ /d Any /f
REG ADD HKLMSOFTWAREPoliciesCitrix /f /v EnableFTU /t REG_DWORD /d 0
REG ADD HKLMSOFTWARECitrixDazzle /f /v UseCategoryAsStartMenuPath /t REG_SZ /d True
REG ADD "HKLMSOFTWAREPoliciesCitrixICA ClientSSON" /f /v "Enable" /t REG_SZ /d "true"

 

—————————————————-end script———————————————————————

In addition you have to add the storefront URL to local intranet zone in IE. This can be done with GPO or in a loginscript like this:

—————————————————-start script——————————————————————-

REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapDomainsmydomain.comstorefront"  /f /v "*" /t REG_DWORD /d 1

—————————————————-end script———————————————————————

2 thoughts on “Citrix Receiver 4.x deployment script

  1. Pingback: Weekly link list - Savage Nomads

  2. Pingback: Citrix Receiver 4.x deployment script | Virtual Experience - thingsiforget.net

Leave a Reply

Your email address will not be published. Required fields are marked *

*