User Tools

Site Tools


userspace:thinprint

This is an old revision of the document!


ThinPrint Client 8.0 MSI-Package

this script deployed the .print Client engine for Citrix. You must defined a product dependency to the Citrix Plugin for hosted solutions

Dieses Script verteilt die .print Client Komponente von ThinPrint. In der Produktdefinition müssen Sie eine Produktabhängigkeit zu den Ctrix Plugin für gehostete Anwendungen erstellen

tested under Windows 7/32 Bit / Getestet unter Windows 7 32 Bit

the 64 Bit section is under construction / Die 64 Bit Sektion ist noch in Arbeit

questions to / Fragen an Frisoft

loading the licensed components / Herunterlader der zu lizensierenden Konponenten http://www.thinprint.de/Download/ClientsTools.aspx

the product picture are downloaded from Internet / Das Produktbild ist aus dem Internet herunterzuladen

the scripts are unversal scripts, they are customized for many sloutions / Die Scripts sind Unversal-Scripts, die schon für einige Lösungen abgepasst wurden

the scripts are based of a Solution from forum member Thomas_H / Die Scripte basieren auf einer Lösung vom Forum - Mitglied Thomas_H

my directory strcture / Meine Verzeichnisstruktur

 files\TPTCP_x64_deu\ThinPrint\TPTCP_x64_deu.msi
 files\TPTCP_x86_deu\ThinPrint\TPTCP_x86_deu.msi
 delsub.ins
 setup.ins
 uninstall.ins
 ThinPrint.jpg

setup.ins

[Initial]
LogLevel=9
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
 
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
Defvar $InstallTmpDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
defvar $INSTVersion$
DefVar $Version$
DefVar $Inst_Cmd32$
DefVar $Inst_Cmd64$
DefVar $Inst_Prg$
DefVar $Uninst_Cmd$
DefVar $Uninst_Prg$
DefVar $InstDest$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
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$       = "ThinPrint"
Set $Version$         = "2011"
Set $MinimumSpace$    = "50 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\ThinPrint Client"
Set $InstallDir64$      = "%ProgramFiles64Dir%\ThinPrint Client"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Inst_Prg$ = "msiexec.exe"
Set $Inst_Cmd32$ = '/qb /i "%ScriptPath%\files\TPTCP_x86_deu\ThinPrint\TPTCP_x86_deu.msi" CITRIXCLIENT-DIR="%ProgramFiles32Dir%\Citrix\ICA Client" /quiet'
Set $Inst_Cmd64$ = '/qb /i "%ScriptPath%\files\TPTCP_x64_deu\ThinPrint\TPTCP_x64_deu.msi" CITRIXCLIENT-DIR="%ProgramFiles64Dir%\Citrix\ICA Client" /quiet'
Set $Uninst_Cmd$ = ""
Set $Uninst_Prg$ = ""
; ----------------------------------------------------------------
 
;c:\Windows\System32\msiexec /qb /i "c:\install\ThinPrintClient Windows 8.6.msi" ADDLOCAL="ICA" CITRIXCLIENT-DIR="C:\Program Files\Citrix\ICA Client"
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$
 
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
 
;       if FileExists("%ScriptPath%\delsub.ins")
;               comment "Start uninstall sub section"
;               Sub "%ScriptPath%\delsub.ins"
;       endif
 
        if $LicenseRequired$ = "true"
                comment "Licensing required, reserve license and get license key"
                Sub_get_licensekey
        endif
 
        comment "Installiere ThinPrint Client 8.0 ICA..."
 
        if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
                Message "Installiere " + $ProductId$ + ". Das kann etwas laenger dauern, bitte Geduld..."
                comment "Start setup program"
                if (FileExists("%ProgramFilesSysnativeDir%\Citrix\ICA Client\pn.exe"))
                	comment "installing the plugin"
			Winbatch_install_32
                endif
;                comment "patch the Userprofil"
;                Set $InstDest$ = "%CurrentProfileDir%"
;                Files_Patch_UserProfil
;                if not(fileExists("%DefaultUserProfileDir%\AppData\Roaming\ICAClient\wfcwin32.log"))
;                	comment "patch the default User5Profile"
;                	Set $InstDest$ = "%DefaultUserProfileDir%"
;                	Files_Patch_UserProfil
;                endif
                comment "ceck the return arguments"
                Sub_check_exitcode
        endif
 
        if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
                Message "Installiere " + $ProductId$ + ". Das kann etwas laenger dauern, bitte Geduld..."
                comment "Start setup program"
                if not (FileExists("%ProgramFilesSysnativeDir%\Citrix\ICA Client\pn.exe"))
                	comment "installing the plugin"
			Winbatch_install_64
                endif
;                comment "patch the Userprofil"
;                Set $InstDest$ = "%CurrentProfileDir%"
;                Files_Patch_UserProfil
;                if not(fileExists("%DefaultUserProfileDir%\AppData\Roaming\ICAClient\wfcwin32.log"))
;                	comment "patch the default User5Profile"
;                	Set $InstDest$ = "%DefaultUserProfileDir%"
;                	Files_Patch_UserProfil
;                endif
                comment "ceck the return arguments"
                Sub_check_exitcode
        endif
 
endif
 
 
[Winbatch_install_32]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
"$Inst_Prg$" $Inst_Cmd32$
 
[Winbatch_install_64]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
"$Inst_Prg$" $Inst_Cmd64$
 
[Files_delete_32]
; Example of recursively copying some files into the installation directory:
;
;copy "%ScriptPath%\config.xml" "$InstallTmpDir$\$INSTVersion$.WW"
 
[Files_Install_Copy]
; copy the installationCD to the local HD
 
;copy -s "%ScriptPath%\files\*.*" "$InstallTmpDir$"
;copy "%ScriptPath%\config.xml" "$InstallTmpDir$\$INSTVersion$.WW"
 
[Files_Patch_UserProfil]
 
;copy -s "%ScriptPath%\files\ICAClient_User\*.*" "$InstDest$\AppData\Roaming\ICAClient"
;copy -s "%ScriptPath%\files\Cache_local\*.*" "$InstDest$\AppData\local\ICAClient\Cache"
 
[Sub_get_licensekey]
comment "License management is enabled and will be used"
 
comment "Trying to get a license key"
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
; If there is an assignment of exactly one licensepool
; to the product the following call is possible:
; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
;
; If there is an assignment of a license pool
; to a windows software id, it is possible to use:
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)
 
DefVar $ServiceErrorClass$
set $ServiceErrorClass$ = getLastServiceErrorClass
comment "Error class: " + $ServiceErrorClass$
 
if $ServiceErrorClass$ = "None"
        comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
else
        if $ServiceErrorClass$ = "LicenseConfigurationError"
                LogError "Fatal: license configuration must be corrected"
                LogError getLastServiceErrorMessage
                isFatalError
        else
                if $ServiceErrorClass$ = "LicenseMissingError"
                        LogError "Fatal: required license is not supplied"
                        isFatalError
                endif
        endif
endif
 
 
 
[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"
                comment "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"
                                comment "complete the install. This message is indicative of a success."
                        else
                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: "
                                logError $ExitCode$
                                isFatalError
                        endif
                endif
        endif
endif

uninstall.ins

[Initial]
LogLevel=9
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $Version$
DefVar $MinimumSpace$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir32$
DefVar $InstallDir64$
Defvar $InstallTmpDir$
DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Uninst_Cmd$
DefVar $Uninst_Prg$
DefVar $INSTVersion$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       	= "ThinPrint"
Set $Version$         	= "2011"
Set $MinimumSpace$    	= "50 MB"
Set $InstallDir32$    	= "%ProgramFiles32Dir%\ThinPrint Client"
Set $InstallDir64$    	= "%ProgramFiles64Dir%\ThinPrint Client"
Set $LicenseRequired$ 	= "false"
Set $LicensePool$     	= "p_" + $ProductId$
Set $Uninst_Prg$        = "MsiExec.exe"
Set $Uninst_Cmd$        = " /X{4A7DCE09-9A5A-4A75-ACA5-98D13D400816} /quiet"
; the correct uninstall command you are looked in the registry under the Hive
; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
; ----------------------------------------------------------------
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$
 
Message "Deinstalliere " + $ProductId$ + ". Bitte etwas Geduld..."
 
if (FileExists("%ProgramFilesSysnativeDir%\ThinPrint Client\Thnclnt32deu.dll"))
	comment "Start uninstall sub section"
	Sub "%ScriptPath%\delsub.ins"
	comment "delete the default and the user profile data"
;	Files_Delete_UserProfil
 
else
	comment "modul not installed"
	isFatalError
endif	
 
 
if $LicenseRequired$ = "true"
        comment "Licensing required, free license used"
        Sub_free_license
endif
 
ExitWindows /reboot
 
[Files_Delete_UserProfil]
 
delete -s "%CurrentProfileDir%\AppData\Roaming\ICAClient"
delete -s "%CurrentProfileDir%\AppData\local\ICAClient\Cache"
delete -s "%DefaultUserProfileDir%\AppData\Roaming\ICAClient"
delete -s "%DefaultUserProfileDir%\AppData\local\ICAClient\Cache"
 
[Sub_free_license]
comment "License management is enabled and will be used"
 
comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)

delsub.ins

if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
        Message "Uninstalling " + $ProductId$ + " 32 Bit..."
        comment "Uninstall program found, starting uninstall"
        Winbatch_uninstall_32
        sub_check_exitcode
        endif
 
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
        Message $ProductId$ + " ist nur fuer 32 Bit..."
        comment "Fatal: Nur fuer 32 Bit OS!"
        isFatalError
endif
 
[Winbatch_uninstall_32]
 
$Uninst_Prg$ $Uninst_Cmd$ 
 
[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
                        	if ($ExitCode$ = "30066")
                        		comment "looks good: setup program means that the install-Source are corrupted"
                        	else
                        		logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
                        		isFatalError
                        	endif
                        endif
                endif
        endif
endif
userspace/thinprint.1335656532.txt.gz · Last modified: 2021/08/23 08:37 (external edit)