Ich versuche Firefox zu installieren. Klappt auch soweit, doch sobald das Setup via Opsi-Winst startet, wird ein Installtionsdialog geöffnet, der u.a. erfordert, dass man angibt ob man Firefox als Standardbrowser einrichten möchte. Ich möchte allerdings, dass das Ganze vollkommen ohne Interaktion stattfinden kann. Ich hab das Skript gemäß der Konfiguration der WIKI genommen.
Jemand eine Idee?
Code: Alles auswählen
[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("TEMP")
Set $PRODUCTPATH$="%ProgramFilesDir%\Mozilla Firefox"
Set $MozInstallDir$ = $PRODUCTPATH$
set $InstallDir$=$PRODUCTPATH$
set $NewExe$= $PRODUCTPATH$+"\"
set $ProductId$ = "firefox"
set $OS$ = GetNTVersion
set $FIREFOXVER$ = "Firefox Setup 8.0.exe"
set $SilentSwitch$ = "-ms"
; ----------------------------------------------------------------------
; Haben wir genug Speicherplatz?
if not(HasMinimumSpace ("%SYSTEMDRIVE%", "30 MB"))
LogError "Nicht gengend Platz auf C: . 30 MB auf C: fuer Firefox erforderlich."
isFatalError
comment "Bearbeitung beenden und Produktschalter auf failed setzen"
else
comment "show product picture"
ShowBitmap /3 "%scriptpath%\firefox.bmp" "Firefox"
if FileExists("%ScriptPath%\delsub.ins")
comment "start delsub.ins"
sub "%ScriptPath%\delsub.ins"
endif
comment "Message at install time:"
Message "Installing Firefox..."
comment "kill a running firefox"
killtask "firefox.exe"
comment "check for depotshare"
if not (FileExists("%SCRIPTPATH%"))
DosInAnIcon_TryToReconnect
endif
comment "start setup program"
Files_copy_local
Winbatch_firefox
sub_check_exitcode
comment "kill a running firefox"
killtask "firefox.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%\$FIREFOXVER$" c:\tmp
copy -s "%scriptpath%\firefox-profile\*" "$InstallDir$\defaults\profile\."
[Files_del]
delete -f "c:\tmp\$FIREFOXVER$"
[Winbatch_firefox]
; see http://wiki.mozilla.org/Installer:Command_Line_Arguments
"c:\tmp\$FIREFOXVER$" $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