Exitcode -1 bei CostFinalize

Antworten
Synco
Beiträge: 25
Registriert: 25 Apr 2013, 07:45

Exitcode -1 bei CostFinalize

Beitrag von Synco »

Ich versuche das Etikettenprogramm Avery DesignPro5 mittels Opsi zu installieren.
Dazu liegen die Dateien/Verzeichnisse der Installations CD im Verzeichnis "%SCRIPTPATH%\files\designpro.
Von dort rufe ich auch die setup.exe auf. Dort liegen neben des setup.exe auch *msi / *.mst dateien.

Code: Alles auswählen

...
Set $LogFile$ = $LogDir$ + "\" + $ProductId$ + "_x86.log"

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" "Avery Design Pro"

        if FileExists("%ScriptPath%\delsub32.ins")
                comment "Start uninstall sub section"
                Sub "%ScriptPath%\delsub32.ins"
        endif

        Message "Installing " + "Avery Design Pro" + " ..."

        if $LicenseRequired$ = "true"
                comment "Licensing required, reserve license and get license key"
                Sub_get_licensekey
        endif

        comment "Start setup program"
        ChangeDirectory "%SCRIPTPATH%\files\designpro"
        Winbatch_install /WaitOnClose
        Sub_check_exitcode
endif

[Winbatch_install]
setup.exe /L1031 /s /v"/qb- /l* $LogFile$ ALLUSERS=2"
...
Der Parameter ALLUSERS scheint nicht unbedingt notwendig zu sein.
Rufe ich die Installation manuell über winst32.exe auf, funktioniert alles einwandfrei.
Bei der Verteilung des Opsi-Pakets erhalte ich allerdings nach erfolgreicher Installation den ExitCode=1.
Die Windows Ereignisanzeige meldet jedoch eine erfolgreiche Installation, das Programm lässt sich auch ohne Fehler starten.
Das Logfile zeigt ebenfalls eine erfolgreiche Installation an, lediglich die anschliessende CostFinalize Routine ergibt eine Fehler.
Was passiert bei CostFinalize eigentlich und wie kann ich diesen Errorcode abstellen?

Anbei Auszüge aus dem lokalen Logfile und den Logs des configed.

Logfile:

Code: Alles auswählen

...
Property(S): AdminUser = 1
Property(S): ProductLanguage = 1031
Property(S): CostingComplete = 1
Property(S): OutOfDiskSpace = 0
Property(S): OutOfNoRbDiskSpace = 0
Property(S): PrimaryVolumeSpaceAvailable = 0
Property(S): PrimaryVolumeSpaceRequired = 0
Property(S): PrimaryVolumeSpaceRemaining = 0
Property(S): SOURCEDIR = P:\averydpro\files\designpro\
Property(S): SourcedirProduct = {F82C6574-AD88-4B40-A432-970BC77F1BD2}
Property(S): ProductToBeRegistered = 1
MSI (s) (FC:C4) [11:07:09:395]: Produkt: DesignPro 5 -- Installationsvorgang erfolgreich abgeschlossen.

=== Protokollierung beendet: 21.11.2013  11:07:09 ===

=== Protokollierung gestartet: 21.11.2013  11:07:09 ===

Aktion 11:07:09: CostInitialize. Speicherbedarf wird berechnet

Aktion gestartet um 11:07:09: CostInitialize.

Aktion beendet um 11:07:09: CostInitialize. Rückgabewert 1.     
Aktion 11:07:09: FileCost. Berechne notwendigen Speicherbedarf

Aktion gestartet um 11:07:09: FileCost.

Aktion beendet um 11:07:09: FileCost. Rückgabewert 1.   
Aktion 11:07:09: CostFinalize. Speicherbedarf wird berechnet

Aktion gestartet um 11:07:09: CostFinalize.
Aktion beendet um 11:07:09: CostFinalize. Rückgabewert 1.       
1: Failed to create uninstallation information, error is 0x80070002 
Auszug aus der Logdatei des opsiconfigd:

Code: Alles auswählen

...
[6] [Nov 21 11:04:45:227] [averydpro]                 The file has been deleted
[6] [Nov 21 11:04:45:227] [averydpro]               Directory "C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Avery\DesignPro5\Templates" deleted
[6] [Nov 21 11:04:45:227] [averydpro]             Directory "C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Avery\DesignPro5" deleted
[6] [Nov 21 11:04:45:227] [averydpro]           Directory "C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Avery" deleted
[6] [Nov 21 11:04:45:227] [averydpro]       
[6] [Nov 21 11:04:45:227] [averydpro]       ~~~~~~~ Start Sub ~~~~~~~  sub_check_exitcode
[5] [Nov 21 11:04:45:227] [averydpro]       comment: Test for installation success via exit code
[5] [Nov 21 11:04:45:227] [averydpro]       
[5] [Nov 21 11:04:45:227] [averydpro]       Set  $ExitCode$ = getLastExitCode
[6] [Nov 21 11:04:45:227] [averydpro]         The value of the variable "$ExitCode$" is now: "0"
[5] [Nov 21 11:04:45:227] [averydpro]       
[5] [Nov 21 11:04:45:227] [averydpro]       If
[5] [Nov 21 11:04:45:227] [averydpro]         $ExitCode$ = "0"   <<< result true
[5] [Nov 21 11:04:45:227] [averydpro]         ($ExitCode$ = "0")   <<< result true
[5] [Nov 21 11:04:45:227] [averydpro]       Then
[5] [Nov 21 11:04:45:227] [averydpro]         comment: Looks good: setup program gives exitcode zero
[5] [Nov 21 11:04:45:227] [averydpro]       
[5] [Nov 21 11:04:45:227] [averydpro]       Else
[5] [Nov 21 11:04:45:227] [averydpro]         
[5] [Nov 21 11:04:45:227] [averydpro]         If
[5] [Nov 21 11:04:45:227] [averydpro]         Then
[5] [Nov 21 11:04:45:227] [averydpro]         
[5] [Nov 21 11:04:45:227] [averydpro]         Else
[5] [Nov 21 11:04:45:227] [averydpro]           
[5] [Nov 21 11:04:45:227] [averydpro]           If
[5] [Nov 21 11:04:45:245] [averydpro]           Then
[5] [Nov 21 11:04:45:245] [averydpro]           
[5] [Nov 21 11:04:45:245] [averydpro]           Else
[5] [Nov 21 11:04:45:245] [averydpro]             
[5] [Nov 21 11:04:45:245] [averydpro]             If
[5] [Nov 21 11:04:45:245] [averydpro]             Then
[5] [Nov 21 11:04:45:245] [averydpro]             
[5] [Nov 21 11:04:45:245] [averydpro]             Else
[5] [Nov 21 11:04:45:245] [averydpro]             EndIf
[5] [Nov 21 11:04:45:245] [averydpro]           EndIf
[5] [Nov 21 11:04:45:245] [averydpro]         EndIf
[5] [Nov 21 11:04:45:245] [averydpro]       EndIf
[6] [Nov 21 11:04:45:245] [averydpro]       
[6] [Nov 21 11:04:45:245] [averydpro]       ~~~~~~~ End Sub   ~~~~~~~  sub_check_exitcode
[6] [Nov 21 11:04:45:245] [averydpro]       
[5] [Nov 21 11:04:45:245] [averydpro]     EndIf
[6] [Nov 21 11:04:45:245] [averydpro]     Section ending since next line is starting with "["
[6] [Nov 21 11:04:45:245] [averydpro]     
[6] [Nov 21 11:04:45:245] [averydpro]     ~~~~~~~ End Sub   ~~~~~~~  Sub "P:\averydpro\delsub32.ins"
[6] [Nov 21 11:04:45:245] [averydpro]     
[5] [Nov 21 11:04:45:245] [averydpro]   EndIf
[5] [Nov 21 11:04:45:245] [averydpro]   message Installing Avery Design Pro ...
[5] [Nov 21 11:04:45:245] [averydpro]   
[5] [Nov 21 11:04:45:245] [averydpro]   If
[5] [Nov 21 11:04:45:245] [averydpro]     $LicenseRequired$ = "true"   <<< result false
[5] [Nov 21 11:04:45:245] [averydpro]   Then
[5] [Nov 21 11:04:45:245] [averydpro]   EndIf
[5] [Nov 21 11:04:45:245] [averydpro]   comment: Start setup program
[6] [Nov 21 11:04:45:262] [averydpro]   Changed current directory to P:\averydpro\files\designpro
[5] [Nov 21 11:04:45:262] [averydpro]   
[5] [Nov 21 11:04:45:262] [averydpro]   Execution of Winbatch_install
[6] [Nov 21 11:04:45:262] [averydpro]     Call "setup.exe /L1031 /s /v"/qb- /l* C:\_install\log\averydpro_x86.log ALLUSERS=2""
[6] [Nov 21 11:04:45:262] [averydpro]        Waiting until the called process is finished
[6] [Nov 21 11:04:45:262] [averydpro]     Start process as invoker: pcpatch
[6] [Nov 21 11:07:13:394] [averydpro]     ExitCode -1    Executed process "setup.exe /L1031 /s /v"/qb- /l* C:\_install\log\averydpro_x86.log ALLUSERS=2""
[6] [Nov 21 11:07:13:411] [averydpro]   
[6] [Nov 21 11:07:13:411] [averydpro]   ~~~~~~~ Start Sub ~~~~~~~  Sub_check_exitcode
[5] [Nov 21 11:07:13:411] [averydpro]   comment: Test for installation success via exit code
[5] [Nov 21 11:07:13:411] [averydpro]   
[5] [Nov 21 11:07:13:411] [averydpro]   Set  $ExitCode$ = getLastExitCode
[6] [Nov 21 11:07:13:411] [averydpro]     The value of the variable "$ExitCode$" is now: "-1"
[5] [Nov 21 11:07:13:411] [averydpro]   
[5] [Nov 21 11:07:13:411] [averydpro]   If
[5] [Nov 21 11:07:13:411] [averydpro]     $ExitCode$ = "0"   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]     ($ExitCode$ = "0")   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]   Then
[5] [Nov 21 11:07:13:411] [averydpro]   
[5] [Nov 21 11:07:13:411] [averydpro]   Else
[5] [Nov 21 11:07:13:411] [averydpro]     comment: Setup program gives a exitcode unequal zero: -1
[5] [Nov 21 11:07:13:411] [averydpro]     
[5] [Nov 21 11:07:13:411] [averydpro]     If
[5] [Nov 21 11:07:13:411] [averydpro]       $ExitCode$ = "1605"   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]       ($ExitCode$ = "1605")   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]     Then
[5] [Nov 21 11:07:13:411] [averydpro]     
[5] [Nov 21 11:07:13:411] [averydpro]     Else
[5] [Nov 21 11:07:13:411] [averydpro]       
[5] [Nov 21 11:07:13:411] [averydpro]       If
[5] [Nov 21 11:07:13:411] [averydpro]         $ExitCode$ = "1641"   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]         ($ExitCode$ = "1641")   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]       Then
[5] [Nov 21 11:07:13:411] [averydpro]       
[5] [Nov 21 11:07:13:411] [averydpro]       Else
[5] [Nov 21 11:07:13:411] [averydpro]         
[5] [Nov 21 11:07:13:411] [averydpro]         If
[5] [Nov 21 11:07:13:411] [averydpro]           $ExitCode$ = "3010"   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]           ($ExitCode$ = "3010")   <<< result false
[5] [Nov 21 11:07:13:411] [averydpro]         Then
[5] [Nov 21 11:07:13:411] [averydpro]         
[5] [Nov 21 11:07:13:411] [averydpro]         Else
[3] [Nov 21 11:07:13:411] [averydpro]           Error: Fatal: Setup program gives an unknown exitcode unequal zero: -1
[5] [Nov 21 11:07:13:411] [averydpro]           Error level set to fatal
[5] [Nov 21 11:07:13:411] [averydpro]           Process aborted
[6] [Nov 21 11:07:13:411] [averydpro]   
[6] [Nov 21 11:07:13:411] [averydpro]   ~~~~~~~ End Sub   ~~~~~~~  Sub_check_exitcode
[6] [Nov 21 11:07:13:411] [averydpro]   
[5] [Nov 21 11:07:13:411] [averydpro]   Process aborted
[1] [Nov 21 11:07:13:411] [averydpro] ___________________
[1] [Nov 21 11:07:13:411] [averydpro] script finished
[1] [Nov 21 11:07:13:411] [averydpro] 1 error
[1] [Nov 21 11:07:13:411] [averydpro] 0 warnings
[1] [Nov 21 11:07:13:411] [averydpro] 
[1] [Nov 21 11:07:13:411] [averydpro] installed product: averydpro Version: 5.3.705-2
Benutzeravatar
koepkek
uib-Team
Beiträge: 257
Registriert: 11 Jan 2012, 11:27

Re: Exitcode -1 bei CostFinalize

Beitrag von koepkek »

Hallo

ich kenne das Programm nicht. Aber was hat das "-" bei den msi-Paramtern qb- für eine Aufgabe?

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


Synco
Beiträge: 25
Registriert: 25 Apr 2013, 07:45

Re: Exitcode -1 bei CostFinalize

Beitrag von Synco »

Hallo koepkek,
gemäß technet.microsoft.com
/qb
Zeigt eine einfache Benutzeroberfläche an.

/qb-
Zeigt eine einfache Benutzeroberfläche ohne modale Dialogfelder an.
unterdrückt man mit "/qb-" im Gegensatz zum Schalter "/qb" die Dialogfelder.

Aber den "Exitcode -1" erhalte ich sowohl mit /qn /qb- /qb.
Wie gesagt im Ereignislog wird die Installation und Deinstallation als "erfolgreich" vermerkt und das Programm lässt sich ohne Fehlermeldungen starten.

Allerdings, und das ist das Störende, wird im configed folgendes angezeigt:

Stand: unknown
Report: failed (Setup)
Version: -
Benutzeravatar
SisterOfMercy
Beiträge: 1556
Registriert: 22 Jun 2012, 19:18

Re: Exitcode -1 bei CostFinalize

Beitrag von SisterOfMercy »

You could disable the exitcode check in the [actions] list, or perhaps try to find out what kind of uninstall information it tries to create.
Install it manually on a test computer, with one of those registry/file scanners. Scan before installation, and after installation. Compare the differences, and look what gets changed.
Then you look at the one installed with OPSI and check if all values have been written correctly. You might be able to find out what it can't find.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
koepkek
uib-Team
Beiträge: 257
Registriert: 11 Jan 2012, 11:27

Re: Exitcode -1 bei CostFinalize

Beitrag von koepkek »

Wenn du sicher bist, dass die Installation erfolgreich war, auch wenn ein ExitCode -1 rauskommt, dann würde ich das sub_check_exitcode um den Wert -1 in diesem Install-Script erweitern. Einfach eine weiter if-else-schleife anfügen.

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


Synco
Beiträge: 25
Registriert: 25 Apr 2013, 07:45

Re: Exitcode -1 bei CostFinalize

Beitrag von Synco »

Vielen Dank an koepkek und Thanks to SisterOfMercy!

Ich habe den sub_check_exitcode nun um den Wert -1 erweitert und erhalte damit eine "saubere" Statusanzeige im configed.
Sollte die Installation der Anwendung wider Erwarten doch noch Probleme aufwerfen, so werde ich wohl nicht um die von SisterOfMercy beschriebene Analyse der Installation herum kommen. :(
Aber solange die Anwendung funktioniert ... :D
Antworten