This shows you the differences between two versions of the page.
userspace:firefox [2011/10/28 09:37] Thomas_H |
userspace:firefox [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Frei nach dieser Anleitung: http:// | ||
- | |||
- | Sehr minimal aber erstmal ein Einstieg. Mehr findet Infos man unter: https:// | ||
- | |||
- | Install.ins | ||
- | [Initial] | ||
- | Message=installiere Firefox 7.0.1 DE | ||
- | StayOnTop=false | ||
- | [Aktionen] | ||
- | Winbatch_produkt_silent_install | ||
- | [Winbatch_produkt_silent_install] | ||
- | %SCRIPTPATH%\firefox-de-7.0.1.exe -ms | ||
- | |||
- | |||
- | Uninstall.ins | ||
- | [Initial] | ||
- | Message=deinstalliere Firefox | ||
- | StayOnTop=false | ||
- | [Aktionen] | ||
- | ; We need to wait for " | ||
- | Winbatch_produkt_silent_uninstall / | ||
- | [Winbatch_produkt_silent_uninstall] | ||
- | " | ||
- | | ||
- | --- | ||
- | |||
- | ==== Erweiterte Version des Firefox ==== | ||
- | |||
- | --- // | ||
- | |||
- | Tested with opsi 4.0.1\\ | ||
- | requiredWinstVersion >= 4.10.8.6 | ||
- | |||
- | Hier kommt eine erweitere Version, welche auch ein zuvor eingerichtetes Profil berücksichtigt. | ||
- | |||
- | - Firefox installieren | ||
- | - Add-ons herunterladen und installieren (empfohlen: WOT, Adblock Plus, Ghostery) | ||
- | - Firefox den Erfordernissen anpassen (zB. Proxy etc.) | ||
- | - Profil des aktuellen Nutzers kopieren. (Win7: C: | ||
- | |||
- | This is an extended Version which also installs a defined profile. | ||
- | |||
- | - Install Firefox | ||
- | - download and install add-ons (recommended: | ||
- | - set preferences for firefox (i.e. proxy etc.) | ||
- | - copy profile of actual user. | ||
- | |||
- | tree: | ||
- | / | ||
- | insgesamt 13552 | ||
- | delsub.ins | ||
- | firefox.bmp | ||
- | firefox-profile (THIS is the directory with the copied profile!) | ||
- | Firefox Setup 7.0.1.exe | ||
- | setup.ins | ||
- | uninstall.ins | ||
- | |||
- | |||
- | ==== setup.ins ==== | ||
- | |||
- | <code winst> | ||
- | |||
- | [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 $FIREFOXVER$ | ||
- | |||
- | |||
- | ; ---------------------------------------------------------------------- | ||
- | Set $TEMP$ = EnvVar(" | ||
- | Set $PRODUCTPATH$=" | ||
- | Set $MozInstallDir$ = $PRODUCTPATH$ | ||
- | set $InstallDir$=$PRODUCTPATH$ | ||
- | set $NewExe$= $PRODUCTPATH$+" | ||
- | set $ProductId$ = " | ||
- | set $OS$ = GetNTVersion | ||
- | set $FIREFOXVER$ = " | ||
- | set $SilentSwitch$ = " | ||
- | ; ---------------------------------------------------------------------- | ||
- | ; Haben wir genug Speicherplatz? | ||
- | if not(HasMinimumSpace (" | ||
- | | ||
- | | ||
- | | ||
- | else | ||
- | | ||
- | | ||
- | if FileExists(" | ||
- | | ||
- | sub " | ||
- | endif | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | if not (FileExists(" | ||
- | | ||
- | endif | ||
- | |||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | |||
- | if not(FileExists($NewExe$)) | ||
- | | ||
- | | ||
- | endif | ||
- | |||
- | | ||
- | | ||
- | endif | ||
- | | ||
- | | ||
- | [Files_copy_local] | ||
- | copy -x " | ||
- | copy -s " | ||
- | |||
- | [Files_del] | ||
- | delete -f " | ||
- | |||
- | [Winbatch_firefox] | ||
- | ; see http:// | ||
- | " | ||
- | |||
- | [dosbatch_profiledir] | ||
- | @echo off | ||
- | dir " | ||
- | |||
- | [DosInAnIcon_TryToReconnect] | ||
- | net use | ||
- | set TIMEOUT= | ||
- | :TRY | ||
- | if exist " | ||
- | %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 (" | ||
- | Set_Netscape_User_Pref (" | ||
- | |||
- | [sub_check_exitcode] | ||
- | comment "test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " | ||
- | if ($ExitCode$ = " | ||
- | | ||
- | | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | | ||
- | | ||
- | else | ||
- | | ||
- | | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== uninstall.ins ==== | ||
- | |||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib gmbh | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | |||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | 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(" | ||
- | |||
- | Set $LogDir$ = " | ||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $MozInstallDir$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_free_license | ||
- | endif | ||
- | |||
- | [Sub_free_license] | ||
- | comment " | ||
- | |||
- | comment " | ||
- | 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("", | ||
- | ; | ||
- | ; 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("", | ||
- | </ | ||
- | |||
- | |||
- | ==== delsub.ins ==== | ||
- | |||
- | <code winst> | ||
- | ; | ||
- | ; | ||
- | ;delsub.ins | ||
- | ; | ||
- | ; | ||
- | |||
- | ; Message at install time: | ||
- | Message " | ||
- | |||
- | ; kill a running firefox | ||
- | killtask " | ||
- | |||
- | ; if firefox uninstall program exists then start it | ||
- | |||
- | if FileExists("" | ||
- | set $UninstallCommand$ = "" | ||
- | set $UninstallCommand$ = '"' | ||
- | WinBatch_start_FirefoxUninstall / | ||
- | 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_FirefoxUninstall] | ||
- | $UninstallCommand$ | ||
- | ; | ||
- | |||
- | [Files_copy_deinstall] | ||
- | delete -sf " | ||
- | | ||
- | [Registry_delete_current_version] | ||
- | OpenKey [HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Firefox] | ||
- | set " | ||
- | |||
- | [sub_check_exitcode] | ||
- | comment "test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||