This is an old revision of the document!
Adaptation of the opsi-template scripts for the Citrix Online Plugin.
The online plugin is not being updated any more, so we have to use Citrix Receiver.
Downloadable from the Citrix Receiver site: http://receiver.citrix.com/
As Citrix Receiver is loaded with lots of unneeded stuff, we are going to install only one component.
Extract the downloaded file with Total Commander, or an other program that can handle compressed .exe files.
We need the ICAWebWrapper.msi file, this is the .msi of the Online Plugin.
What can be an useful tool is InstEd!: http://www.instedit.com/download.html
With this we make an msi transform to change the title that is shown in the add/remove programs interface in windows. “Online Plugin” doesn't say very much, does it?
In InstEd! we choose Tables → Property, change ProductName to Citrix Online Plug-in 14.1.0.0 (or the version that you are installing).
More information about MSI transforms: http://www.instedit.com/workingwithtransforms.html
NOTE: have to fix the rest of this wiki entry… some time soon!
But this might already help somebody..
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.
[Package] version: 1 depends: incremental: False [Product] type: localboot id: citrix-plugin name: Citrix Online Plugin description: Citrix ICA Client Plugin advice: version: 14.1.0.0 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 (14.1.0.0-1) testing; urgency=low * Initial package
[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] msiexec.exe /qn /i "%ScriptPath%\files\Citrix_ICAWebWrapper_14.1.0.0.msi" TRANSFORMS="%ScriptPath%\files\Citrix_ICAWebWrapper_14.1.0.0.mst" ; Let's unregister the redirector plugin for all browsers.. Somehow I don't think this works yet. Blame citrix. "$InstallDir$\ICA Client\redirector.exe" /unregAll [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 ; Let's get rid of that citrix redirector plugin! deletekey [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@Citrix.com/npURLInterceptor] openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Run] deletevar "Redirector" [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_14.1.0.0.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