ich habe den Firefox automatisiert bekommen, jedoch erstellt er automatisch einen zweiten Profilordner <kryptische-Zeichenfolge>-default-esr. Jedoch brauche ich das default Profil, damit die policies.json auch übernommen wird unter (C:\ProgramFiles\Mozilla Firefox\distribution\policies.json). Jemand eine Ahnung, ob das ich zusätzliche Erstellen eines Profilordner unterbinden kann? Ich nutze hierfür das msi Paket für den Firefox Browser in der ESR Version.
https://imgur.com/a/6XhVouM
Code: Alles auswählen
[Initial]
SetLogLevel=7
; 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 $ExitCode$
DefVar $FIREFOXVER$
DefVar $LogDir$
; ----------------------------------------------------------------------
Set $TEMP$ = EnvVar("TEMP")
Set $PRODUCTPATH$="%ProgramFiles64Dir%\Mozilla Firefox"
Set $MozInstallDir$ = $PRODUCTPATH$
set $InstallDir$=$PRODUCTPATH$
set $NewExe$= $PRODUCTPATH$+"\"
set $ProductId$ = "firefox-browser"
set $OS$ = GetNTVersion
set $FIREFOXVER$ = "Firefox Setup 68.1.0esr.msi"
Set $LogDir$ = "%opsiLogDir%"
; ----------------------------------------------------------------------
; 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-browser.png" $ProductId$
if FileExists("%ScriptPath%\delsub.opsiscript")
comment "start delsub.opsiscript"
sub "%ScriptPath%\delsub.opsiscript"
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
Files_copy_profile
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
[Files_copy_profile]
copy -s "%scriptpath%\policies.json" "$InstallDir$\distribution\."
[Files_del]
delete -f "c:\tmp\$FIREFOXVER$"
[Winbatch_firefox]
; see http://wiki.mozilla.org/Installer:Command_Line_Arguments
msiexec /i "%ScriptPath%\Firefox Setup 68.1.0esr.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /q /norestart
;Sub "%ScriptPath%\policies.opsiscript"
[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
[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