From 8086ef2e2fa77de2e0a3ca0f22b01b902dfd2e19 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 27 Aug 2016 22:22:40 +0200 Subject: [PATCH] add new winst vars --- CLIENT_DATA/delsub3264.ins | 14 +++++++++----- CLIENT_DATA/uninstall3264.ins | 8 +++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CLIENT_DATA/delsub3264.ins b/CLIENT_DATA/delsub3264.ins index 2bd45aa..a9ef258 100644 --- a/CLIENT_DATA/delsub3264.ins +++ b/CLIENT_DATA/delsub3264.ins @@ -13,16 +13,18 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + Set $MsiIdNameHelpDe32$ = GetValueFromInifile($IniFile32$,"X86","MsiIdHelpDe32","MsiIdHelpDe") + Set $MsiIdName32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","MsiId") endif Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." if FileExists($IniFile32$) - Set $MsiIdOldHelpDe32$ = GetValueFromInifile($IniFile32$,"X86","MsiIdHelpDe32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + Set $MsiIdOldHelpDe32$ = GetValueFromInifile($IniFile32$,"X86",$MsiIdNameHelpDe32$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOldHelpDe32$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" + comment "Old MSI id " + $MsiIdOldHelpDe32$ + " found in registry, starting msiexec to uninstall old version" Winbatch_uninstall_msi_old_help_de_32 sub_check_exitcode endif - Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86",$MsiIdName32$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" Winbatch_uninstall_msi_old_32 @@ -51,17 +53,19 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + Set $MsiIdNameHelpDe64$ = GetValueFromInifile($IniFile32$,"X86_64","MsiIdHelpDe64","MsiIdHelpDe") + Set $MsiIdName64$ = GetValueFromInifile($IniFile32$,"X86","MsiId64","MsiId") endif Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." if FileExists($IniFile64$) - Set $MsiIdOldHelpDe64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiIdHelpDe64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + Set $MsiIdOldHelpDe64$ = GetValueFromInifile($IniFile64$,"X86_64",$MsiIdNameHelpDe64$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOldHelpDe64$ + "] DisplayName") = "") comment "Old MSI id " + $MsiIdOldHelpDe64$ + " found in registry, starting msiexec to uninstall old version" Winbatch_uninstall_msi_old_help_de_64 sub_check_exitcode endif - Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64",$MsiIdName64$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" Winbatch_uninstall_msi_old_64 diff --git a/CLIENT_DATA/uninstall3264.ins b/CLIENT_DATA/uninstall3264.ins index 122aaa0..30f8623 100644 --- a/CLIENT_DATA/uninstall3264.ins +++ b/CLIENT_DATA/uninstall3264.ins @@ -6,9 +6,15 @@ [Actions] requiredWinstVersion >= "4.11.2.6" +DefVar $MsiIdName32$ +DefVar $MsiIdNameHelpDe32$ +DefVar $MsiIdName64$ +DefVar $MsiIdNameHelpDe64$ DefVar $MsiIdOld32$ -DefVar $IniFile32$ +DefVar $MsiIdOldHelpDe32$ DefVar $MsiIdOld64$ +DefVar $MsiIdOldHelpDe64$ +DefVar $IniFile32$ DefVar $IniFile64$ DefVar $IniCfgFile$ DefVar $LogDir$