ich kämpfe schon eine Weile mit einem Skript um ganttproject von 2.0.10 auf 2.5 bzw. 2.6 zu aktualisieren. Hauptproblem was ich hab ist der wechselnde Programmordner der Versionen. dh. Version 2.0 wurde nach C:\Programme\GantProject installiert, die neueren Versionen nach GanttProject-2.6 bzw. 2.5.
Deshalb die for schleife.
Leider findet der winst mein Winbach_uninstall_32 bzw. _64 dann nicht mehr (ich weiß, dass das in sub_ Probleme macht) aber egal ob ich die Winbatch_ in das delsub.ins oder in das uninstall.ins reinschreibe, bekomme ich die Fehlermeldung:
[5] [Dez 12 17:39:13:312] Warning: The section "Winbatch_uninstall_64" (called in line 4 of the calling section) does not exist or is empty
[5] [Dez 12 17:39:13:312]
[4] [Dez 12 17:39:13:312] Warning: Section "Winbatch_uninstall_64" does not exist or is empty
hat jemand da noch nen tip für mich? ich stell dann auch das ganze Skript ins Wiki wenn es läuft ,-)
Code: Alles auswählen
DefStringlist $Versionen$
Set $Versionen$ = createStringlist('GanttProject-2.6','GanttProject-2.5','GanttProject')
comment "collect known Versions of the product"
; set $Versionen$ = addtolist($Versionen$,'2.6')
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Uninstalling " + $ProductId$ + " 32 Bit..."
for %Vers% in $Versionen$ do sub_check32
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Uninstalling " + $ProductId$ + " 64 Bit..."
for %Vers% in $Versionen$ do sub_check
endif
comment "Delete program shortcuts"
LinkFolder_uninstall
[sub_check32]
Set $UninstallProgram32$ = "%ProgramFilesSysnativeDir%" + "\%Vers%" + "\uninstall.exe"
if FileExists($UninstallProgram32$)
comment "Version %Vers% gefunden " found in registry, starting msiexec to uninstall"
Message "Found "+$ProductId$+"%Vers% => uninstalling first"
Winbatch_uninstall_32
sub_check_exitcode
endif
[sub_check]
Set $UninstallProgram64$ = "%ProgramFiles32Dir%" + "\%Vers%" + "\uninstall.exe"
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_64
sub_check_exitcode
endif
[Winbatch_uninstall_32]
"$UninstallProgram32$" /S
[Winbatch_uninstall_64]
"$UninstallProgram64$" /S