User Tools

Site Tools


userspace:thunderbird

Thunderbird 9.x

Tested with opsi 4.0.1
requiredWinstVersion >= 4.10.8.6
Download Setup-Files at http://www.mozilla.org

By Thomas_H 2012/01/31 08:46

Hier kommt eine erweitere Version, welche auch ein zuvor eingerichtetes Profil bercksichtigt.

Thunderbird installieren
Add-ons herunterladen und installieren (empfohlen: zB. Adblock Plus, Enigmail)
Thunderbird eventuell den Erfordernissen anpassen (zB. Proxy etc.)
Profil des aktuellen Nutzers kopieren.
(Win7: C:\Users\<name>\AppData\Local\Mozilla\Thunderbird\Profiles
WinXP: C:\Dokumente und Einstellungen\<name>\Anwendungsdaten\Mozilla\Thunderbird\Profiles )

This is an extended Version which also installs a defined profile.

Install Firefox
download and install add-ons (recommended: Adblock Plus, Enigmail)
set preferences for firefox (i.e. proxy etc.)
copy profile of actual user.
(Win7: C:\Users\<name>\AppData\Local\Mozilla\Thunderbird\Profiles
WinXP: C:\Dokumente und Einstellungen\<name>\Anwendungsdaten\Mozilla\Thunderbird\Profiles )

Tree:

|- <dir> thunderbird-profile 
   |- <content of the folder...>
|- Thunderbird Setup 9.0.1.exe
|- delsub.ins
|- setup.ins
|- thunderbird.jpg
|- uninstall.ins

setup.ins

[Initial]
LogLevel=2
;  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
 
[Aktionen]
DefVar $ProductId$
DefVar $InstallDir$
DefVar $NewExe$
DefVar $PRODUCTPATH$
DefStringList $profiles$
DefVar $akt_profile_ini$
DefVar $rel_prefs_path$
DefVar $akt_prefs_path$
DefVar $TEMP$
DefVar $OS$
DefVar $UninstallCommand$
DefVar $MozInstallDir$
DefVar $MozVersion$
DefVar $MozInstallPathRegKey$
DefVar $PROXY_HOSTNAME_OR_IP$
DefVar $PROXY_PORT$
DefVar $NOPROXY_HOSTS$
DefVar $PREF_FILE$
DefStringList $languageInfo$
DefVar $language$
DefVar $AppData$
DefVar $SilentSwitch$
DefVar $ExitCode$
DefVar $THUNDERBIRDVER$
 
 
;----------------------------------------------------------------------
    Set $TEMP$ = EnvVar("TEMP")
    Set $PRODUCTPATH$="%ProgramFilesDir%\Mozilla Thunderbird"
    Set $MozInstallDir$ = $PRODUCTPATH$
    set $InstallDir$=$PRODUCTPATH$
    set $NewExe$= $PRODUCTPATH$+"\"
    set $ProductId$ = "thunderbird"
    set $OS$ = GetNTVersion
    set $THUNDERBIRDVER$ = "Thunderbird Setup 9.0.1.exe"
    set $SilentSwitch$ = "-ms"
 
; If you need a multilanguage install package, you can remove ";" character below lines. 
; When you make the package, you need to add language properties and language values.
;
;	set $THUNDERBIRDLANG$ = GetProductProperty("language","en")
;	if ($THUNDERBIRDLANG$ = "hu")
;		set $THUNDERBIRDVER$ = "Thunderbird Setup 24.5.0_de.exe"
;	endif
;	if ($THUNDERBIRDLANG$ = "en")
;		set $THUNDERBIRDVER$ = "Thunderbird Setup 24.5.0_en.exe"
;	endif
;	if ($THUNDERBIRDLANG$ = "jp")
;		set $THUNDERBIRDVER$ = "Thunderbird Setup 24.5.0_jp.exe"
;	endif
 
;----------------------------------------------------------------------
 
;Do we have enough free diskspace?
if not(HasMinimumSpace ("%SYSTEMDRIVE%", "30 MB"))
    LogError "Nicht gengend Platz auf C: . 30 MB auf C: fuer Thunderbird erforderlich."
    isFatalError
    comment "Bearbeitung beenden und Produktschalter auf failed setzen"
else
    comment "show product picture"
    ShowBitmap /3 "%scriptpath%\thunderbird.jpg" "Thunderbird"
 
    if FileExists("%ScriptPath%\delsub.ins")
        comment "start delsub.ins"
        sub "%ScriptPath%\delsub.ins"
    endif
 
    comment "Message at install time:"
    Message "Installing Thunderbird..."
    comment "kill a running thunderbird"
    killtask "thunderbird.exe"
 
    comment "check for depotshare"
    if not (FileExists("%SCRIPTPATH%"))
      DosInAnIcon_TryToReconnect
    endif
 
    comment "start setup program"
    Files_copy_local
    Winbatch_thunderbird
    sub_check_exitcode
 
    comment "kill a running thunderbird"
    killtask "thunderbird.exe"
 
    if not(FileExists($NewExe$))
        logError "Fatal: After Installation "+$NewExe$+" not found"
        isFatalError
    endif
 
   comment "del temporary files"
   Files_del
 
endif
 
 
[Files_copy_local]
copy -x "%SCRIPTPATH%\$THUNDERBIRDVER$" c:\tmp
copy -s "%scriptpath%\thunderbird-profile\*" "$InstallDir$\defaults\profile\."
 
[Files_del]
delete -f "c:\tmp\$THUNDERBIRDVER$"
 
[Winbatch_thunderbird]
; see http://wiki.mozilla.org/Installer:Command_Line_Arguments
"c:\tmp\$THUNDERBIRDVER$" $SilentSwitch$
 
[dosbatch_profiledir]
@echo off
dir "%ProfileDir%" /b
 
[DosInAnIcon_TryToReconnect]
net use
set TIMEOUT=
:TRY
    if exist "%SCRIPTPATH%\." goto READY
    %ScriptDrive%
    set TIMEOUT=%TIMEOUT%1
    if %TIMEOUT% == 1111111111111111 goto READY
    sleep 1
    net use
    goto TRY
:READY
 
[PatchTextFile_profile_proxy_file]
Set_Netscape_User_Pref ("network.proxy.type", 2)
Set_Netscape_User_Pref ("network.proxy.autoconfig_url", "file:///$PROXY_HOSTNAME_OR_IP$")
 
[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.10.8.6"
 
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $MozInstallDir$
DefVar $MozInstallDir64$
DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $UninstallCommand$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       = "thunderbird"
Set $MozInstallDir$    = "%ProgramFilesDir%\Mozilla Thunderbird"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
; ----------------------------------------------------------------
 
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$
 
Message "Uninstalling " + $ProductId$ + " ..."
 
if FileExists("%ScriptPath%\delsub.ins")
        comment "Start uninstall sub section"
        Sub "%ScriptPath%\delsub.ins"
endif
 
if $LicenseRequired$ = "true"
        comment "Licensing required, free license used"
        Sub_free_license
endif
 
[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

;************************************************************
;
;delsub.ins
;
;************************************************************
 
; Message at install time:
Message "Deinstalling "+$ProductId$+" ..."
 
; kill a running thunderbird
killtask "thunderbird.exe"
 
; if thunderbird uninstall program exists then start it
 
if FileExists(""+$MozInstallDir$+"\uninstall\helper.exe")
    set $UninstallCommand$ = ""+$MozInstallDir$+"\uninstall\helper.exe"
    set $UninstallCommand$ = '"'+$UninstallCommand$+'" /S'
    WinBatch_start_ThunderbirdUninstall /WaitSeconds 20
    sub_check_exitcode
endif
 
; delete registry entry to the current installed version
Registry_delete_current_version
; delete files of current version
if not ($MozInstallDir$ = "")
        Files_copy_deinstall
endif
 
 
 
[WinBatch_start_ThunderbirdUninstall]
$UninstallCommand$
;%SCRIPTPATH%\sleep 5
 
[Files_copy_deinstall]
delete -sf "$MozInstallDir$\"
 
[Registry_delete_current_version]
OpenKey [HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Thunderbird]
set "CurrentVersion" = ""
 
[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
userspace/thunderbird.txt · Last modified: 2021/08/23 08:37 (external edit)