im Zuge meines Abschlussprojektes habe ich die VM opsidemo in der Firma aufgesetzt. Diese läuft und es wurde schon die erste SW verteilt.
Habe nun mithilfe von den Handbüchern die Scripte "setup.ins", "delsub.ins" und "uninstall.ins" zur Verteilung von Firefox erstellt.
Das funktioniert soweit prima. Installation und Deinstallation läuft sauber. Leider bekomme ich immer wieder ein "Warning" bei der Ausführung der Deinstallation . Nach den Warnings findet er dann plötzlich die gesuchte helper.exe von Firefox und macht weiter.
Trotzdem beunruhigen die mich. Weiß jemand, woran das liegt?
(Kompletter Log / setup & delsub.ins sind unten zu finden)
Der Teil mit den Warnings:
Code: Alles auswählen
[5] [Mrz 26 10:42:26:554] Execution of winbatch_UninstallFirefox
[4] [Mrz 26 10:42:26:556] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:26:979] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:27:384] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:27:789] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:28:194] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:28:600] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:29:005] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:29:409] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:29:814] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:30:219] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:30:623] Warning: file not found :C:\Program - giving up
[6] [Mrz 26 10:42:30:626] Call "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe /S"
Mit freundlichen Grüßen,
Nico
setup.ins
Code: Alles auswählen
[Actions]
comment "Winst Version wird ueberprueft."
requiredWinstVersion >= "4.11.4.15"
DefVar $ProductID$
; Variable Produkt-ID wird initiiert.
DefVar $FirefoxVers$
; Variable FirefoxVers wird initiiert, sodass bei der Änderung der Datei nur die Variable angepasst werden muss.
DefVar $OSVersion$
; Variable OSVersion wird initiiert, dient später zur Überprüfung der OS Version
DefVar $CodeValue$
; Variable CodeValue zur Überprüfung vom ExitCode.
DefVar $ProductPath$
;Pfad für den Produktpfad
DefVar $UninstallPath$
; Pfad für den Deinstaller.
; ---------------------------------------------------------------------------------------------
set $ProductID$="Firefox"
set $FirefoxVers$="Firefox_Setup_36.0.4.exe"
set $OSVersion$ = GetMsVersionInfo
set $ProductPath$ = "%ProgramFilesDir%\Mozilla Firefox"
; Variablen bekommen ihren Wert zugewiesen.
; ---------------------------------------------------------------------------------------------
; Ausführung
; ---------------------------------------------------------------------------------------------
if not (HasMinimumSpace ("%SYSTEMDRIVE%", "30 MB"))
LogError "Nicht genügend Speicherplatzt vorhanden (min. 30 MB)."
isFatalError
comment "Ablauf beendet, Schalter ist auf Fail gesetzt."
; In dieser Anweisung wird der freie Speicherplatz geprüft
else
comment "Bild wird eingebunden."
ShowBitmap /3 "%scriptpath%\"+$ProductID$+".png" "$ProductID$"
comment "OS-Version wird ueberprueft."
if not ($OSVersion$ >= "5.1")
;5.1 ist Windows XP
LogError "Das Betriebssystem ist nicht kompatibel."
isFatalError
endif
if FileExists("%ScriptPath%\delsub.ins")
comment "Starte Sub-Sektion für die Deinstallation"
Sub "%ScriptPath%\delsub.ins"
endif
comment "Nachricht zur Installationszeit:"
Message "Installing "+$ProductID$+"..."
comment "Prozess Firefox wird beendet."
killtask "firefox.exe"
comment "Kontrolle ob Laufwerk vorhanden ist."
DosInAnIcon_Scriptpath_check
comment "Silent Installation wird gestartet"
Winbatch_Silent_Install
comment "Error-Checkcode wird abgefangen und interpretiert"
sub_check_exitcode
endif
;------------------------------------------------------------------------------------------------
; Sub_Programme
;------------------------------------------------------------------------------------------------
[Winbatch_Silent_Install]
;Der Scriptpath wird mit der entsprechenden Installationsdatei silent gestartet (-ms)
%SCRIPTPATH%\$FirefoxVers$ -ms
[DosInAnIcon_Scriptpath_check]
;Per NetUse werden die Laufwerke abgefragt. Danach wird geprüft ob der Scriptpath vorhanden ist.
;Wenn er vorhanden ist, läuft das Programm weiter (READY)
;Wenn das Laufwerk nicht vorhanden ist, wird ein Timeout gesetzt und das Programm wartet eine Sekunde.
;Nun wird erneut mit einem netuse und ifexist der Scriptpath überprüft. Dies geschieht solange, bis der
;Scriptpath vorhanden ist, oder die maximale Anzahl an Timeouts erreicht ist.
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 "Es wird über Exit-Codes geprüft, ob die Installation erfolgreich war."
set $CodeValue$ = getLastExitCode
; Für Informationen zu den Exit-Codes:
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($CodeValue$ = "0")
comment "ERROR_SUCCES: Die Aktion wurde erfolgreich ausgeführt."
else
comment "Der Error-Code ist nicht 0, weitere Möglichkeiten werden geprüft."
if ($CodeValue$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT: Ein unbekanntes Programm sollte deinstalliert werden."
comment "Es gab vorher keine"+$ProductID$+" Installation."
else
if ($CodeValue$ = "1641")
comment "ERROR_SUCCESS_REBOOT_INITIATED: Das Programm initiiert einen Neustart."
comment "Gleichzusetzen mit einem Erfolg der Installation."
else
if ($CodeValue$ = "3010")
comment "ERROR_SUCCESS_REBOOT_REQUIRED: Ein Neustart ist für die korrekte Installation erforderlich."
else
logError "Fatal: The setup gives an unknown error code: "+$CodeValue$
isFatalError
endif
endif
endif
endif
;------------------------------------------------------------------------------------------------
Code: Alles auswählen
killtask "firefox.exe"
if FileExists (""+$ProductPath$+"\uninstall\helper.exe")
set $UninstallPath$ = ""+$ProductPath$+"\uninstall\helper.exe /S"
winbatch_UninstallFirefox /WaitSeconds 15
sub_check_exitcode
endif
if not ($ProductPath$ = "")
files_delete
endif
[winbatch_UninstallFirefox]
$UninstallPath$
[files_delete]
delete -sf "$Productpath$\"
[sub_check_exitcode]
comment "Es wird über Exit-Codes geprüft, ob die Installation erfolgreich war."
set $CodeValue$ = getLastExitCode
; Für Informationen zu den Exit-Codes:
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($CodeValue$ = "0")
comment "ERROR_SUCCES: Die Aktion wurde erfolgreich ausgeführt."
else
comment "Der Error-Code ist nicht 0, weitere Möglichkeiten werden geprüft."
if ($CodeValue$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT: Ein unbekanntes Programm sollte deinstalliert werden."
comment "Es gab vorher keine"+$ProductID$+" Installation."
else
if ($CodeValue$ = "1641")
comment "ERROR_SUCCESS_REBOOT_INITIATED: Das Programm initiiert einen Neustart."
comment "Gleichzusetzen mit einem Erfolg der Installation."
else
if ($CodeValue$ = "3010")
comment "ERROR_SUCCESS_REBOOT_REQUIRED: Ein Neustart ist für die korrekte Installation erforderlich."
else
logError "Fatal: The setup gives an unknown error code: "+$CodeValue$
isFatalError
endif
endif
endif
endif
Code: Alles auswählen
[1] [Mrz 26 10:42:26:330] --
[1] [Mrz 26 10:42:26:331] --
[1] [Mrz 26 10:42:26:332] c:\opsi.org\log\opsi-script-part-Xj55Ao69.log
[1] [Mrz 26 10:42:26:333] opsi-winst 4.11.4.15 started at 26.03.2015 09:54:16
[1] [Mrz 26 10:42:26:342]
[1] [Mrz 26 10:42:26:343] ============ Version 4.11.4.15 script "C:\opsi_test\Firefox\setup.ins"
[1] [Mrz 26 10:42:26:344] used script encoding: cp1252
[1] [Mrz 26 10:42:26:345] used system encoding: cp1252
[1] [Mrz 26 10:42:26:346] start: 2015-03-26 10:42:26
[1] [Mrz 26 10:42:26:353] winst running with admin privileges
[1] [Mrz 26 10:42:26:354] winst running in standard script mode
[1] [Mrz 26 10:42:26:355] executing: "C:\opsi-winst\winst32.exe"
[1] [Mrz 26 10:42:26:356] system infos:
[1] [Mrz 26 10:42:26:368] DEU - System default locale
[1] [Mrz 26 10:42:26:370] MS Windows 6.3 64 Bit
[1] [Mrz 26 10:42:26:372]
[6] [Mrz 26 10:42:26:374] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [Mrz 26 10:42:26:375] Key closed
[5] [Mrz 26 10:42:26:425] comment: Winst Version wird ueberprueft.
[6] [Mrz 26 10:42:26:427] opsi-winst has version 4.11.4.15, required is : >= 4.11.4.15
[5] [Mrz 26 10:42:26:429] Set $ProductID$="Firefox"
[6] [Mrz 26 10:42:26:431] The value of the variable "$ProductID$" is now: "Firefox"
[5] [Mrz 26 10:42:26:438] Set $FirefoxVers$="Firefox_Setup_36.0.4.exe"
[6] [Mrz 26 10:42:26:440] The value of the variable "$FirefoxVers$" is now: "Firefox_Setup_36.0.4.exe"
[5] [Mrz 26 10:42:26:442] Set $OSVersion$ = GetMsVersionInfo
[6] [Mrz 26 10:42:26:443] The value of the variable "$OSVersion$" is now: "6.3"
[5] [Mrz 26 10:42:26:445] Set $ProductPath$ = "C:\Program Files (x86)\Mozilla Firefox"
[6] [Mrz 26 10:42:26:446] The value of the variable "$ProductPath$" is now: "C:\Program Files (x86)\Mozilla Firefox"
[6] [Mrz 26 10:42:26:455] If
[6] [Mrz 26 10:42:26:457] Free on Disk C:: 64.491.450.368 bytes This is more than the required amount of 30.000.000 bytes
[5] [Mrz 26 10:42:26:458] HasMinimumSpace ("C:", "30 MB") <<< result true
[5] [Mrz 26 10:42:26:460] not (HasMinimumSpace ("C:", "30 MB")) <<< result false
[6] [Mrz 26 10:42:26:462] Then
[6] [Mrz 26 10:42:26:463] Else
[5] [Mrz 26 10:42:26:465] comment: Bild wird eingebunden.
[5] [Mrz 26 10:42:26:470] comment: OS-Version wird ueberprueft.
[6] [Mrz 26 10:42:26:506] If
[5] [Mrz 26 10:42:26:508] $OSVersion$ >= "5.1" <<< result true
[5] [Mrz 26 10:42:26:509] not ($OSVersion$ >= "5.1") <<< result false
[6] [Mrz 26 10:42:26:511] Then
[6] [Mrz 26 10:42:26:512] EndIf
[6] [Mrz 26 10:42:26:513] If
[6] [Mrz 26 10:42:26:515] Starting query if file exist ...
[5] [Mrz 26 10:42:26:516] FileExists("C:\opsi_test\Firefox\delsub.ins") <<< result true
[6] [Mrz 26 10:42:26:518] Then
[5] [Mrz 26 10:42:26:519] comment: Starte Sub-Sektion für die Deinstallation
[6] [Mrz 26 10:42:26:524]
[6] [Mrz 26 10:42:26:526] ~~~~~~~ Start Sub ~~~~~~~ Sub "C:\opsi_test\Firefox\delsub.ins"
[6] [Mrz 26 10:42:26:541] Nothing to stop, no instances of "firefox.exe" found
[6] [Mrz 26 10:42:26:543] If
[6] [Mrz 26 10:42:26:545] Starting query if file exist ...
[5] [Mrz 26 10:42:26:547] FileExists (""+$ProductPath$+"\uninstall\helper.exe") <<< result true
[6] [Mrz 26 10:42:26:548] Then
[5] [Mrz 26 10:42:26:550] Set $UninstallPath$ = ""+$ProductPath$+"\uninstall\helper.exe /S"
[6] [Mrz 26 10:42:26:551] The value of the variable "$UninstallPath$" is now: "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe /S"
[5] [Mrz 26 10:42:26:552]
[5] [Mrz 26 10:42:26:554] Execution of winbatch_UninstallFirefox
[b][4] [Mrz 26 10:42:26:556] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:26:979] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:27:384] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:27:789] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:28:194] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:28:600] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:29:005] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:29:409] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:29:814] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:30:219] Warning: file not found :C:\Program -retrying
[4] [Mrz 26 10:42:30:623] Warning: file not found :C:\Program - giving up[/b]
[6] [Mrz 26 10:42:30:626] Call "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe /S"
[6] [Mrz 26 10:42:30:628] Waiting 15 seconds
[6] [Mrz 26 10:42:30:631] Waiting until the called process is finished
[6] [Mrz 26 10:42:30:634] Start process as invoker:
[6] [Mrz 26 10:42:45:651] ExitCode 0 Executed process "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe /S"
[6] [Mrz 26 10:42:45:655]
[6] [Mrz 26 10:42:45:658] ~~~~~~~ Start Sub ~~~~~~~ sub_check_exitcode
[5] [Mrz 26 10:42:45:663] comment: Es wird über Exit-Codes geprüft, ob die Installation erfolgreich war.
[5] [Mrz 26 10:42:45:666] Set $CodeValue$ = getLastExitCode
[6] [Mrz 26 10:42:45:670] The value of the variable "$CodeValue$" is now: "0"
[6] [Mrz 26 10:42:45:673] If
[5] [Mrz 26 10:42:45:675] $CodeValue$ = "0" <<< result true
[5] [Mrz 26 10:42:45:678] ($CodeValue$ = "0") <<< result true
[6] [Mrz 26 10:42:45:680] Then
[5] [Mrz 26 10:42:45:682] comment: ERROR_SUCCES: Die Aktion wurde erfolgreich ausgeführt.
[6] [Mrz 26 10:42:45:683] Else
[6] [Mrz 26 10:42:45:684] If
[6] [Mrz 26 10:42:45:685] Then
[6] [Mrz 26 10:42:45:692] Else
[6] [Mrz 26 10:42:45:693] If
[6] [Mrz 26 10:42:45:696] Then
[6] [Mrz 26 10:42:45:697] Else
[6] [Mrz 26 10:42:45:699] If
[6] [Mrz 26 10:42:45:700] Then
[6] [Mrz 26 10:42:45:702] Else
[6] [Mrz 26 10:42:45:704] EndIf
[6] [Mrz 26 10:42:45:705] EndIf
[6] [Mrz 26 10:42:45:707] EndIf
[6] [Mrz 26 10:42:45:708] EndIf
[6] [Mrz 26 10:42:45:709]
[6] [Mrz 26 10:42:45:711] ~~~~~~~ End Sub ~~~~~~~ sub_check_exitcode
[6] [Mrz 26 10:42:45:712]
[6] [Mrz 26 10:42:45:714] EndIf
[6] [Mrz 26 10:42:45:715] If
[5] [Mrz 26 10:42:45:716] $ProductPath$ = "" <<< result false
[5] [Mrz 26 10:42:45:718] not ($ProductPath$ = "") <<< result true
[6] [Mrz 26 10:42:45:718] Then
[5] [Mrz 26 10:42:45:720]
[5] [Mrz 26 10:42:45:721] Execution of files_delete
[6] [Mrz 26 10:42:45:723] Delete recursively "C:\Program Files (x86)\Mozilla Firefox\"
[5] [Mrz 26 10:42:45:724] Notice: Directory C:\Program Files (x86)\Mozilla Firefox\ does not exist, nothing deleted
[6] [Mrz 26 10:42:45:727] EndIf
[6] [Mrz 26 10:42:45:728] Section ending since next line is starting with "["
[6] [Mrz 26 10:42:45:730]
[6] [Mrz 26 10:42:45:731] ~~~~~~~ End Sub ~~~~~~~ Sub "C:\opsi_test\Firefox\delsub.ins"
[6] [Mrz 26 10:42:45:732]
[6] [Mrz 26 10:42:45:733] EndIf
[5] [Mrz 26 10:42:45:736] comment: Nachricht zur Installationszeit:
[5] [Mrz 26 10:42:45:739] message Installing Firefox...
[5] [Mrz 26 10:42:45:742] comment: Prozess Firefox wird beendet.
[6] [Mrz 26 10:42:45:757] Nothing to stop, no instances of "firefox.exe" found
[5] [Mrz 26 10:42:45:760] comment: Kontrolle ob Laufwerk vorhanden ist.
[5] [Mrz 26 10:42:45:761]
[5] [Mrz 26 10:42:45:763] DosInAnIcon_Scriptpath_check
[6] [Mrz 26 10:42:45:767] c:\opsi.org\tmp\_winstbat_Hm13Ab02.cmd saved back
[6] [Mrz 26 10:42:45:768] Executing "cmd.exe" /C "c:\opsi.org\tmp\_winstbat_Hm13Ab02.cmd"
[6] [Mrz 26 10:42:45:873] ExitCode 0
[6] [Mrz 26 10:42:45:876]
[6] [Mrz 26 10:42:45:878] output:
[6] [Mrz 26 10:42:45:881] --------------
[6] [Mrz 26 10:42:45:885]
[6] [Mrz 26 10:42:45:887] C:\opsi-winst>net use
[6] [Mrz 26 10:42:45:890] Neue Verbindungen werden gespeichert.
[6] [Mrz 26 10:42:45:893]
[6] [Mrz 26 10:42:45:896] Es sind keine Einträge in der Liste.
[6] [Mrz 26 10:42:45:899]
[6] [Mrz 26 10:42:45:902]
[6] [Mrz 26 10:42:45:905] C:\opsi-winst>set TIMEOUT=
[6] [Mrz 26 10:42:45:906]
[6] [Mrz 26 10:42:45:909] C:\opsi-winst>if exist "C:\opsi_test\Firefox\." goto READY
[6] [Mrz 26 10:42:45:912]
[6] [Mrz 26 10:42:45:920] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [Mrz 26 10:42:45:921] Search "c:\opsi.org\tmp\"
[5] [Mrz 26 10:42:45:923] comment: Silent Installation wird gestartet
[5] [Mrz 26 10:42:45:925]
[5] [Mrz 26 10:42:45:927] Execution of Winbatch_Silent_Install
[6] [Mrz 26 10:42:45:929] Call "C:\opsi_test\Firefox\Firefox_Setup_36.0.4.exe -ms"
[6] [Mrz 26 10:42:45:930] Waiting until the called process is finished
[6] [Mrz 26 10:42:45:932] Start process as invoker:
[6] [Mrz 26 10:42:58:960] ExitCode 0 Executed process "C:\opsi_test\Firefox\Firefox_Setup_36.0.4.exe -ms"
[5] [Mrz 26 10:42:58:964] comment: Error-Checkcode wird abgefangen und interpretiert
[6] [Mrz 26 10:42:58:967]
[6] [Mrz 26 10:42:58:970] ~~~~~~~ Start Sub ~~~~~~~ sub_check_exitcode
[5] [Mrz 26 10:42:58:974] comment: Es wird über Exit-Codes geprüft, ob die Installation erfolgreich war.
[5] [Mrz 26 10:42:58:977] Set $CodeValue$ = getLastExitCode
[6] [Mrz 26 10:42:58:980] The value of the variable "$CodeValue$" is now: "0"
[6] [Mrz 26 10:42:58:983] If
[5] [Mrz 26 10:42:58:986] $CodeValue$ = "0" <<< result true
[5] [Mrz 26 10:42:58:988] ($CodeValue$ = "0") <<< result true
[6] [Mrz 26 10:42:58:991] Then
[5] [Mrz 26 10:42:58:994] comment: ERROR_SUCCES: Die Aktion wurde erfolgreich ausgeführt.
[6] [Mrz 26 10:42:58:997] Else
[6] [Mrz 26 10:42:58:998] If
[6] [Mrz 26 10:42:59:000] Then
[6] [Mrz 26 10:42:59:002] Else
[6] [Mrz 26 10:42:59:004] If
[6] [Mrz 26 10:42:59:006] Then
[6] [Mrz 26 10:42:59:008] Else
[6] [Mrz 26 10:42:59:010] If
[6] [Mrz 26 10:42:59:012] Then
[6] [Mrz 26 10:42:59:013] Else
[6] [Mrz 26 10:42:59:015] EndIf
[6] [Mrz 26 10:42:59:017] EndIf
[6] [Mrz 26 10:42:59:019] EndIf
[6] [Mrz 26 10:42:59:020] EndIf
[6] [Mrz 26 10:42:59:022]
[6] [Mrz 26 10:42:59:024] ~~~~~~~ End Sub ~~~~~~~ sub_check_exitcode
[6] [Mrz 26 10:42:59:025]
[6] [Mrz 26 10:42:59:026] EndIf
[1] [Mrz 26 10:42:59:030] ___________________
[1] [Mrz 26 10:42:59:031] script finished
[1] [Mrz 26 10:42:59:032] 0 errors
[1] [Mrz 26 10:42:59:033] 11 warnings
[1] [Mrz 26 10:42:59:034]
[1] [Mrz 26 10:42:59:036]
[5] [Mrz 26 10:43:13:672] read file created