5 Replies Latest reply on Jan 26, 2013 9:39 AM by hoivikaj

    Remove old Citrix Web Plug-in and install latest

    Apprentice

      I'm looking for want to remove old Citrix Web Plug-in and update with the latest Xen App Plug in.

       

      Thanks

       

      Mike

        • 1. Re: Remove old Citrix Web Plug-in and install latest
          Apprentice

          So it's just a browser plug-in for IE?

          • 2. Re: Remove old Citrix Web Plug-in and install latest
            Rookie

            When you say old Citrix Web Plug-in what version are you specifically going for?  I mean are you going way back to some ICA client version, or more recent like 10, 11, or even a earlier version of 12?  If you can provide any of those specifics, I might be able to help you out there.  It all depends on the version you are targeting. 

            • 3. Re: Remove old Citrix Web Plug-in and install latest
              Apprentice

              I will be removing ICA clients 11, 12 and all pna agents as well since we are moving to a new citrix server farm running xen app 6.5.. Thanks for any help on this..

              • 4. Re: Remove old Citrix Web Plug-in and install latest
                Expert

                I've previously used the script from http://www.gregorystrike.com/2010/05/24/vbscript-to-uninstall-old-citrix-clients/ to remove various old versions of the Citrix client.

                 

                It was very effective, so do a lot of testing to make sure it doesn't remove too much!

                • 5. Re: Remove old Citrix Web Plug-in and install latest
                  Rookie

                  This may or may not help you, I dont expect you to copy and paste this for this to work, as I have written many custom functions to handle alot of operations in the code below, but It should help get you started. I write all my deployment packages in AutoIt.

                   

                  #NoTrayIcon

                  #Region ;**** Directives created by AutoIt3Wrapper_GUI ****

                  #AutoIt3Wrapper_Icon=source\icon.ico

                  #AutoIt3Wrapper_Outfile=StartDeploy.exe

                  #AutoIt3Wrapper_Res_Description=Citrix 12

                  #AutoIt3Wrapper_Res_Fileversion=0.0.0.2

                  #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p

                  #AutoIt3Wrapper_Res_LegalCopyright=Anthony Hoivik 2012

                  #AutoIt3Wrapper_Res_Language=1033

                  #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

                  #include <GUIConstantsEx.au3>

                  #include <GuiStatusBar.au3>

                  #include <ProgressConstants.au3>

                  #include <StaticConstants.au3>

                  #include <WindowsConstants.au3>

                  #include <String.au3>

                  #include <SecurityEx.au3>

                  #include <Reg.au3>

                  #include <HKCUReg.au3>

                  ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                  ;Declare Package Settings - Generics

                   

                      Global $declare_package_fullname = "Citrix 12"

                   

                   

                      Global $declare_package_shortname = "Citrix"

                      Global $declare_package_shortversion = "12.3.0.8"

                   

                      ;Package Install Verification Settings

                      Global $declare_package_validatekey = "HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\InstallDetect\{A9852000-047D-11DD-95FF-0800200C9A66}"

                      Global $declare_package_validatekey64 = "HKEY_LOCAL_MACHINE64\SOFTWARE\Wow6432Node\Citrix\InstallDetect\{A9852000-047D-11DD-95FF-0800200C9A66}"

                      Global $declare_package_validateentry = "DisplayVersion"

                      Global $declare_package_validatevalue = "12.3.0.8"

                   

                      ;Package Install settings

                      Global $declare_install_reboot = 1

                   

                  ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                   

                  ;================================================================================

                  ;Nothing in this block should be changed - mechanical part of template

                      ;Enumerate System Variables

                      Const $HKEY_LOCAL_MACHINE = 0x80000002

                      Const $HKEY_USERS = 0x80000003

                      Global $env_programfiles = EnvGet("PROGRAMFILES")

                      Global $env_programfiles86 = EnvGet("PROGRAMFILES(x86)")

                      Global $env_hostname = EnvGet("COMPUTERNAME")

                   

                      ;Determine OS

                      If StringinStr(@OSVersion, 'XP') Then

                          $hostos = "XP"

                          $setting_logfilepath = @AppDataCommonDir & "\MMM_Installation_LogFiles\"

                          $profiledir = "C:\Documents and Settings";

                      Else

                          $hostos = "7"

                          $setting_logfilepath = @AppDataCommonDir & "\Applications\MMM_Installation_LogFiles\"

                          $profiledir = "C:\Users";

                      EndIf

                   

                      ;Determine Processor Arch

                      If @OSArch = "X64" Then

                          $hostarch = "64"

                          Global $setting_ldfolder = $env_programfiles86 & "\LANDesk\LDClient\sdmcache\deploy\" & $declare_package_shortname & "\" & $declare_package_shortversion & "\"

                          Global $setting_ldclient = $env_programfiles86 & "\LANDesk\LDClient\"

                          Global $setting_32programfiles = $env_programfiles86 & "\"

                          Global $setting_64programfiles = $env_programfiles & "\"

                      Else

                          $hostarch = "32"

                          Global $setting_ldfolder = $env_programfiles & "\LANDesk\LDClient\sdmcache\deploy\" & $declare_package_shortname & "\" & $declare_package_shortversion & "\"

                          Global $setting_ldclient = $env_programfiles & "\LANDesk\LDClient\"

                          Global $setting_32programfiles = $env_programfiles & "\"

                          Global $setting_64programfiles = $env_programfiles & "\"

                      EndIf

                   

                      ;Determine Log Path Directory

                      Global $fileApplog = FileOpen($setting_logfilepath & $declare_package_shortname & "_" & $declare_package_shortversion & ".log", 2)

                      Global $fileAlllog = FileOpen($setting_logfilepath & "ALL_MMM_DEPLOYS.log", 1)

                   

                      ;Generate Working Directory

                      Global $setting_nvfolder = 'C:\Windows\MMMCache\' & $declare_package_shortname & '\' & $declare_package_shortversion & '\'

                   

                  ;Generate/Load resources

                      ;Generate log path directory

                      DirCreate($setting_logfilepath)

                   

                      ;Generate MMMCache Directory

                      DirCreate("C:\Windows\MMMCache\" & $declare_package_shortname & "\" & $declare_package_shortversion & "\")

                      DirCreate($setting_ldfolder & "source\")

                   

                      ;Unpack Builtin package files

                      FileInstall(".\source\extrac32.exe", $setting_ldfolder & "source\", 1)

                   

                  ;Declare Functions

                  #include <_MyFunctions.au3>

                   

                  ;Check for Admin rights

                  If IsAdmin() = 0 Then

                      _FailInstall("Insufficient Privileges")

                  EndIf

                   

                  ;Check if for image deployment

                  If StringInStr("/image", $CmdLineRaw) <> 0 Then

                      $imagemode = 1

                  Else

                      $imagemode = 0

                  EndIf

                   

                  ;GUI Controls

                      ;Configure Initial Tray Icon Settings

                      Opt("TrayMenuMode", 3)

                      Opt("TrayOnEventMode", 1)

                   

                      ;Generate Menu Layout

                      Local $settingsitem = TrayCreateMenu("Admin Operations")

                          Local $operationviewlog = TrayCreateItem("View Install Log", $settingsitem)

                          TrayItemSetOnEvent(-1, "_ViewLog")

                          TrayCreateItem("", $settingsitem)

                          Local $operationabort = TrayCreateItem("Abort Installation", $settingsitem)

                          TrayItemSetOnEvent(-1, "_Exit")

                      TrayCreateItem("")

                      Local $aboutitem = TrayCreateItem("What is Installing?")

                      TrayItemSetOnEvent(-1, "_ViewAbout")

                   

                  ;################################################################################

                  ;Begin Script Runtime

                      ;Initiate Package Deployment

                       _AllLog($declare_package_shortname & " STARTED TRANSACTION")

                          ;Trigger User Notifications

                          TraySetState(5)

                          TrayTip("Updating: " & $declare_package_fullname, "An update to a YourDomain sponsored application is being installed in the background.", "30", 2)

                   

                      ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

                      ;Extract files, kill processes

                      _UpdateStatus("Preparing...", 1)

                      FileInstall(".\source\currentversion.cab", $setting_ldfolder & "source\", 1)

                   

                          If $imagemode = 0 Then

                   

                          DirCreate("C:\Windows\MMMCache\" & $declare_package_shortname & "\old\")

                          FileInstall(".\source\previousversion.cab", $setting_ldfolder & "source\", 1)

                   

                          RunWait($setting_ldfolder & 'source\extrac32.exe /E "' & $setting_ldfolder & 'source\previousversion.cab" /Y', 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\', @SW_HIDE)

                   

                          FileCopy('C:\Windows\MMMCache\' & $declare_package_shortname & '\old\SetDfltSettings.exe', "C:\Windows\System32\SetDfltSettings.exe", 1)

                          RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\09A7F1F0B17E54E40A66821916F9221E\SourceList\Net", "2", "REG_EXPAND_SZ", 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\')

                          RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\1A4908760526B674A9FF34674EF831C5\SourceList\Net", "2", "REG_EXPAND_SZ", 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\')

                          RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\355F4FC200E5CD2458BAA9A1927C9D2D\SourceList\Net", "2", "REG_EXPAND_SZ", 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\')

                          RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\6D02C9913D0101243B16740602F965EA\SourceList\Net", "2", "REG_EXPAND_SZ", 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\')

                          RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\703563AF369161D4DB4411C3F830A7DA\SourceList\Net", "2", "REG_EXPAND_SZ", 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\')

                          RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\875BCCE3E405A7F48A4BFCF4B339B944\SourceList\Net", "2", "REG_EXPAND_SZ", 'C:\Windows\MMMCache\' & $declare_package_shortname & '\old\')

                   

                          _CloseProgram('wfcrun32.exe',0)

                          _CloseProgram('wfica32.exe',0)

                          _CloseProgram('pnagent.exe',0)

                          _CloseProgram('pnamain.exe',0)

                          _CloseProgram('concetr.exe',0)

                          _CloseProgram('cpviewer.exe',0)

                          _CloseProgram('uniprint.exe',0)

                          _CloseProgram('upcrelay.exe',0)

                          Sleep(2000)

                          _CloseProgram('wfcrun32.exe',1)

                          _CloseProgram('wfica32.exe',1)

                          _CloseProgram('pnagent.exe',1)

                          _CloseProgram('pnamain.exe',1)

                          _CloseProgram('concetr.exe',1)

                          _CloseProgram('cpviewer.exe',1)

                          _CloseProgram('uniprint.exe',1)

                          _CloseProgram('upcrelay.exe',1)

                          Sleep(2000)

                   

                          ;Metaframe Uninstallers

                          _UninstallMSI('{2C42ED1E-6315-4E63-89E6-057EA114EBB8}')

                   

                          ;Citrix Online Uninstallers 11

                          _UninstallMSI('{CF53CF7C-D996-43EB-9904-DBED57C25625}')

                          _UninstallMSI('{812424AC-A8B5-44E6-8D48-07E939D1AD9A}')

                          _UninstallMSI('{B8A2256E-6225-4D9E-B1C9-C26CA1E22FEB}')

                          _UninstallMSI('{7C84DDDF-DEC9-4E02-8222-D86E73531CEB}')

                          _UninstallMSI('{55392E52-1AAD-44C4-BE49-258FFE72434F}')

                          _UninstallMSI('{0BCA9EFD-F2D6-4638-B053-8693BA0404BE}')

                   

                          ;Citrix Online Uninstallers 12.1

                          _UninstallMSI('{678094A1-6250-476B-9AFF-4376E48F135C}')

                          _UninstallMSI('{0F1F7A90-E71B-4E45-A066-2891619F22E1}')

                          _UninstallMSI('{199C20D6-10D3-4210-B361-4760209F56AE}')

                          _UninstallMSI('{2CF4F553-5E00-42DC-85AB-9A1A29C7D9D2}')

                          _UninstallMSI('{3ECCB578-504E-4F7A-A8B4-CF4F3B939B44}')

                          _UninstallMSI('{FA365307-1963-4D16-BD44-113C8F037AAD}')

                   

                          ;Citrix Online Uninstallers 12.3

                          _UninstallMSI('{6F2FDD50-E0F3-4117-B575-78E77F8D11EF}')

                          _UninstallMSI('{57287FDF-27E6-45BC-9DD2-A33545C46C1A}')

                          _UninstallMSI('{913778D3-E1D8-4B55-9246-3308C54D3162}')

                          _UninstallMSI('{0F7319A9-083D-40B3-8256-00A6F3C2AAA2}')

                          _UninstallMSI('{133236FE-E2F7-4313-8BF8-A10ACAAA7CB9}')

                          _UninstallMSI('{2FC7287D-39DD-4A84-9806-D27D3CCDC51B}')

                   

                          ;Citrix Offline Plugin

                          _UninstallMSI('{70A9E155-B1EE-42A0-8605-56E932DFF246}')

                   

                          ;UniPrint 3x

                          RunWait($setting_32programfiles & 'UniPrint\Client\UNWISE.EXE /S C:\PROGRA~1\UniPrint\Client\INSTALL.LOG', "", @SW_HIDE)

                   

                          ;UniPrint 4x

                          _UninstallMSI('{50A7D603-B3DD-48C1-A518-486B2EDFFA3F}')

                          _UninstallMSI('{59834921-0D4B-4AD5-BA8A-538238819F4C}')

                   

                          ;UniPrint 5x

                          _UninstallMSI('{1C6BF09D-6356-4EAE-97D9-556119A2C69C}')

                   

                          FileDelete($setting_32programfiles & 'UniPrint\*')

                          DirRemove($setting_32programfiles & 'UniPrint\')

                          FileDelete($setting_32programfiles & 'Citrix\ICA Client\*')

                          DirRemove($setting_32programfiles & 'Citrix\ICA Client\')

                          RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{50A7D603-B3DD-48C1-A518-486B2EDFFA3F}")

                          RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\UniPrint")

                          RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client", "vdllpath")

                          RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "UniPrint")

                          RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ConnectionCenter")

                   

                          _HKCU_Delete("Software\Citrix\EPA")

                          _HKCU_Delete("Software\Citrix\HdxMediaStreamForFlash")

                          _HKCU_Delete("Software\Citrix\ICA Client")

                          _HKCU_Delete("Software\Citrix\PNAgent")

                          _HKCU_Delete("Software\Citrix\Program Neighborhood Agent")

                          _HKCU_Delete("Software\Citrix\XenDesktop")

                          _HKCU_Delete("Software\Microsoft\Windows\CurrentVersion\Run", "UniPrint")

                          _HKCU_Delete("Software\Microsoft\Terminal Server Client\Default\AddIns\UniPrint")

                          _HKCU_Delete("Software\UniPrint")

                   

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\CitrixCAB")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\ICA Client")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\Install")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\InstallDetect")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\PluginPackages")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\PNAgent")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Citrix\XenDesktop")

                   

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\CitrixCAB")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\ICA Client")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\Install")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\InstallDetect")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\PluginPackages")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\PNAgent")

                          RegDelete("HKEY_LOCAL_MACHINE\Software\Wow6432Node\Citrix\XenDesktop")

                   

                          DirRemove('C:\Windows\MMMCache\' & $declare_package_shortname & '\old\', 1)

                          FileDelete($setting_ldfolder & 'source\previousversion.cab')

                   

                          EndIf

                      ;Install base application, updates, and prereqs.

                      _UpdateStatus("Installing...", 2)

                          RunWait($setting_ldfolder & 'source\extrac32.exe /E "' & $setting_ldfolder & 'source\currentversion.cab" /Y', $setting_nvfolder, @SW_HIDE)

                   

                          RunWait($setting_nvfolder & 'CitrixOnlinePluginFull.exe /silent ENABLE_SSON="YES" ENABLE_DYNAMIC_CLIENT_NAME=Yes SERVER_LOCATION="http://citrix.yourdomain.com" DONOTSTARTCC=1', $setting_nvfolder, @SW_HIDE)

                          Sleep(2000)

                          RunWait(@SystemDir & '\MSIExec.exe /q /i UniPrintClient50.msi ALLUSERS=1', $setting_nvfolder, @SW_HIDE)

                   

                          ;Setting network provider order

                          $order = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order", "ProviderOrder")

                          $hworder = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder", "ProviderOrder")

                   

                          $order = StringReplace($order, ",PnSson", "")

                          $order = StringReplace($order, "PnSson,", "")

                   

                          $hworder = StringReplace($order, ",PnSson", "")

                          $hworder = StringReplace($order, "PnSson,", "")

                   

                          $order = _StringInsert($order, "PnSson,", 0)

                          $hworder = _StringInsert($hworder, "PnSson,", 0)

                   

                          RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order", "ProviderOrder", "REG_SZ", $order)

                          RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder", "ProviderOrder", "REG_SZ", $hworder)

                          _HKCU_Write("Software\UniPrint\Client\Relay", "EnablePreview", "REG_DWORD", "1")

                   

                      _UpdateStatus("Finalizing...", 3)

                          ;Cleanup old setup files

                          DirRemove("C:\Support\Applications\Citrix_Online_PlugIn\", 1)

                          DirRemove("C:\Support\Applications\Citrix\", 1)

                          DirRemove("C:\Support\Citrix\", 1)

                          DirRemove("C:\SUPPORT\CTXOLD\", 1)

                          FileDelete("C:\Windows\System32\SetDfltSettings.exe")

                   

                          _VerifyApplication()

                   

                          ;Remove source setup files

                          DirRemove($setting_ldfolder & 'source\', 1)

                   

                          Run($setting_ldclient & 'sdclient.exe /msg="DONE"')

                          Sleep(3000)

                   

                      ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

                      ;End Package Deployment

                          ;Remove User Notifications

                          TraySetState(8)

                          TrayTip("Update Complete: " & $declare_package_fullname, "The update to your computer has completed successfully.", "30", 2)

                   

                          ;End deployment process

                          _AllLog($declare_package_shortname & " ENDED TRANSACTION")

                          If $imagemode = 0 Then

                              Run($setting_ldclient & 'LDISCN32.exe /NTT=CORESERVER:5007 /S=CORESERVER /I=HTTP://CORESERVER/ldlogon/ldappl3.ldz /F /MU')

                              If $declare_install_reboot = 1 Then

                                  _CloseProgram('vulscan.exe',1)

                                  Run($setting_ldclient & 'vulscan.exe /showui /RebootIfNeeded /RebootAction=always /rebootmessage="A YOURDOMAIN sponsored application has been upgraded/installed. A reboot is required." /defaultreboottimeoutaction=reboot /autoreboottimeout=300 /snoozecount=0')

                              EndIf

                          EndIf

                   

                   

                  ;################################################################################

                  Sleep(8000)

                  Exit(0)