Why do you keep using ("C:\Program Files(x86)\Mozilla Firefox\uninstall\helper.exe") instead of $ProductPath$ + "\uninstall\helper.exe"?Tiefgarage hat geschrieben:Problemfall delsub.ins:Code: Alles auswählen
if FileExists ("C:\Program Files(x86)\Mozilla Firefox\uninstall\helper.exe") set $UninstallPath$ = "C:\Program Files(x86)\Mozilla Firefox\uninstall\helper.exe" winbatch_UninstallFirefox /WaitSeconds 15 sub_check_exitcode endif if not ($ProductPath$ = "") files_delete endif [winbatch_UninstallFirefox] "$UninstallPath$" /s [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
Or at least use %ProgramFiles32Dir% instead of the hardcoded c:\program files(x86).
In $ProductPath$ you are using %ProgramFilesDir%, which is better. I'm not entirely sure how this behaves on a 32-bit and a 64-bit system.