In dem folgenden Quellcode wird die Installation der Updates aufgeführt. Nachdem die Installation durchgelaufen ist, wird mir die Meldung des ErrorLevels ausgegeben, obwohl die Installation erfolgreich war. Das liegt wohl daran, dass das ErrorLevel nicht das richtige ist.
Meine Frage ist jetzt, wie ermittle ich das richtige ErrorLevel?
[SET:Installation]
AddMeter -1
Call "%Src%\Windows6.1-KB2529073-x86.msu" /quiet /norestart
If %ErrorLevel% <> "0" Then "SET:Installation2" Else "SET:InstallationError" EndIf
[SET:Installation2]
AddMeter -1
Call "%Src%\Windows6.1-KB2670667-x86.msu" /quiet /norestart
If %ErrorLevel% <> "0" Then "SET:Installation3" Else "SET:InstallationError" EndIf
[SET:Installation3]
AddMeter -1
Call "%Src%\Windows6.1-KB2721341-x86.msu" /quiet /norestart
If %ErrorLevel% <> "0" Then "SET:Installation4" Else "SET:InstallationError" EndIf
[SET:Installation4]
AddMeter -1
Call "%Src%\Windows6.1-KB2742516-v2-x86.msu" /quiet /norestart
If %ErrorLevel% <> "0" Then "SET:Installation5" Else "SET:InstallationError" EndIf
[SET:Installation5]
AddMeter -1
Call "%Src%\Windows6.1-KB2769618-x86.msu" /quiet /norestart
If %ErrorLevel% <> "0" Then "SET:InstallationError" EndIf