add new winst vars

This commit is contained in:
Mario Fetka 2016-08-28 08:30:09 +02:00
parent 8086ef2e2f
commit 4ccb996da4
3 changed files with 7 additions and 13 deletions

View File

@ -13,18 +13,16 @@ 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",$MsiIdNameHelpDe32$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $MsiIdOldHelpDe32$ = GetValueFromInifile($IniFile32$,"X86","MsiIdHelpDe32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOldHelpDe32$ + "] DisplayName") = "")
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",$MsiIdName32$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{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
@ -53,19 +51,17 @@ 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",$MsiIdNameHelpDe64$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $MsiIdOldHelpDe64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiIdHelpDe64","{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",$MsiIdName64$,"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{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

View File

@ -7,8 +7,10 @@
requiredWinstVersion >= "4.11.2.6"
DefVar $MsiIdOld32$
DefVar $IniFile32$
DefVar $MsiIdOldHelpDe32$
DefVar $MsiIdOld64$
DefVar $MsiIdOldHelpDe64$
DefVar $IniFile32$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$

View File

@ -6,10 +6,6 @@
[Actions]
requiredWinstVersion >= "4.11.2.6"
DefVar $MsiIdName32$
DefVar $MsiIdNameHelpDe32$
DefVar $MsiIdName64$
DefVar $MsiIdNameHelpDe64$
DefVar $MsiIdOld32$
DefVar $MsiIdOldHelpDe32$
DefVar $MsiIdOld64$