JAVA Jai (Advanced Imaging) 1.1.3

Antworten
zylex
Beiträge: 75
Registriert: 23 Jan 2013, 08:55

JAVA Jai (Advanced Imaging) 1.1.3

Beitrag von zylex »

Hallo Forum.

Evtl. könnt Ihr mir helfen dafür ein Paket zu erstellen.

Lieder liefert mir sowohl die entpackte .msi als auch die .exe jeweils einen Exitcode Error und das Programm wird nicht installiert.

Die .exe scheint einen Silent-Switch zu haben (/S), aber der Exitcode lautet dann -3
Die .msi bringt mir den Exitcode 1619 (mit /qn, ohne /qn bleibt das Script stehen und beendet sich nicht).

In beiden Fällen wird das Programm nicht installiert.
Laut Oracle könne man eine .jar zur automatischen Verteilung benutzen, wobei dieser aber die manifest-Datei zu fehlen scheint.

Zu finden sind die Dateien unter folgendem Link:
http://download.java.net/media/jai/buil ... ase/1_1_3/

Ich habe diese 3 Versionen versucht:
jai-1_1_3-lib-windows-i586-jre.exe
jai-1_1_3-lib-windows-i586.exe
jai-1_1_3-lib-windows-i586.jar.zip

Unter diesem Link findet man auch die Beschreibung der Verteilung mittels der .jar Datei, was aber wie gesagt leider auch nicht funktioniert:
http://download.java.net/media/jai/buil ... utoInstall

Irgendwelche Ideen wie ich das silent über ein Opsi-Script installiert bekomme?

Danke!
Benutzeravatar
opsi.simi
Beiträge: 44
Registriert: 30 Okt 2013, 12:01

Re: JAVA Jai (Advanced Imaging) 1.1.3

Beitrag von opsi.simi »

Hi,
ich kann dir gerne mal mein Setup.ins hier zeigen, ist aber nach dem selben Schema aufgebaut
wie im Opsi.Forum: wiki/userspace:java_runtime

Code: Alles auswählen

[Initial]
;Standard Text, der während der Installation angezeigt wird
Message = Bitte warten, das Produkt wird installiert
;Loglevel einstellen
setLogLevel = 6
;Bei Fehlern abbrechen
ExitOnError = false
;Syntax Fehler werden in einem separaten Fenster angezeigt
ScriptErrorMessages = on
;Single-Step Mode nicht verwenden
TraceMode = off
;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen
StayOnTop = false
 
[Actions]
;Variable für die Ermittlung des Betriebssystems
DefVar $OS$
set $OS$ = GetOS
 
;Variable für die Ermittlung der Betriebssystem Unterversion
DefVar $NTVersion$
set $NTVersion$ = GetNTVersion
 
;Variable zur Ermittlung der Systemarchitektur
DefVar $SystemType$
Set $SystemType$ = GetSystemType

;Name des Produkts (max. 12 Zeichen)
DefVar $ProductName$
Set $ProductName$ = "Java"

;Deinstallieren von alten Java Versionen
DefVar $uninstallstring$
 
;Vollständiger Produktname incl. Versionsnummer
 
DefVar $ProductNameFull1$
set $ProductNameFull1$ = "Java 1.7 Update 71"
 
;Dateiname des Produktbildes mit Erweiterung
DefVar $ProductPicture$
Set $ProductPicture$ = "java.png"
 
DefVar $Executable32$
DefVar $Executable64$
Set $Executable32$ = "jre-7u71-windows-i586.exe"
Set $Executable64$ = "jre-7u71-windows-x64.exe"
 
;Die Variable zur Auswertung des ExitCodes
DefVar $ExitCode$
 
;Prüfen der Winst Version
requiredWinstVersion >= "4.11"
 
;$ProductPicture$ und $ProductName$ anzeigen
ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$
 
;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens
Message "Installiere "+$ProductNameFull1$
 
;Freien Speicherplatz ermitteln
if not (HasMinimumSpace ("%SYSTEMDRIVE%", "100 MB"))
     LogError "Nicht genügend Platz auf %SYSTEMDRIVE%"
     isFatalError
endif

;OS-Version ermitteln
if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" )
    if $SystemType$ = "x86 System"
	Winbatch_Install_32-Bit
    endif
    if $SystemType$ = "64 Bit System"
	Winbatch_Install_32-Bit
	Winbatch_Install_64-Bit
    endif
else
        LogError "Kein kompatibles Betriebssystem installiert"
	isFatalError
endif
 
[Winbatch_Install_32-Bit]
"%ScriptPath%\$Executable32$" /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 JQS=0 SYSTRAY=0 EULA=0 REBOOT=Suppress
 
[Winbatch_Install_64-Bit]
"%SCRIPTPATH%\$Executable64$" /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 JQS=0 SYSTRAY=0 EULA=0 REBOOT=Suppress
zylex
Beiträge: 75
Registriert: 23 Jan 2013, 08:55

Re: JAVA Jai (Advanced Imaging) 1.1.3

Beitrag von zylex »

Hi.

Danke für deine Antwort, aber "JAVA Advanced Imaging (JAI)" ist eine eigene (Zusatz) Anwendung und hat nichts mit der "JRE" Installation zu tun. Hintergrund ist aber ein JRE-Update, die Version 8.x läuft nicht mehr mit der alten JAI-Version 1.1.1 zusammen, deshalb müssen wir JAI auch updaten (JAI wird leider von bestimmten Plottern genutzt).

Grüße
zylex
Beiträge: 75
Registriert: 23 Jan 2013, 08:55

Re: JAVA Jai (Advanced Imaging) 1.1.3

Beitrag von zylex »

Moin Forum.

Hab es selber gelöst. Falls es jemanden interessiert, hier die Scripte:

Zuerst muss man die .exe starten und sich die zwei .msi Dateien (Java_Advanced_Imaging.msi und isscript8.msi) aus dem Temp-Ordner kopieren. Die Java_Advanced_Imaging.msi mit einem msi-edit Programm bearbeiten (z.B Orca) und ein neues Transformfile erstellen. Bei diesem muss man unter "Property" den Wert "ISSETUPDRIVEN=1" hinzufügen. Danach funktioniert die Silent-Installation mit folgenden Scripten (die Deinstallation funktioniert für die Version 1.1.2 und 1.1.3).

*edit* Eine kleine Anpassung des Scripts, installiert wird nun direkt in den Pfad der aktuellen Java Installation, da sonst einige Programme nicht funktionieren. Über die Variable $JavaVersion$ kann man zwischen den Hauptversionen von Java wechseln, das Script unten bezieht sich auf 1.8.x

Benötigte Dateien:
  • Java Advanced Imaging 1.1.3 for JRE.msi
    Java Advanced Imaging 1.1.3 for JRE.mst (neu erstelltes Transformfile)
    isscript8.msi
    jai.bmp
    setup.ins
    uninstall.ins
    delsub.ins
setup.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.
; credits: http://www.opsi.org/en/credits/

[Actions]
requiredWinstVersion >= "4.11.2.6"

DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $LogDir$
DefVar $UninstallCommand112$
DefVar $UninstallCommand113$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $ISS$
DefVar $JAI$
DefVar $Transform$
DefVar $Logo$
DefVar $ExitCode$
DefVar $DisplayName$
DefVar $JavaVersion$
DefVar $JavaPath$

; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$		= "Java Advanced Imaging 1.1.3"
Set $MinimumSpace$	= "50 MB"
Set $ISS$		= "isscript8.msi"
Set $JAI$		= "jai-113-jre.msi"
Set $Transform$		= "jai-113-jre.mst"
Set $Logo$		= "jai.bmp"
Set $JavaVersion$	= "1.8"
; ----------------------------------------------------------------

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
set $JavaPath$ = GetRegistryStringValue32 ("[HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\" + $JavaVersion$ + "] JavaHome")

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Nicht genug Platz auf %SystemDrive%, " + $MinimumSpace$ + " benoetigt auf Laufwerk %SystemDrive% fuer " + $ProductId$
	isFatalError
else
	ShowBitmap "%ScriptPath%\" + $Logo$ $ProductId$
	
	if FileExists("%ScriptPath%\delsub.ins")
		Sub "%ScriptPath%\delsub.ins"
	endif

	if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
		Message "Installiere " + $ProductId$ + " - 32 Bit..."
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install_32
		Sub_check_exitcode
            if ($ExitCode$ = "0")
                   Message "Installaton von " + $ProductId$ + " - 32bit erfolgreich beendet"
                   sleepSeconds 2
            endif
	endif

	if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
		Message "Installiere " + $ProductId$ + " - 32 Bit..."
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install_32
		Sub_check_exitcode
                  if ($ExitCode$ = "0")
                      Message "Installation von " + $ProductId$ + " - 32bit erfolgreich beendet"
                      sleepSeconds 1
                  endif
	endif
endif


[Winbatch_install_32]
msiexec /i "%ScriptPath%\$ISS$" /qn
msiexec /i "%ScriptPath%\$JAI$" Transforms="%ScriptPath%\$Transform$" /qn INSTALLDIR="$JavaPath$"

[Sub_check_exitcode]
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; 
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
        Message "Installation von $ProductId$ fehlgeschlagen"
        sleepSeconds 2
	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
uninstall.ins

Code: Alles auswählen

[Initial]
SetLogLevel=9
;  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
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $LogDir$
DefVar $UninstallCommand112$
DefVar $UninstallCommand113$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $JAI$
DefVar $ExitCode$
DefVar $DisplayName$
DefVar $Logo$

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")


Set $LogDir$ = "%SystemDrive%\tmp"

; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$		= "Java Advanced Imaging 1.1.3"
Set $MinimumSpace$	= "100 MB"
Set $JAI$		= "jai-113-jre.msi"
Set $Logo$		= "jai.bmp"
; ----------------------------------------------------------------
 
ShowBitmap "%ScriptPath%\" + $Logo$ $ProductId$
 
Message "Deinstalliere " + $ProductId$ + ". Bitte warten..."
Sub "%ScriptPath%\delsub.ins"
delsub.ins

Code: Alles auswählen

;Java JAI 1.1.2
set $DisplayName$ = GetRegistryStringValue32 ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Java Advanced Imaging 1.1.2_01 For JRE] DisplayName")
if not ($DisplayName$ = "")
	Message ""+$DisplayName$+" gefunden => Deinstallation"
	set $UninstallCommand112$ = GetRegistryStringValue32 ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Java Advanced Imaging 1.1.2_01 For JRE] UninstallString")
	Winbatch_uninstall_112
	Sub_check_exitcode
            if ($ExitCode$ = "0")
                   Message "Deinstallaton von " + $DisplayName$ + " - 32bit erfolgreich beendet"
                   sleepSeconds 2
            endif
endif

;Java JAI 1.1.3
set $DisplayName$ = GetRegistryStringValue32 ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{48FB7C81-0EF5-4857-8849-DD526BAC7A36}] DisplayName")
if not ($DisplayName$ = "")
	Message ""+$DisplayName$+" gefunden => Deinstallation"
	set $UninstallCommand113$ = "MsiExec.exe /x {48FB7C81-0EF5-4857-8849-DD526BAC7A36} /qn REBOOT=ReallySuppress"
	Winbatch_uninstall_113
	Sub_check_exitcode
            if ($ExitCode$ = "0")
                   Message "Deinstallaton von " + $DisplayName$ + " - 32bit erfolgreich beendet"
                   sleepSeconds 2
            endif
endif

[Winbatch_uninstall_112]
$UninstallCommand112$ -a

[Winbatch_uninstall_113]
$UninstallCommand113$
 
[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
Antworten