Seite 3 von 3

Re: Firefox Verteilung "Warning: File not found :C:\Program"

Verfasst: 27 Mär 2015, 13:32
von SisterOfMercy
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
Why do you keep using ("C:\Program Files(x86)\Mozilla Firefox\uninstall\helper.exe") instead of $ProductPath$ + "\uninstall\helper.exe"?
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.

Re: [Gelöst] Firefox Verteilung "Warning: File not found :C:\Program"

Verfasst: 30 Mär 2015, 09:39
von Tiefgarage
Hello,

in my final version I use $ProductPath$ and %ProgramDir%. I'd temporarily change these parts for troubleshooting.

Greetings

Re: [Gelöst] Firefox Verteilung "Warning: File not found :C:\Program"

Verfasst: 30 Mär 2015, 15:50
von SisterOfMercy
Tiefgarage hat geschrieben:in my final version I use $ProductPath$ and %ProgramDir%. I'd temporarily change these parts for troubleshooting.
Don't forget you can always set the loglevel to a higher value:

Code: Alles auswählen

[Actions]
SetLogLevel=9