Seite 1 von 1

firefox installation

Verfasst: 29 Jun 2010, 12:32
von basti19852
hallo,
ich will firefox 3.6.4 installieren ... (vorgänger leifen auch ohne probleme)

install.ins

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.
[Initial]
LogLevel=6
;  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$

Set $TEMP$ = EnvVar("TEMP")
Set $PRODUCTPATH$="c:\s_tools\Mozilla Firefox"
set $InstallDir$=$PRODUCTPATH$
set $NewExe$= $PRODUCTPATH$+"\firefox.exe"
set $ProductId$ = "firefox"
set $OS$ = GetNTVersion

if not(HasMinimumSpace ("%SYSTEMDRIVE%", "100 MB"))
	LogError "Nicht gengend Platz auf C: . 100 MB auf C: fuer Firefox erforderlich."
	isFatalError
	comment "Bearbeitung beenden und Produktschalter auf failed setzen"
else
	comment "show product picture"
	ShowBitmap /3 "%scriptpath%\firefox.png" "Firefox"

	comment "what is the name of the Application Data Dir ?"
	set $AppData$ = "\Anwendungsdaten"
	DefVar $InterestingFile$
	set $InterestingFile$ = "%system%\kernel32.dll"
	DefStringList $FileInfo$
	set $FileInfo$ = getFileInfoMap($InterestingFile$)
	set $language$ = getValue("language name 0", $FileInfo$ )

	if $language$ = "Deutsch (Deutschland)"
		set $AppData$ = "\Anwendungsdaten"
	else
		if $language$ = "English (United States)"
			set $AppData$ = "\Application Data"
		else
			comment "Name of Application Data Dir here not defined for "+$language$
		endif
	endif

	if GetNTVersion = "Windows Vista"
		set $AppData$ = "\AppData\Roaming"
	endif

	set $MozVersion$ = GetRegistryStringValue ("[HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Firefox] CurrentVersion")
	set $MozInstallPathRegKey$ = "[HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Firefox\"+$MozVersion$+"\Main]"
	set $MozInstallDir$ = GetRegistryStringValue ($MozInstallPathRegKey$+" Install Directory")

	if FileExists("%ScriptPath%\delsub.ins")
		comment "start uninstall"
		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"

	DefVar $FIREFOXVER$
 
	if (IniVar ("firefox3-version") = "3.0.x")
		set $FIREFOXVER$ = "Firefox Setup 3.0.19.exe"
		set $SilentSwitch$ = "/S"
	else 
		if (IniVar ("firefox3-version") = "3.5.x")
			set $FIREFOXVER$ = "Firefox Setup 3.5.9.exe"
			set $SilentSwitch$ = "-ms"
		else
	
			if (IniVar ("firefox3-version") = "3.6.x")
				set $FIREFOXVER$ = "Firefox Setup 3.6.6.exe"
				set $SilentSwitch$ = "-ms"
				comment "Hier ist der firefox ..."
			else
				logError "Unhandled firefox version: " + IniVar("firefox3-version")
				isFatalError
      			endif
		endif
	endif

	comment "Hier ist der check vorbei ... files copy local"

	Files_copy_local
	Winbatch_firefox
	sub_check_exitcode

;	set $MozVersion$ = GetRegistryStringValue ("[HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Firefox] CurrentVersion")
;	comment "if failed - try again"
;	if ($MozVersion$="")
;		Winbatch_firefox
;	endif
;	set $MozVersion$ = GetRegistryStringValue ("[HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Firefox] CurrentVersion")

	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

	comment "now we do the customizing"
	comment "should we patch user.js or prefs.js ?"
	set $PREF_FILE$ = IniVar("pref_file")
	set $PREF_FILE$ = $PREF_FILE$+".js"

	if (IniVar("NoAutoUpdate") = "on") or ((IniVar("SetProxy") = "off") or not(IniVar("SetProxy") = ""))
		comment "there is something to customize"
		comment "now we patch the default profiles"
		if (IniVar("NoAutoUpdate") = "on")
			PatchTextFile_profile_noautoupdate $PRODUCTPATH$+"\defaults\profile\"+$PREF_FILE$
		endif
		if not(((IniVar("SetProxy") = "off") or (IniVar("SetProxy") = "")))
			set $NOPROXY_HOSTS$ = IniVar("noproxy_hosts")
			if (IniVar("SetProxy") = "direct")
				PatchTextFile_profile_proxy_direct $PRODUCTPATH$+"\defaults\profile\"+$PREF_FILE$
			endif
			if (IniVar("SetProxy") = "manual")
				set $PROXY_HOSTNAME_OR_IP$ = IniVar("Proxysetting")
				set $PROXY_PORT$           = takeString(1,splitString($PROXY_HOSTNAME_OR_IP$,":"))
				set $PROXY_HOSTNAME_OR_IP$ = takeString(0,splitString($PROXY_HOSTNAME_OR_IP$,":"))
				PatchTextFile_profile_proxy_manual $PRODUCTPATH$+"\defaults\profile\"+$PREF_FILE$
			endif
			if (IniVar("SetProxy") = "file")
				set $PROXY_HOSTNAME_OR_IP$ = IniVar("Proxysetting")
				PatchTextFile_profile_proxy_file $PRODUCTPATH$+"\defaults\profile\"+$PREF_FILE$
			endif
			if (IniVar("SetProxy") = "automatic")
				PatchTextFile_profile_proxy_automatic $PRODUCTPATH$+"\defaults\profile\"+$PREF_FILE$
			endif
		endif
		comment "now we patch the existing user profiles"
		comment "get user directories via dosbatch dir command"
		Set $profiles$ = getOutStreamFromSection ('dosbatch_profiledir')
		comment "loop over the result"
		for $x$ in $profiles$ do sub_patch_prefs_file
	else
		comment "there is nothing to customize"
	endif

	comment "custom specific stuff"
	if FileExists("%ScriptPath%\custom_ins_dir\custom.ins")
		sub "%ScriptPath%\custom_ins_dir\custom.ins"
	endif
endif

[Files_copy_local]
copy -x "%SCRIPTPATH%\$FIREFOXVER$" c:\tmp
copy -x "%SCRIPTPATH%\auto_$FIREFOXVER$" c:\tmp

[Files_del]
delete -f "c:\tmp\$FIREFOXVER$"

[Winbatch_firefox]
; see http://wiki.mozilla.org/Installer:Command_Line_Arguments
;"c:\tmp\$FIREFOXVER$" $SilentSwitch$
"c:\tmp\auto_$FIREFOXVER$"

[dosbatch_profiledir]
@echo off
dir "%ProfileDir%" /b

[sub_patch_prefs_file]
Set $akt_profile_ini$ = "%ProfileDir%\"+"$x$"+$AppData$+"\Mozilla\Firefox\profiles.ini"
if FileExists($akt_profile_ini$)
	Set $rel_prefs_path$ = GetIni ($akt_profile_ini$ [Profile0] Path)
	Set $akt_prefs_path$ = "%ProfileDir%\"+"$x$"+$AppData$+"\Mozilla\Firefox\"+$rel_prefs_path$
	if FileExists($akt_prefs_path$+"\"+$PREF_FILE$)
		if (IniVar("NoAutoUpdate") = "on")
			PatchTextFile_profile_noautoupdate $akt_prefs_path$+"\"+$PREF_FILE$
		endif
		if not(((IniVar("SetProxy") = "off") or (IniVar("SetProxy") = "")))
			if (IniVar("SetProxy") = "direct")
				PatchTextFile_profile_proxy_direct $akt_prefs_path$+"\"+$PREF_FILE$
			endif
			if (IniVar("SetProxy") = "manual")
				set $PROXY_HOSTNAME_OR_IP$ = IniVar("Proxysetting")
				set $PROXY_PORT$           = takeString(1,splitString($PROXY_HOSTNAME_OR_IP$,":"))
				set $PROXY_HOSTNAME_OR_IP$ = takeString(0,splitString($PROXY_HOSTNAME_OR_IP$,":"))
				PatchTextFile_profile_proxy_manual $akt_prefs_path$+"\"+$PREF_FILE$
			endif
			if (IniVar("SetProxy") = "file")
				set $PROXY_HOSTNAME_OR_IP$ = IniVar("Proxysetting")
				PatchTextFile_profile_proxy_file $akt_prefs_path$+"\"+$PREF_FILE$
			endif
			if (IniVar("SetProxy") = "automatic")
				PatchTextFile_profile_proxy_automatic $akt_prefs_path$+"\"+$PREF_FILE$
			endif
		endif
	endif
endif

[PatchTextFile_profile_noautoupdate]
Set_Netscape_User_Pref ("app.update.enabled", false)

[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_direct]
Set_Netscape_User_Pref ("network.proxy.type", 0)

[PatchTextFile_profile_proxy_automatic]
Set_Netscape_User_Pref ("network.proxy.type", 4)

[PatchTextFile_profile_proxy_manual]
Set_Netscape_User_Pref ("network.proxy.type", 1)
Set_Netscape_User_Pref ("network.proxy.backup.ftp", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.backup.ftp_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.backup.gopher", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.backup.gopher_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.backup.socks", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.backup.socks_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.backup.ssl", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.backup.ssl_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.ftp", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.ftp_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.gopher", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.gopher_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.socks", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.socks_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.http", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.http_port", $PROXY_PORT$)
Set_Netscape_User_Pref ("network.proxy.no_proxies_on", "$NOPROXY_HOSTS$")
Set_Netscape_User_Pref ("network.proxy.share_proxy_settings", true)
Set_Netscape_User_Pref ("network.proxy.ssl", "$PROXY_HOSTNAME_OR_IP$")
Set_Netscape_User_Pref ("network.proxy.ssl_port", $PROXY_PORT$)

[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
firefox3.6.6.control

Code: Alles auswählen

[Package]
version: 1
depends:
incremental: False

[Product]
type: localboot
id: firefox3.6.6
name: firefox3.6.6
description: webbrowser
advice: 
version: 1.0
priority: 0
licenseRequired: False
productClasses: 
setupScript: firefox.ins
uninstallScript: delfirefox.ins
updateScript: 
alwaysScript: 
onceScript:

[ProductProperty]
name: firefox3-Version
description: Firefox 3.6.x als Standard einspielen
values: 3.6.x
default: 3.6.x

[ProductProperty]
name: pref_file
description:  properties in user.js or prefs.js
values: prefs,user
default: prefs

[ProductProperty]
name: NoAutoUpdate
description: versucht automatisches Update auszuschalten
values: on, off
default: on

[ProductProperty]
name: SetProxy
description: versucht Proxy zu setzen: off=do_tothing, direct=set no proxy, manual=set proxy, file=set by file, automatic= try to detect
values: off,direct,manual,file, automatic
default: off

[ProductProperty]
name: Proxysetting
description: manual: (Proxy ip-name:port oder ip-number:port), file: path to proxyconf.pac
default:

[ProductProperty]
name: noproxy_hosts
description: comma seperated l
instlog.err

Code: Alles auswählen

29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getDepotId%22,%22params%22:%5B%22nx4-wks-1024.kes.lan%22%5D%7D
29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getProductInstallationStatus%5FlistOfHashes%22,%22params%22:%5B%22nx4-wks-1024.kes.lan%22%5D%7D
29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getPossibleMethods%5FlistOfHashes%22,%22params%22:%5B%5D%7D
29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getProductActionRequests%5FlistOfHashes%22,%22params%22:%5B%22nx4-wks-1024.kes.lan%22%5D%7D
29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getInstallableLocalBootProductIds%5Flist%22,%22params%22:%5B%22nx4-wks-1024.kes.lan%22%5D%7D
Computername:nx4-wks-1024.kes.lan
Computername according to Environment Variable :NX4-WKS-1024
opsi service URL https://192.168.30.145:4447
Config path: P:\install
Utils path:  P:\utils
Depot path:  P:\install

    bootmode BKSTD
    winst: Start sorting of products (29.06.2010 12:21:49)
    29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getProductDependencies%5FlistOfHashes%22,%22params%22:%5B%5D%7D
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Resolved sequence of products (29.06.2010 12:21:49): 
    Product 8 	firefox3.6.6 : setup
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getProductProperties%5Fhash%22,%22params%22:%5B%22firefox3.6.6%22,%22nx4-wks-1024.kes.lan%22%5D%7D
    29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22getProduct%5Fhash%22,%22params%22:%5B%22firefox3.6.6%22,%22nx4-wks-1026.kes.lan%22%5D%7D
    scriptname: "firefox.ins", special path: "P:\install\firefox3.6.6\"
    29.06.2010 12:21:49 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22setProductInstallationStatus%22,%22params%22:%5B%22firefox3.6.6%22,%22nx4-wks-1024.kes.lan%22,%22installing%22%5D%7D
    
    ============ Version 4.8.8.1 WIN32 script "P:\install\firefox3.6.6\firefox.ins"
                 start: 2010-06-29  12:21:49  (on client named as : "nx4-wks-1024.kes.lan")
    [executing: "c:\Programme\opsi.org\preloginloader\opsi-winst\winst32.exe"]
    system infos:
    00:19:99:79:4B:7F  -  PC hardware address
    Nx4-wks-1024  -  IP name 
    192.168.30.144  -  IP address
    DEU  -  System default locale 
    
        Error: Unhandled firefox version: 
Process stopped
___________________
1 error
0 warnings


no script found for file name ""
29.06.2010 12:21:50 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22setProductInstallationStatus%22,%22params%22:%5B%22firefox3.6.6%22,%22nx4-wks-1024.kes.lan%22,%22failed%22%5D%7D
29.06.2010 12:21:50 JSON service request https://192.168.30.145:4447/rpc?%7B%22id%22:1,%22method%22:%22setProductActionRequest%22,%22params%22:%5B%22firefox3.6.6%22,%22nx4-wks-1024.kes.lan%22,%22none%22%5D%7D
============  winst Version 4.8.8.1 WIN32 is regularly exiting. Time 2010-06-29  12:21:52 .

Re: firefox installation

Verfasst: 01 Jul 2010, 11:48
von d.oertel
Hi,

ohne instlog.txt schwer zu sagen.
Wirklich 3.6.4 ?

Wir empfehlen unser abo:
http://uib.de/www/opsi/service_support/ ... bonnements

gruss
d.oertel

Re: firefox installation

Verfasst: 06 Jul 2010, 10:43
von basti19852
ja das war der richtige stichpunkt
instlog.txt

Code: Alles auswählen

....
 Message at install time:
  kill a running firefox
  Nothing to stop, no instances of "firefox.exe" found
  check for depotshare
  
  If
      Starting query if file exist ...
    FileExists("P:\install\firefox3.6.6")   <<< result true
    not (FileExists("P:\install\firefox3.6.6"))   <<< result false
  Then
  EndIf
  start setup program
  
  If
    IniVar ("firefox3-version") = "3.0.x"   <<< result false
    (IniVar ("firefox3-version") = "3.0.x")   <<< result false
  Then
  
  Else
    
    If
      IniVar ("firefox3-version") = "3.5.x"   <<< result false
      (IniVar ("firefox3-version") = "3.5.x")   <<< result false
    Then
    
    Else
      
      If
        IniVar ("firefox3-version") = "3.6.x"   <<< result false
        (IniVar ("firefox3-version") = "3.6.x")   <<< result false
      Then
      
      Else
        Error: Unhandled firefox version: 
        Error level set to fatal
      EndIf
    EndIf
  EndIf
...
hab das in der firefox.ins jetzt so gelösst:

Code: Alles auswählen

DefVar $FIREFOXVER$
set $FIREFOXVER$ = "Firefox Setup 3.6.6.exe"
ohne das ganze if else