Installtion wird nicht abgeschlossen

Antworten
chipo
Beiträge: 51
Registriert: 16 Jul 2012, 10:12

Installtion wird nicht abgeschlossen

Beitrag von chipo »

Hi,

ich versuche grade 3ds Max 2010 via OPSI zu installieren. Funktioniert auch soweit richtig und wird auch komplett installiert, allerdings bleibt OPSI beim Punkt "Waiting until the called process is finished" hängen obwohl der Prozess des Installationssetups schon lange beendet ist.

Hat jemand eine Idee wie ich das Problem lösen kann?

Hier mal das setupscript noch dazu:

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 $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$

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


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

; ----------------------------------------------------------------
; - 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$       = "3dsMax"
Set $MinimumSpace$    = "2250 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\Autodesk"
Set $InstallDir64$      = "%ProgramFiles64Dir%\Autodesk"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
; ----------------------------------------------------------------

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError
	; Stop process and set installation status to failed
else
	comment "Show product picture"
	ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
	
	if FileExists("%ScriptPath%\delsub3264.ins")
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub3264.ins"
	endif
	
	if $LicenseRequired$ = "true"
		comment "Licensing required, reserve license and get license key"
		Sub_get_licensekey
	endif
	
	comment "installing"

	if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
		Message "Installing " + $ProductId$ + " 32 Bit..."
		comment "Start setup program"
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install_32
		Sub_check_exitcode
		comment "Copy files"
		Files_install_32 /32Bit
		comment "Patch Registry"
		Registry_install /32Bit
		comment "Create shortcuts"
		LinkFolder_install
	endif

	if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
		Message "Installing " + $ProductId$ + " 64 Bit..."
		comment "Start setup program"
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install_64
		Sub_check_exitcode
		comment "Copy files"
		Files_install_64 /64Bit
		comment "Patch Registry"
		Registry_install /64Bit
		comment "Create shortcuts"
		LinkFolder_install
	endif
	
endif

[Winbatch_install_32]
"%ScriptPath%\x86\AdminImage\setup.exe" /qb /I %ScriptPath%\x86\AdminImage\3ds Max 2010.ini


[Files_install_32]


[Winbatch_install_64]
"%ScriptPath%\x64\AdminImage\setup.exe" /qb /I %ScriptPath%\x64\AdminImage\3ds Max 2010 x64.ini


[Files_install_64]


[Registry_install]


[LinkFolder_install]


[Sub_get_licensekey]

[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

Benutzeravatar
tobias
Beiträge: 1294
Registriert: 20 Aug 2008, 12:36
Wohnort: Braunschweig
Kontaktdaten:

Re: Installtion wird nicht abgeschlossen

Beitrag von tobias »

siehst du den installationsprozess im taksmanager?
Der WINST wartet ja bis der aufgerufene Prozess wieder beendet wurde also würde das ja bedeuten das der installer da eine Prozessleiche hinterlassen würde :?
Könnte natürlich sein das Setup nen unterprozess startet von dem der WINST dann nix weis...

Du könntest natürlich auch das warten abschalten mit /letThemGo beim sektionsaufruf, allerdings wartet WINST dann halt nicht mehr und die scriptabarbeitung ist noch vor der installation beendet.
Das könnte man wiederum z.B. damit abfangen: wiki/userspace:find_killtask

aber ich denke das ziel sollte eher sein warum eine Prozessleiche(?) zurückbleibt :)
chipo
Beiträge: 51
Registriert: 16 Jul 2012, 10:12

Re: Installtion wird nicht abgeschlossen

Beitrag von chipo »

Das ist ja das seltsame. Es bleibt keine Prozessleiche zurück. Die setup.exe installiert mehrere msi Pakete und beendet sich dann. Für etwa eine Minute bleibt ein msiprozess noch bestehen während der setup.exe Prozess bereits weg ist und beendet sich dann auch. Hab es extra auf einem Rechner installiert auf dem sonst rein garnichts anderes installiert ist um zu sehen ob ein Prozess übrig bleibt. Das ist aber nicht der Fall. Kommt mir so vor als hätte opsi ein Problem damit das der inizialprozess (setup.exe) früher beendet wird als der letzte sekundärprozess (msiexec.exe).
Benutzeravatar
tobias
Beiträge: 1294
Registriert: 20 Aug 2008, 12:36
Wohnort: Braunschweig
Kontaktdaten:

Re: Installtion wird nicht abgeschlossen

Beitrag von tobias »

chipo hat geschrieben:Kommt mir so vor als hätte opsi ein Problem damit das der inizialprozess (setup.exe) früher beendet wird als der letzte sekundärprozess (msiexec.exe).
Ich weis gar nicht ob Sekundärprozesse überhaupt vom WINST beachtet werden - da bin ich überfragt. das wird UIB aber sicher wissen.
chipo
Beiträge: 51
Registriert: 16 Jul 2012, 10:12

Re: Installtion wird nicht abgeschlossen

Beitrag von chipo »

Wenn keine Subprozesse beachtet werden dann ist es wohl ein generelles Problem beim erkenne von Prozessen, da z.b. AutoIT (ProcessWaitClose) das Ende des setup.exe Prozesse problemlos erkennt. Müsste ich dann halt wohl ein entsprechendes AutoIT-Script zwischenschalten.

So geht es nun:

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 $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$

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


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

; ----------------------------------------------------------------
; - 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$       = "3dsMax"
Set $MinimumSpace$    = "2250 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\Autodesk"
Set $InstallDir64$      = "%ProgramFiles64Dir%\Autodesk"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
; ----------------------------------------------------------------

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError
	; Stop process and set installation status to failed
else
	comment "Show product picture"
	ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
	
	if FileExists("%ScriptPath%\delsub3264.ins")
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub3264.ins"
	endif
	
	if $LicenseRequired$ = "true"
		comment "Licensing required, reserve license and get license key"
		Sub_get_licensekey
	endif
	
	comment "installing"

	if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
		Message "Installing " + $ProductId$ + " 32 Bit..."
		comment "Start setup program"
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install_32 /LetThemGo
		ExecWith_autoit_confirm "%SCRIPTPATH%\autoit3.exe" 
		Sub_check_exitcode
		comment "Copy files"
		Files_install_32 /32Bit
		comment "Patch Registry"
		Registry_install /32Bit
		comment "Create shortcuts"
		LinkFolder_install
	endif

	if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
		Message "Installing " + $ProductId$ + " 64 Bit..."
		comment "Start setup program"
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install_64 /LetThemGo
		ExecWith_autoit_confirm "%SCRIPTPATH%\autoit3.exe" 
		Sub_check_exitcode
		comment "Copy files"
		Files_install_64 /64Bit
		comment "Patch Registry"
		Registry_install /64Bit
		comment "Create shortcuts"
		LinkFolder_install
	endif
	
endif

[Winbatch_install_32]
"%ScriptPath%\x86\AdminImage\setup.exe" /qb /I %ScriptPath%\x86\AdminImage\3ds Max 2010.ini 


[Files_install_32]


[Winbatch_install_64]
"%ScriptPath%\x64\AdminImage\setup.exe" /qb /I %ScriptPath%\x64\AdminImage\3ds Max 2010 x64.ini 

[ExecWith_autoit_confirm]
ProcessWait("setup.exe")
ProcessWaitClose("setup.exe")
Exit


[Files_install_64]


[Registry_install]


[LinkFolder_install]


[Sub_get_licensekey]


[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

Benutzeravatar
tobias
Beiträge: 1294
Registriert: 20 Aug 2008, 12:36
Wohnort: Braunschweig
Kontaktdaten:

Re: Installtion wird nicht abgeschlossen

Beitrag von tobias »

evtl. hat WINST auch ein problem damit das der Hauptprozess eher beendet ist als der Subprozess...


ps. magst dein Paket ins WIKI Stellen?
chipo
Beiträge: 51
Registriert: 16 Jul 2012, 10:12

Re: Installtion wird nicht abgeschlossen

Beitrag von chipo »

Muss noch bissel was ausbesseren, dann ja.
Benutzeravatar
koepkek
uib-Team
Beiträge: 257
Registriert: 11 Jan 2012, 11:27

Re: Installtion wird nicht abgeschlossen

Beitrag von koepkek »

ist nur ein Versuch,
aber ich habe neulich bei einem Kunden genau diesen Fall gehabt und wir haben hinter der Setup.exe statt /qb nur /q geschrieben und dann ist der Prozess wieder zurück gekommen.
Genau wie hier hat es sich auch um den Aufruf einer AdminImage Installatin gehandelt.

Gruß
Karsten Köpke


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


LarsM
Beiträge: 21
Registriert: 03 Nov 2010, 21:14

Re: Installtion wird nicht abgeschlossen

Beitrag von LarsM »

Moin

es handelt sich hier sogar um den gleichen Hersteller, wie bei uns Herr Koepke. Bei uns war des die Software AutoDesk Map 2012

Unser Aufruf fuer die Installation:

Code: Alles auswählen

"%ScriptPath%\files\64Bit\AdminImage\setup.exe" /W /Q /I %ScriptPath%\files\64Bit\AdminImage\AutoCAD Map 2012 - 64Bit.ini
Gruss
Lars
chipo
Beiträge: 51
Registriert: 16 Jul 2012, 10:12

Re: Installtion wird nicht abgeschlossen

Beitrag von chipo »

Hi,

danke für den Hinweis. 3Dsmax habe ich jetzt schon fertig. Morgen kommt aber Civil 3D ebenfalls als Adminimage und ebenfalls von der Firma Autodesk dran da probiere ich das dann mal.
Antworten