Es ist wichtig, dass keine Fehlermeldungen bei installierter Software auftreten, die nicht mit Matrix42 installiert wurde. Dies war bisher mein häufigstes Problem, weshalb ich alle Pakete anpassen muss.
Code: Select all
[Set:Installation]
SET SoftwareVersion=%HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{%%}_is1","DisplayVersion"%
If %ContinentalVersion% = 2.0.0 Then "VersionOK" EndIf
SET SoftwareVersion=%HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{%%}_is1","DisplayVersion"%
If %ContinentalVersion% > 2.0.0 Then "Set:Deinstallation" EndIf
[Set:Update]
AddMeter -1
Call "%Src%\Software_2.0.0.exe" /SILENT /SUPPRESSMSGBOXES /LOG="%APP%\Install.log" /NOCANCEL /NORESTART
If %ErrorLevel% <> "0" Then "SET:InstallationError" EndIf
[Set:Deinstallation]
If "%ErrorLevel%" <> "0" Then "SET:DeInstallationError" EndIf
-Call %HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{%%}_is1,QuietUninstallString% /SILENT" /SUPPRESSMSGBOXES /LOG="%APP%\Uninstall.log" /NOCANCEL /NORESTART
-AddMeter -1
[VersionOK]
ErrorLogMsg Die Software ist bereits installiert und auf dem neuesten Stand. Die Installation wird übersprungen. Exit!
SetReboot 2
Exit Die Software ist bereits installiert und auf dem neuesten Stand. Die Installation wird übersprungen.