diff --git a/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins b/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins index bbd4ff9..8ae44e4 100644 --- a/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins +++ b/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins @@ -4,11 +4,25 @@ ; credits: http://www.opsi.org/en/credits/ +Set $UninstallProgramOld$ = $InstallDir$ + $UninstallProg$ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +if FileExists($IniFile$) + Set $UninstallProgramOld$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif +endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall @@ -24,6 +38,18 @@ Registry_uninstall /32Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + + [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; diff --git a/sample/32bit/installer/license/CLIENT_DATA/setup32.ins b/sample/32bit/installer/license/CLIENT_DATA/setup32.ins index 4023f97..dc4f738 100644 --- a/sample/32bit/installer/license/CLIENT_DATA/setup32.ins +++ b/sample/32bit/installer/license/CLIENT_DATA/setup32.ins @@ -7,6 +7,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -17,6 +18,9 @@ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -51,14 +55,14 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub32.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub32.ins" endif - Message "Installing " + $ProductId$ + " ..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." if $LicenseRequired$ = "true" comment "Licensing required, reserve license and get license key" diff --git a/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins b/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins index c34e5b3..b012f35 100644 --- a/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins +++ b/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins @@ -7,6 +7,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -15,6 +16,9 @@ DefVar $ProductId$ DefVar $InstallDir$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -39,7 +43,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins index bbd4ff9..8ae44e4 100644 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins +++ b/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins @@ -4,11 +4,25 @@ ; credits: http://www.opsi.org/en/credits/ +Set $UninstallProgramOld$ = $InstallDir$ + $UninstallProg$ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +if FileExists($IniFile$) + Set $UninstallProgramOld$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif +endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall @@ -24,6 +38,18 @@ Registry_uninstall /32Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + + [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins index e9e1cdb..df49a0b 100644 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins +++ b/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins @@ -7,6 +7,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -14,6 +15,9 @@ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -46,14 +50,14 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub32.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub32.ins" endif - Message "Installing " + $ProductId$ + " ..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins index e9794b0..c66d114 100644 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins +++ b/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins @@ -7,12 +7,16 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductId$ DefVar $InstallDir$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -35,7 +39,7 @@ Set $InstallDir$ = "%ProgramFiles32Dir%\" Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins b/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins index 2062b7b..6bc6521 100644 --- a/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins +++ b/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins @@ -6,7 +6,12 @@ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." if FileExists($IniFile$) Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -31,6 +36,9 @@ Registry_uninstall /32Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_msi_old] +msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi] msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress diff --git a/sample/32bit/msi/license/CLIENT_DATA/setup32.ins b/sample/32bit/msi/license/CLIENT_DATA/setup32.ins index 821eea5..7bc742e 100644 --- a/sample/32bit/msi/license/CLIENT_DATA/setup32.ins +++ b/sample/32bit/msi/license/CLIENT_DATA/setup32.ins @@ -17,6 +17,9 @@ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -51,14 +54,14 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub32.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub32.ins" endif - Message "Installing " + $ProductId$ + " ..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." if $LicenseRequired$ = "true" comment "Licensing required, reserve license and get license key" diff --git a/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins b/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins index ad171cd..9ed754e 100644 --- a/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins +++ b/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins @@ -15,6 +15,9 @@ DefVar $ProductId$ DefVar $InstallDir$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -39,7 +42,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins index 2062b7b..6bc6521 100644 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins +++ b/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins @@ -6,7 +6,12 @@ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." if FileExists($IniFile$) Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -31,6 +36,9 @@ Registry_uninstall /32Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_msi_old] +msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi] msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins index f672b09..7f7d6e3 100644 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins +++ b/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins @@ -14,6 +14,9 @@ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -46,14 +49,14 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub32.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub32.ins" endif - Message "Installing " + $ProductId$ + " ..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins index cce29f5..1adeaf6 100644 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins +++ b/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins @@ -13,6 +13,9 @@ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductId$ DefVar $InstallDir$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -35,7 +38,7 @@ Set $InstallDir$ = "%ProgramFiles32Dir%\" Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins b/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins index 12c2eac..1411c6c 100644 --- a/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins +++ b/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins @@ -5,14 +5,29 @@ Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" +Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" +Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $UninstallProgramOld32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe") + if FileExists($UninstallProgramOld32$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_32 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram32$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_32 @@ -26,8 +41,21 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif 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..." + if FileExists($IniFile64$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." + if FileExists($IniFile64$) + Set $UninstallProgramOld64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe") + if FileExists($UninstallProgramOld64$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_64 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram64$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_64 @@ -43,6 +71,17 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old_32] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld32$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall_32] ; Choose one of the following examples as basis for program uninstall ; @@ -54,12 +93,22 @@ LinkFolder_uninstall ; === Inno Setup ======================================================================================== ; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - [Files_uninstall_32] ; Example for recursively deleting the installation directory (don't forget the trailing backslash): ; ; delete -sf "$InstallDir32$\" +[Winbatch_uninstall_old_64] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld64$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall_64] ; Choose one of the following examples as basis for program uninstall ; @@ -71,6 +120,11 @@ LinkFolder_uninstall ; === Inno Setup ======================================================================================== ; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel +[Winbatch_uninstall_msi_old_64] +msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress + +[Winbatch_uninstall_msi_64] +msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress [Files_uninstall_64] ; Example for recursively deleting the installation directory: diff --git a/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins b/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins index a3a54b0..0c8ce73 100644 --- a/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins +++ b/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins @@ -7,8 +7,10 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -22,6 +24,9 @@ DefVar $LicenseKey$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -60,7 +65,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" @@ -75,7 +80,7 @@ else comment "installing" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_32 @@ -89,7 +94,7 @@ else endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_64 diff --git a/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins index 56e084a..e71f965 100644 --- a/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins +++ b/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins @@ -7,8 +7,10 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -20,6 +22,9 @@ DefVar $LicenseRequired$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -48,7 +53,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins index 12c2eac..1411c6c 100644 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins +++ b/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins @@ -5,14 +5,29 @@ Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" +Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" +Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $UninstallProgramOld32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe") + if FileExists($UninstallProgramOld32$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_32 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram32$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_32 @@ -26,8 +41,21 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif 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..." + if FileExists($IniFile64$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." + if FileExists($IniFile64$) + Set $UninstallProgramOld64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe") + if FileExists($UninstallProgramOld64$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_64 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram64$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_64 @@ -43,6 +71,17 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old_32] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld32$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall_32] ; Choose one of the following examples as basis for program uninstall ; @@ -54,12 +93,22 @@ LinkFolder_uninstall ; === Inno Setup ======================================================================================== ; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - [Files_uninstall_32] ; Example for recursively deleting the installation directory (don't forget the trailing backslash): ; ; delete -sf "$InstallDir32$\" +[Winbatch_uninstall_old_64] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld64$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall_64] ; Choose one of the following examples as basis for program uninstall ; @@ -71,6 +120,11 @@ LinkFolder_uninstall ; === Inno Setup ======================================================================================== ; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel +[Winbatch_uninstall_msi_old_64] +msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress + +[Winbatch_uninstall_msi_64] +msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress [Files_uninstall_64] ; Example for recursively deleting the installation directory: diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins index 80bba26..766dcad 100644 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins +++ b/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins @@ -7,8 +7,10 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -19,6 +21,9 @@ DefVar $InstallDir64$ DefVar $ExitCode$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -55,7 +60,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" @@ -65,7 +70,7 @@ else comment "installing" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_32 @@ -79,7 +84,7 @@ else endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_64 diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins index 708d9c6..e6c3eab 100644 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins +++ b/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins @@ -7,8 +7,10 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -18,6 +20,9 @@ DefVar $InstallDir32$ DefVar $InstallDir64$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -44,7 +49,7 @@ Set $InstallDir64$ = "%ProgramFiles64Dir%\" Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins b/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins index 6780aa8..21e86b6 100644 --- a/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins +++ b/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins @@ -9,7 +9,12 @@ Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." if FileExists($IniFile32$) Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -19,7 +24,6 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif sub_check_exitcode endif endif - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi_32 @@ -33,7 +37,12 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif 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..." + if FileExists($IniFile64$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." if FileExists($IniFile64$) Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -43,7 +52,6 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe sub_check_exitcode endif endif - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi_64 @@ -59,6 +67,9 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_msi_old_32] +msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi_32] msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress @@ -67,6 +78,9 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress ; ; delete -sf "$InstallDir32$\" +[Winbatch_uninstall_msi_old_64] +msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi_64] msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress diff --git a/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins b/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins index 2beb21d..7746cf1 100644 --- a/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins +++ b/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins @@ -22,6 +22,9 @@ DefVar $LicenseKey$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -60,7 +63,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" @@ -75,7 +78,7 @@ else comment "installing" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_32 @@ -89,7 +92,7 @@ else endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." + Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_64 diff --git a/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins index a28a3dd..30c17d9 100644 --- a/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins +++ b/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins @@ -20,6 +20,9 @@ DefVar $LicenseRequired$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -48,7 +51,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins index 6780aa8..21e86b6 100644 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins +++ b/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins @@ -9,7 +9,12 @@ Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." if FileExists($IniFile32$) Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -19,7 +24,6 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif sub_check_exitcode endif endif - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi_32 @@ -33,7 +37,12 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif 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..." + if FileExists($IniFile64$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." if FileExists($IniFile64$) Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -43,7 +52,6 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe sub_check_exitcode endif endif - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi_64 @@ -59,6 +67,9 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_msi_old_32] +msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi_32] msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress @@ -67,6 +78,9 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress ; ; delete -sf "$InstallDir32$\" +[Winbatch_uninstall_msi_old_64] +msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi_64] msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini index a92d90f..978f02e 100644 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini +++ b/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini @@ -1,7 +1,9 @@ [X86] +MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} [X86_64] +MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} [COMMON] diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins index 037d7c0..f9f4d25 100644 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins +++ b/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins @@ -19,6 +19,9 @@ DefVar $InstallDir64$ DefVar $ExitCode$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -45,6 +48,8 @@ Set $MinimumSpace$ = "1 MB" ; the path were we find the product after the installation Set $InstallDir32$ = "%ProgramFiles32Dir%\" Set $InstallDir64$ = "%ProgramFiles64Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" @@ -55,7 +60,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" @@ -65,7 +70,7 @@ else comment "installing" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_32 @@ -79,7 +84,7 @@ else endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." + Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_64 diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins index 852286e..dc7df0b 100644 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins +++ b/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins @@ -18,6 +18,9 @@ DefVar $InstallDir32$ DefVar $InstallDir64$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -44,7 +47,7 @@ Set $InstallDir64$ = "%ProgramFiles64Dir%\" Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins b/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins index a67e86a..fa0dc29 100644 --- a/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins +++ b/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins @@ -5,15 +5,30 @@ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" +Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +if FileExists($IniFile$) + Set $UninstallProgramOld$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif +endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall sub_check_exitcode endif + comment "Delete files" Files_uninstall /64Bit @@ -23,6 +38,17 @@ Registry_uninstall /64Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; diff --git a/sample/64bit/installer/license/CLIENT_DATA/setup64.ins b/sample/64bit/installer/license/CLIENT_DATA/setup64.ins index 0a0e689..8c40345 100644 --- a/sample/64bit/installer/license/CLIENT_DATA/setup64.ins +++ b/sample/64bit/installer/license/CLIENT_DATA/setup64.ins @@ -7,6 +7,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -17,6 +18,9 @@ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -51,7 +55,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub64.ins") comment "Start uninstall sub section" diff --git a/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins b/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins index 263f773..e5e5bba 100644 --- a/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins +++ b/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins @@ -7,6 +7,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -15,6 +16,9 @@ DefVar $ProductId$ DefVar $InstallDir$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -39,7 +43,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins index a67e86a..fa0dc29 100644 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins +++ b/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins @@ -5,15 +5,30 @@ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" +Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +if FileExists($IniFile$) + Set $UninstallProgramOld$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif +endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall sub_check_exitcode endif + comment "Delete files" Files_uninstall /64Bit @@ -23,6 +38,17 @@ Registry_uninstall /64Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins index d2309ae..79674d2 100644 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins +++ b/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins @@ -7,6 +7,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -14,6 +15,9 @@ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -46,7 +50,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub64.ins") comment "Start uninstall sub section" diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins index cec2eef..aa1b813 100644 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins +++ b/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins @@ -7,12 +7,16 @@ requiredWinstVersion >= "4.11.2.6" DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductId$ DefVar $InstallDir$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -35,7 +39,7 @@ Set $InstallDir$ = "%ProgramFiles64Dir%\" Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." @@ -44,23 +48,3 @@ if FileExists("%ScriptPath%\delsub64.ins") Sub "%ScriptPath%\delsub64.ins" endif -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins b/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins index 17779d3..43e5baa 100644 --- a/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins +++ b/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins @@ -6,7 +6,12 @@ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." if FileExists($IniFile$) Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -31,6 +36,9 @@ Registry_uninstall /64Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_msi_old] +msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi] msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress diff --git a/sample/64bit/msi/license/CLIENT_DATA/setup64.ins b/sample/64bit/msi/license/CLIENT_DATA/setup64.ins index 418b02e..e78e1ff 100644 --- a/sample/64bit/msi/license/CLIENT_DATA/setup64.ins +++ b/sample/64bit/msi/license/CLIENT_DATA/setup64.ins @@ -17,6 +17,9 @@ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -51,7 +54,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub64.ins") comment "Start uninstall sub section" diff --git a/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins b/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins index 5462fb9..62eb53d 100644 --- a/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins +++ b/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins @@ -15,6 +15,9 @@ DefVar $ProductId$ DefVar $InstallDir$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -39,7 +42,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins index 17779d3..43e5baa 100644 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins +++ b/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins @@ -6,7 +6,12 @@ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." if FileExists($IniFile$) Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") @@ -31,6 +36,9 @@ Registry_uninstall /64Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_msi_old] +msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi] msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins index 14391e5..14e3591 100644 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins +++ b/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins @@ -14,6 +14,9 @@ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -46,7 +49,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub64.ins") comment "Start uninstall sub section" diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins index 1262a6b..bd43c20 100644 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins +++ b/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins @@ -13,6 +13,9 @@ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductId$ DefVar $InstallDir$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -30,12 +33,14 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; - Please edit the following values - ; ---------------------------------------------------------------- Set $InstallDir$ = "%ProgramFiles64Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/All/CLIENT_DATA/delsub32.ins b/sample/All/CLIENT_DATA/delsub32.ins index 878c966..f8dbedd 100644 --- a/sample/All/CLIENT_DATA/delsub32.ins +++ b/sample/All/CLIENT_DATA/delsub32.ins @@ -4,16 +4,31 @@ ; credits: http://www.opsi.org/en/credits/ +Set $UninstallProgramOld$ = $InstallDir$ + $UninstallProg$ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +if FileExists($IniFile$) + Set $UninstallProgramOld$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif +endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall sub_check_exitcode endif + if FileExists($IniFile$) Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") @@ -37,6 +52,18 @@ Registry_uninstall /32Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + + [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; @@ -49,6 +76,9 @@ LinkFolder_uninstall ; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel +[Winbatch_uninstall_msi_old] +msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi] msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress diff --git a/sample/All/CLIENT_DATA/delsub3264.ins b/sample/All/CLIENT_DATA/delsub3264.ins index 5c8fb5c..078a9bb 100644 --- a/sample/All/CLIENT_DATA/delsub3264.ins +++ b/sample/All/CLIENT_DATA/delsub3264.ins @@ -5,14 +5,29 @@ Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" +Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" +Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." + if FileExists($IniFile32$) + Set $UninstallProgramOld32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe") + if FileExists($UninstallProgramOld32$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_32 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram32$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_32 @@ -41,8 +56,21 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif 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..." + if FileExists($IniFile64$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + endif + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." + if FileExists($IniFile64$) + Set $UninstallProgramOld64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe") + if FileExists($UninstallProgramOld64$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_64 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram64$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_64 @@ -73,6 +101,17 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old_32] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld32$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall_32] ; Choose one of the following examples as basis for program uninstall ; @@ -85,6 +124,9 @@ LinkFolder_uninstall ; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel +[Winbatch_uninstall_msi_old_32] +msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi_32] msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress @@ -93,6 +135,17 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress ; ; delete -sf "$InstallDir32$\" +[Winbatch_uninstall_old_64] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld64$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall_64] ; Choose one of the following examples as basis for program uninstall ; @@ -104,6 +157,8 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress ; === Inno Setup ======================================================================================== ; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel +[Winbatch_uninstall_msi_old_64] +msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress [Winbatch_uninstall_msi_64] msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress diff --git a/sample/All/CLIENT_DATA/delsub64.ins b/sample/All/CLIENT_DATA/delsub64.ins index 891faba..e5510cd 100644 --- a/sample/All/CLIENT_DATA/delsub64.ins +++ b/sample/All/CLIENT_DATA/delsub64.ins @@ -5,15 +5,30 @@ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" +Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" -Message "Uninstalling " + $ProductId$ + " ..." +if FileExists($IniFile$) + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") +endif +Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +if FileExists($IniFile$) + Set $UninstallProgramOld$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif +endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall sub_check_exitcode endif + if FileExists($IniFile$) Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") @@ -37,6 +52,17 @@ Registry_uninstall /64Bit comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgramOld$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; @@ -49,6 +75,9 @@ LinkFolder_uninstall ; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel +[Winbatch_uninstall_msi_old] +msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress + [Winbatch_uninstall_msi] msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress diff --git a/sample/All/CLIENT_DATA/setup32.ins b/sample/All/CLIENT_DATA/setup32.ins index 9393b91..a9afa4c 100644 --- a/sample/All/CLIENT_DATA/setup32.ins +++ b/sample/All/CLIENT_DATA/setup32.ins @@ -8,6 +8,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $MsiIdOld$ DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -18,6 +19,9 @@ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -52,14 +56,14 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub32.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub32.ins" endif - Message "Installing " + $ProductId$ + " ..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." if $LicenseRequired$ = "true" comment "Licensing required, reserve license and get license key" diff --git a/sample/All/CLIENT_DATA/setup3264.ins b/sample/All/CLIENT_DATA/setup3264.ins index 80e7e84..0b41e43 100644 --- a/sample/All/CLIENT_DATA/setup3264.ins +++ b/sample/All/CLIENT_DATA/setup3264.ins @@ -8,9 +8,11 @@ requiredWinstVersion >= "4.11.2.6" DefVar $MsiIdOld32$ DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $MsiIdOld64$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -24,6 +26,9 @@ DefVar $LicenseKey$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -62,7 +67,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" @@ -77,7 +82,7 @@ else comment "installing" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_32 @@ -91,7 +96,7 @@ else endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install_64 diff --git a/sample/All/CLIENT_DATA/setup64.ins b/sample/All/CLIENT_DATA/setup64.ins index 9acc0b4..e3172b4 100644 --- a/sample/All/CLIENT_DATA/setup64.ins +++ b/sample/All/CLIENT_DATA/setup64.ins @@ -8,6 +8,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $MsiIdOld$ DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -18,6 +19,9 @@ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -52,7 +56,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed else comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ if FileExists("%ScriptPath%\delsub64.ins") comment "Start uninstall sub section" diff --git a/sample/All/CLIENT_DATA/uninstall32.ins b/sample/All/CLIENT_DATA/uninstall32.ins index db7b6bb..c040138 100644 --- a/sample/All/CLIENT_DATA/uninstall32.ins +++ b/sample/All/CLIENT_DATA/uninstall32.ins @@ -8,6 +8,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $MsiIdOld$ DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -16,6 +17,9 @@ DefVar $ProductId$ DefVar $InstallDir$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -40,7 +44,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/All/CLIENT_DATA/uninstall3264.ins b/sample/All/CLIENT_DATA/uninstall3264.ins index 8a70609..b575698 100644 --- a/sample/All/CLIENT_DATA/uninstall3264.ins +++ b/sample/All/CLIENT_DATA/uninstall3264.ins @@ -8,9 +8,11 @@ requiredWinstVersion >= "4.11.2.6" DefVar $MsiIdOld32$ DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $MsiIdOld64$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -22,6 +24,9 @@ DefVar $LicenseRequired$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -50,7 +55,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." diff --git a/sample/All/CLIENT_DATA/uninstall64.ins b/sample/All/CLIENT_DATA/uninstall64.ins index 9b0fcfc..d81dd62 100644 --- a/sample/All/CLIENT_DATA/uninstall64.ins +++ b/sample/All/CLIENT_DATA/uninstall64.ins @@ -8,6 +8,7 @@ requiredWinstVersion >= "4.11.2.6" DefVar $MsiIdOld$ DefVar $UninstallProgram$ +DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ DefVar $LogDir$ @@ -16,6 +17,9 @@ DefVar $ProductId$ DefVar $InstallDir$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $OLD_VERSION$ +DefVar $OLD_CREATOR_TAG$ +DefVar $OLD_RELEASE$ Set $LogDir$ = "%SystemDrive%\tmp" @@ -40,7 +44,7 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..."