Firefox hängt bei einer Komplett-Installation

IvicaE
Beiträge: 136
Registriert: 13 Sep 2016, 14:10

Firefox hängt bei einer Komplett-Installation

Beitrag von IvicaE »

Hallo Leute,

ich habe mittlerweile nahezu alle wichtigen Programme in OPSI 'paketiert' und kann diese einzeln auch schön 'remote installieren'.
Ich habe aber nun ein Phänomen bei dem ich nicht weiterkomme:

Wenn ich einen PC mit Windows 10 installieren lasse und gleichzeitig die ganze Liste an Programmen mit installieren lasse (also in einem 'Zug'), dann bleibt der OPSI-Agent immer genau an der Stelle hängen wenn er Firefox installiert.
Wenn ich das Ganze aber ohne FF installiere (also Win 10 Pro x64, Office, und die restlichen ~20 Programme) geht die Installation problemlos durch.

Wenn der Installationsvorgang des FF hängen bleibt, steht im OPSI-Client-Fenster die Meldung:
"Winbatch_uninstall_maintenance finished"
und so bleibt er für immer und ewig.

FF installiert sich auch als absolut erstes der Programme wie ich das beobachten konnte. Aber FF hat ja sonst keine Abhängigkeiten und sollte installiert werden können auf ein 'nachtes Betriebssystem'.

FF ist übrigens in der Version 48.0 in der 'normal-Edition' (also keine ESR-Version).

So, hat jemand ähnliche Erfahrungen? Noch besser: hat jemand ähnliche Erfahrungen gehabt und konnte dies lösen? Wäre super nett wenn ich noch das letzte Problem lösen könnte und dann in die Fläche gehen könnte mit dem OPSI-Server.

Ich bedanke mich schon ein mal im Voraus für eure Hilfe.
IvicaE
Beiträge: 136
Registriert: 13 Sep 2016, 14:10

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von IvicaE »

Ich könnte mir auch eine Notlösung vorstellen wie z.B. ein Abbrechen bzw. weitermachen nach 1 Minute nachdem diese Stelle (Winbatch_uninstall_maintenance finished) erreicht worden ist.
Aber ich würde liebend gerne wissen wollen warum er an dieser Stelle hängt.
Bei der Alternative würde ich gerne wissen ob es so etwas wie 'ResumeNext' nach einer gewissen Zeitspanne gibt?
andré
Beiträge: 324
Registriert: 07 Jan 2014, 10:48

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von andré »

Was genau macht die Winbatch_uninstall_maintenance denn? Ich vermute mal, den Firefox-Update Dienst killen? Funktioniert das, was Opsi da macht, auf manuelle Art und Weise im Terminal?
IvicaE
Beiträge: 136
Registriert: 13 Sep 2016, 14:10

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von IvicaE »

@andre

Es funktioniert sogar wenn OPSI das selber macht. Nur eben in der Konstellation wie oben Beschrieben nicht.
Wenn ich einen neuen Client anlege, ihm ein OS und sämtliche benötigte Softwarepakete zuweise und diese Installieren lasse, so bleibt der FF an dieser Stelle hängen und nichts geht natürlich mehr.

Wenn ich einem bereits bestehenden Client (unabhängig davon ob bereits eine FF-Version drauf ist oder gar keine) FF zum installieren zuweise, funktioniert die Installation komischerweise tadellos?
andré
Beiträge: 324
Registriert: 07 Jan 2014, 10:48

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von andré »

andré hat geschrieben:Was genau macht die Winbatch_uninstall_maintenance denn?
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von SirTux »

btw. würde ich den Firefox 48 mal schön wegschmeißen und auf 52 (ESR) oder 53 (normal) wechseln.
IvicaE
Beiträge: 136
Registriert: 13 Sep 2016, 14:10

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von IvicaE »

@andré
andré hat geschrieben:
Was genau macht die Winbatch_uninstall_maintenance denn?
Hier alle Variablen die ich deklariere:

Code: Alles auswählen

DefVar $NoAutoUpdate$
DefVar $DefaultBrowser$
DefVar $ProfileImport$

DefVar $SilentSwitch$
DefVar $MozillaMaintenanceUninstallExe$
DefVar $preftype$
DefVar $PRODUCTPATH$

DefVar $PREF_LOCAL_SETTINGS$
DefVar $PREF_MOZILLA_CFG$
DefVar $PREF_MOZILLA_CFG_SRC_PATH$
DefVar $PREF_MOZILLA_CFG_DEST_PATH$
Im Initialisierungsbereich (am Anfang des ausgeführten Script):

Code: Alles auswählen

set $MozillaMaintenanceUninstallExe$ = "%ProgramFiles32Dir%\Mozilla Maintenance Service\uninstall.exe"
Im Ausführungsteil selber:

Code: Alles auswählen

	comment "Enable/Disable autoupdate"
	if $NoAutoUpdate$ = "True"
		Registry_disable_au /32Bit
		if FileExists($MozillaMaintenanceUninstallExe$)
			Winbatch_uninstall_maintenance
		endif
		PatchTextFile_disable_au $PREF_MOZILLA_CFG_DEST_PATH$
	endif
In der Funktion dann:

Code: Alles auswählen

[Winbatch_uninstall_maintenance]
"$MozillaMaintenanceUninstallExe$" /S
Im Ausführungsteil werden die o.g. Parameter durch ein Property gleich am Anfang des Scriptes festgelegt:

Code: Alles auswählen

set $NoAutoUpdate$ = getProductProperty("NoAutoUpdate", "True")
Die restlichen Funktionen die mit ausgeführt werden im Bereich des 'auto-update-disable':

Code: Alles auswählen

[Registry_disable_au]
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService]
set "attempted" = REG_DWORD:0001
set "installed" = REG_DWORD:0001
DeleteVar "FFPrefetchDisabled"
und

Code: Alles auswählen

[PatchTextFile_disable_au]
Set_Mozilla_Pref ("lockPref","app.update.enabled", false)
Set_Mozilla_Pref ("lockPref","app.update.auto", false)
Set_Mozilla_Pref ("lockPref","app.update.service.enabled", false)
Im Initialisierungsbereich werden auch die anderen Variablen initialisiert:

Code: Alles auswählen

Set $PRODUCTPATH$=$InstallDir$
Set $PREF_LOCAL_SETTINGS$ = "local-settings.js"
Set $PREF_MOZILLA_CFG$ = "mozilla.cfg"
Set $PREF_MOZILLA_CFG_SRC_PATH$ = "%ScriptPath%\"
Set $PREF_MOZILLA_CFG_SRC_PATH$ = $PREF_MOZILLA_CFG_SRC_PATH$ + $PREF_MOZILLA_CFG$
Set $PREF_MOZILLA_CFG_DEST_PATH$ = $PRODUCTPATH$+"\"+$PREF_MOZILLA_CFG$






Hier nochmal das ganze Script mit allem was auch nicht mit dem o.g. Problem zu tun hat:

Code: Alles auswählen

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/

[Actions]
requiredWinstVersion >= "4.11.4.6"
ScriptErrorMessages=off

DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$

DefVar $NoAutoUpdate$
DefVar $DefaultBrowser$
DefVar $ProfileImport$

DefVar $SilentSwitch$
DefVar $MozillaMaintenanceUninstallExe$
DefVar $preftype$
DefVar $PRODUCTPATH$

DefVar $PREF_LOCAL_SETTINGS$
DefVar $PREF_MOZILLA_CFG$
DefVar $PREF_MOZILLA_CFG_SRC_PATH$
DefVar $PREF_MOZILLA_CFG_DEST_PATH$

Set $LogDir$ = "%opsiLogDir%"

; ----------------------------------------------------------------
; - 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$       = "Firefox"
Set $MinimumSpace$    = "100 MB"
; the path were we find the product after the installation
Set $InstallDir$      = "%ProgramFiles32Dir%\Mozilla Firefox"
Set $SilentSwitch$ 		  = "-ms"
set $MozillaMaintenanceUninstallExe$ = "%ProgramFiles32Dir%\Mozilla Maintenance Service\uninstall.exe"
; ----------------------------------------------------------------

Set $preftype$ = "pref"
Set $PRODUCTPATH$=$InstallDir$
Set $PREF_LOCAL_SETTINGS$ = "local-settings.js"
Set $PREF_MOZILLA_CFG$ = "mozilla.cfg"
Set $PREF_MOZILLA_CFG_SRC_PATH$ = "%ScriptPath%\"
Set $PREF_MOZILLA_CFG_SRC_PATH$ = $PREF_MOZILLA_CFG_SRC_PATH$ + $PREF_MOZILLA_CFG$
Set $PREF_MOZILLA_CFG_DEST_PATH$ = $PRODUCTPATH$+"\"+$PREF_MOZILLA_CFG$

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError "No Space"
	; Stop process and set installation status to failed
else
	comment "Show product picture"
	ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
	
	comment "get property value ....."
	set $NoAutoUpdate$ = getProductProperty("NoAutoUpdate", "True")
	if $NoAutoUpdate$ = "True"
		comment "NoAutoUpdate value is True"
	else
		if $NoAutoUpdate$ = "False"
			comment "NoAutoUpdate value is False"
		else
			comment "NoAutoUpdate value must be may_be"
		endif
	endif
	
	set $DefaultBrowser$ = getProductProperty("DefaultBrowser", "True")
	if $DefaultBrowser$ = "True"
		comment "DefaultBrowser value is True"
	else
		if $DefaultBrowser$ = "False"
			comment "DefaultBrowser value is False"
		else
			comment "DefaultBrowser value must be may_be"
		endif
	endif
	
	set $ProfileImport$ = getProductProperty("ProfileImport", "False")
	if $ProfileImport$ = "True"
		comment "ProfileImport value is True"
	else
		if $ProfileImport$ = "False"
			comment "ProfileImport value is False"
		else
			comment "ProfileImport value must be may_be"
		endif
	endif
	
	if FileExists("%ScriptPath%\delsub32.opsiscript")
		killtask "firefox.exe"
		killtask "plugin-container.exe"
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub32.opsiscript"
	endif
	
	Message "Installing " + $ProductId$ + " ..."
	
	comment "Start setup program"
	ChangeDirectory "%SCRIPTPATH%"
	Winbatch_install
	
	comment "Create mozilla.cfg"
	if FileExists($PREF_MOZILLA_CFG_SRC_PATH$)
		if FileExists($PREF_MOZILLA_CFG_DEST_PATH$)
			comment "$PREF_MOZILLA_CFG$ exists already. Will not create a new one!"
		else
			comment "Copy $PREF_MOZILLA_CFG$ to %Programfiles32Dir%\Mozilla Firefox"
			Files_mozilla_cfg
		endif
		PatchTextFile_set_pref $PRODUCTPATH$+"\browser\defaults\pref\"+$PREF_LOCAL_SETTINGS$
		PatchTextFile_set_pref $PRODUCTPATH$+"\defaults\pref\"+$PREF_LOCAL_SETTINGS$
		
		comment "Set some sandard-values (privacy, telemetry-data, etc...)
		PatchTextFile_set_privacy $PREF_MOZILLA_CFG_DEST_PATH$
	endif
	
	comment "Enable/Disable autoupdate"
	if $NoAutoUpdate$ = "True"
		Registry_disable_au /32Bit
		if FileExists($MozillaMaintenanceUninstallExe$)
			Winbatch_uninstall_maintenance
		endif
		PatchTextFile_disable_au $PREF_MOZILLA_CFG_DEST_PATH$
	endif
	
	comment "set/unset default browser"
	if $DefaultBrowser$ = "True"
		PatchTextFile_disable_check_default_browser  $PREF_MOZILLA_CFG_DEST_PATH$
		;Registry_set_defaultbrowser
	endif
	
	if $ProfileImport$ = "False"
		Patches_override_disable_profile_migrator $PRODUCTPATH$+"\browser\override.ini"
	endif
	
	Winbatch_setDefaultBrowser
	Sub_check_exitcode
endif

[Winbatch_install]
"%ScriptPath%\Firefox Setup.exe" $SilentSwitch$

[Winbatch_setDefaultBrowser]
"$PRODUCTPATH$\firefox.exe" -silent -setDefaultBrowser

[Winbatch_uninstall_maintenance]
"$MozillaMaintenanceUninstallExe$" /S

[Registry_disable_au]
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService]
set "attempted" = REG_DWORD:0001
set "installed" = REG_DWORD:0001
DeleteVar "FFPrefetchDisabled"

[PatchTextFile_set_pref]
Set_Mozilla_Pref ("$preftype$", "general.config.obscure_value", 0)
Set_Mozilla_Pref ("$preftype$", "general.config.filename", "mozilla.cfg")

[Files_mozilla_cfg]
copy "$PREF_MOZILLA_CFG_SRC_PATH$" "$PRODUCTPATH$"

[PatchTextFile_disable_au]
Set_Mozilla_Pref ("lockPref","app.update.enabled", false)
Set_Mozilla_Pref ("lockPref","app.update.auto", false)
Set_Mozilla_Pref ("lockPref","app.update.service.enabled", false)

[PatchTextFile_disable_check_default_browser]
Set_Mozilla_Pref ("lockPref","browser.shell.checkDefaultBrowser", false)

[PatchTextFile_set_privacy]
Set_Mozilla_Pref ("lockPref","toolkit.telemetry.enabled", false)
Set_Mozilla_Pref ("lockPref","toolkit.telemetry.prompted", 2)
Set_Mozilla_Pref ("lockPref","toolkit.telemetry.rejected", true) 

[Patches_override_disable_profile_migrator]
add [XRE] EnableProfileMigrator=false

[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
IvicaE
Beiträge: 136
Registriert: 13 Sep 2016, 14:10

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von IvicaE »

@SirTux

Das hat zwar nichts mit o.g. Problem zu tun, denn ob ich die Version 48, 51 oder 53 installieren möchte sollte egal sein weil bei allen Installationen das gleiche Problem auftritt.
Aber ich habe nun die neuste Version reingepackt und das Problem ist das Selbe.
andré
Beiträge: 324
Registriert: 07 Jan 2014, 10:48

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von andré »

Okay, sollte ich diese Woche die Zeit finden, stelle ich das mal hier bei mir nach.
IvicaE
Beiträge: 136
Registriert: 13 Sep 2016, 14:10

Re: Firefox hängt bei einer Komplett-Installation

Beitrag von IvicaE »

@andré

Das wäre sehr nett von dir.
Ich bedanke mich schon einmal im Voraus für deine Mühe!
Antworten