unistall 32bit package on 64bit system
This commit is contained in:
parent
fc90060b4e
commit
2bf0b6a3db
|
@ -17,6 +17,13 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
|||
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..."
|
||||
|
||||
if FileExists($IniFile32$)
|
||||
Set $MsiIdLegacy32$ = GetValueFromInifile($IniFile32$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdLegacy32$ + "] DisplayName") = "")
|
||||
comment "Legacy MSI id " + $MsiIdLegacy32$ + " found in registry, starting msiexec to uninstall Legacy version"
|
||||
Winbatch_uninstall_msi_legacy_32
|
||||
sub_check_exitcode
|
||||
set $Reboot$="1"
|
||||
endif
|
||||
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"
|
||||
|
@ -46,7 +53,23 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
endif
|
||||
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..."
|
||||
|
||||
if FileExists($IniFile32$)
|
||||
Set $MsiIdLegacy64$ = GetValueFromInifile($IniFile32$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdLegacy64$ + "] DisplayName") = "")
|
||||
comment "Legacy MSI id " + $MsiIdLegacy64$ + " found in registry, starting msiexec to uninstall Legacy version"
|
||||
Winbatch_uninstall_msi_legacy_64
|
||||
sub_check_exitcode
|
||||
set $Reboot$="1"
|
||||
endif
|
||||
endif
|
||||
if FileExists($IniFile64$)
|
||||
Set $MsiIdLegacy64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdLegacy64$ + "] DisplayName") = "")
|
||||
comment "Legacy MSI id " + $MsiIdLegacy64$ + " found in registry, starting msiexec to uninstall Legacy version"
|
||||
Winbatch_uninstall_msi_legacy_64
|
||||
sub_check_exitcode
|
||||
set $Reboot$="1"
|
||||
endif
|
||||
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"
|
||||
|
@ -75,6 +98,9 @@ if $Reboot$="1"
|
|||
ExitWindows /ImmediateReboot
|
||||
endif
|
||||
|
||||
[Winbatch_uninstall_msi_legacy_32]
|
||||
msiexec /x $MsiIdLegacy32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_old_32]
|
||||
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
@ -86,6 +112,9 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
|
|||
;
|
||||
delete -sf "$InstallDir32$\"
|
||||
|
||||
[Winbatch_uninstall_msi_legacy_64]
|
||||
msiexec /x $MsiIdLegacy64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_old_64]
|
||||
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
[Actions]
|
||||
requiredWinstVersion >= "4.11.2.6"
|
||||
|
||||
DefVar $MsiIdLegacy32$
|
||||
DefVar $MsiIdOld32$
|
||||
DefVar $IniFile32$
|
||||
DefVar $MsiIdLegacy64$
|
||||
DefVar $MsiIdOld64$
|
||||
DefVar $IniFile64$
|
||||
DefVar $IniCfgFile$
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
[Actions]
|
||||
requiredWinstVersion >= "4.11.2.6"
|
||||
|
||||
DefVar $MsiIdLegacy32$
|
||||
DefVar $MsiIdOld32$
|
||||
DefVar $IniFile32$
|
||||
DefVar $MsiIdLegacy64$
|
||||
DefVar $MsiIdOld64$
|
||||
DefVar $IniFile64$
|
||||
DefVar $IniCfgFile$
|
||||
|
|
Loading…
Reference in New Issue