add support for uninstall old release
This commit is contained in:
parent
89e4b5880a
commit
b40f4bcf4a
|
@ -4,13 +4,21 @@
|
|||
; credits: http://www.opsi.org/credits/
|
||||
|
||||
|
||||
Set $MsiId32$ = '{A75BDD40-6540-4922-BFF7-D9DCCECAD714}'
|
||||
Set $MsiId32Old$ = '{A75BDD40-6540-4922-BFF7-D9DCCECAD714}'
|
||||
Set $MsiId32$ = '{1E972AFA-D546-49F4-BF8F-86F168AC2498}'
|
||||
|
||||
Set $MsiId64Old$ = '{3DA00A00-C3E9-4064-B62C-CAD25EAF0B6A}'
|
||||
Set $MsiId64$ = '{3DA00A00-C3E9-4064-B62C-CAD25EAF0B6A}'
|
||||
|
||||
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 not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32Old$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId32Old$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_32_old
|
||||
sub_check_exitcode
|
||||
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
|
||||
|
@ -32,6 +40,12 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64Old$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId64Old$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_64_old
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
comment "Delete files"
|
||||
Files_uninstall_64 /64Bit
|
||||
comment "Cleanup registry"
|
||||
|
@ -41,6 +55,9 @@ endif
|
|||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
[Winbatch_uninstall_msi_32_old]
|
||||
msiexec /x $MsiId32Old$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_32]
|
||||
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
@ -49,6 +66,9 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
|
|||
;
|
||||
; delete -sf "$InstallDir32$\"
|
||||
|
||||
[Winbatch_uninstall_msi_64_old]
|
||||
msiexec /x $MsiId64Old$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_64]
|
||||
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
[Actions]
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId32Old$
|
||||
DefVar $MsiId32$
|
||||
DefVar $MsiId64Old$
|
||||
DefVar $MsiId64$
|
||||
DefVar $LogDir$
|
||||
DefVar $ProductId$
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
[Actions]
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId32Old$
|
||||
DefVar $MsiId32$
|
||||
DefVar $MsiId64Old$
|
||||
DefVar $MsiId64$
|
||||
DefVar $LogDir$
|
||||
DefVar $ExitCode$
|
||||
|
|
Loading…
Reference in New Issue