====== Citrix Online Plugin ======
Adaptation of the opsi-template scripts for the Citrix Online Plugin. \\
Downloadable somewhere from the Citrix site, try to find it yourself. I knew people that tried to find something on the Citrix website, and nobody ever heard from them again! ;-)\\
This is a different version than the one already on here, this includes adding a website to the trusted zone in Internet Settings, and creating a few shortcuts. Only tested this as script, not as complete package. The mozilla-firefox package is not finished yet.\\
Shortcuts are made for the https://subdomain.your-mom.com site, which of course doesn't really exist.\\
==== control file ====
[Package]
version: 1
depends:
incremental: False
[Product]
type: localboot
id: citrix-plugin
name: Citrix Online Plugin
description: Citrix ICA Client Plugin
advice:
version: 12.3.0.8
priority: -50
licenseRequired: False
productClasses:
setupScript: setup.ins
uninstallScript: uninstall.ins
updateScript:
alwaysScript:
onceScript:
customScript:
userLoginScript:
[ProductDependency]
action: setup
requiredProduct: mozilla-firefox
requiredStatus: installed
[Changelog]
citrix-plugin (12.3.0.8-1) testing; urgency=low
* Initial package
-- ICT Thu, 12 Jul 2012 15:23:58 +0000
==== setup.ins ====
[Actions]
requiredWinstVersion >= "4.11.2.1"
DefVar $MsiId$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "citrix-plugin"
Set $MinimumSpace$ = "100 MB"
Set $MsiId$ = 'CitrixOnlinePluginPackWeb'
Set $InstallDir$ = "%ProgramFiles32Dir%\Citrix"
; ----------------------------------------------------------------
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
comment "MSI id " + $MsiId$ + " found in registry, starting uninstall"
Winbatch_uninstall
sub_check_exitcode
comment "Cleanup registry"
Registry_uninstall_all /AllNTUserDats
Registry_uninstall
comment "Delete program shortcuts"
LinkFolder_uninstall
endif
Message "Installing " + $ProductId$ + " ..."
comment "Start setup program"
Winbatch_install
Sub_check_exitcode
comment "Patch Registry"
Registry_install_all /AllNTUserDats
Registry_install
comment "Create shortcuts"
LinkFolder_install
endif
[Winbatch_install]
"%ScriptPath%\files\CitrixOnlinePluginWeb_12.3.0.8.exe" /silent /noreboot ADDLOCAL="ICA_Client" ENABLE_SSON="No" INSTALLDIR="$InstallDir$"
[Registry_install_all]
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\your-mom.com\subdomain]
set "https" = REG_DWORD:0002
[Registry_install]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix]
set "IcaEnableKeepAlive"=REG_DWORD:00000001
set "IcaKeepAliveInternal"=REG_DWORD:00000060
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
set "TcpMaxDataRetransmissions"=REG_DWORD:00000010
[LinkFolder_install]
set_basefolder common_programs
set_subfolder Citrix
set_link
name: This space available (Mozilla Firefox)
target: "%ProgramFiles32Dir%\Mozilla Firefox\firefox.exe"
parameters: https://subdomain.your-mom.com
working_dir: "%ProgramFiles32Dir%\Mozilla Firefox"
icon_file: "$InstallDir$\wfica32.exe"
icon_index: 0
end_link
set_link
name: Your name here (Internet Explorer)
target: "%ProgramFiles32Dir%\Internet Explorer\iexplore.exe"
parameters: https://subdomain.your-mom.com
working_dir: "%ProgramFiles32Dir%\Internet Explorer\"
icon_file: "$InstallDir$\wfica32.exe"
icon_index: 0
end_link
set_basefolder common_desktopdirectory
set_subfolder ""
set_link
name: Do not click me
target: "%ProgramFiles32Dir%\Mozilla Firefox\firefox.exe"
parameters: https://subdomain.your-mom.com
working_dir: "%ProgramFiles32Dir%\Mozilla Firefox"
icon_file: "$InstallDir$\wfica32.exe"
icon_index: 0
end_link
[Winbatch_uninstall]
"%ScriptPath%\files\CitrixOnlinePluginWeb_12.3.0.8.exe" /silent /noreboot /uninstall
[Registry_uninstall_all]
deletekey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\your-mom.com\subdomain]
[Registry_uninstall]
deletekey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
deletevar "TcpMaxDataRetransmissions"
[LinkFolder_uninstall]
set_basefolder common_programs
delete_subfolder Citrix
set_basefolder common_desktopdirectory
set_subfolder ""
delete_element Do not click me
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif
==== uninstall.ins ====
[Actions]
requiredWinstVersion >= "4.11.2.1"
DefVar $MsiId$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "citrix-plugin"
Set $MsiId$ = 'CitrixOnlinePluginPackWeb'
; ----------------------------------------------------------------
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
Message "Uninstalling " + $ProductId$ + " ..."
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
comment "MSI id " + $MsiId$ + " found in registry, starting uninstall"
Winbatch_uninstall
sub_check_exitcode
endif
comment "Cleanup registry"
Registry_uninstall_all /AllNTUserDats
Registry_uninstall
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall]
"%ScriptPath%\files\CitrixOnlinePluginWeb_12.3.0.8.exe" /silent /noreboot /uninstall
[Registry_uninstall_all]
deletekey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\your-mom.com\subdomain]
[Registry_uninstall]
deletekey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
deletevar "TcpMaxDataRetransmissions"
[LinkFolder_uninstall]
set_basefolder common_programs
delete_subfolder Citrix
set_basefolder common_desktopdirectory
set_subfolder ""
delete_element Do not click me
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif