add msi workaround
This commit is contained in:
parent
bbb05ebfb8
commit
f36398a766
@ -18,6 +18,20 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
||||
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}")
|
||||
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
|
||||
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
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if FileExists($IniFile32$)
|
||||
Set $UninstallProg32$ = GetValueFromInifile($IniFile32$,"X86","UninstallProg32","XXXXXXXX.exe")
|
||||
Set $OlduVersion32$ = GetValueFromInifile($IniFile32$,"COMMON","uVersion","0.0.0")
|
||||
@ -58,6 +72,20 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
||||
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}")
|
||||
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
|
||||
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
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if FileExists($IniFile64$)
|
||||
Set $UninstallProg64$ = GetValueFromInifile($IniFile64$,"X86_64","UninstallProg64","XXXXXXXX.exe")
|
||||
Set $OlduVersion64$ = GetValueFromInifile($IniFile64$,"COMMON","uVersion","0.0.0")
|
||||
Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$
|
||||
@ -91,6 +119,12 @@ 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
|
||||
|
||||
[Winbatch_uninstall_old_32]
|
||||
"$RealUninstallProgramm32$" "$UninstallProgramOld32$"
|
||||
|
||||
@ -102,6 +136,12 @@ LinkFolder_uninstall
|
||||
;
|
||||
delete -sf "$InstallDir32$\"
|
||||
|
||||
[Winbatch_uninstall_msi_old_64]
|
||||
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_64]
|
||||
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_old_64]
|
||||
"$RealUninstallProgramm64$" "$UninstallProgramOld64$"
|
||||
|
||||
|
@ -48,6 +48,14 @@ OPSI_INI_SECTION[2]="X86_64"
|
||||
OPSI_INI_OPTION[2]="UninstallProg64"
|
||||
OPSI_INI_VALUE[2]="${a[0]}.${a[1]}.${a[2]}\uninstall.exe"
|
||||
|
||||
OPSI_INI_SECTION[3]="X86"
|
||||
OPSI_INI_OPTION[3]="MsiId32"
|
||||
OPSI_INI_VALUE[3]="{A6EE99EA-420C-4FA6-8A7C-FDB60D278855}"
|
||||
|
||||
OPSI_INI_SECTION[4]="X86_64"
|
||||
OPSI_INI_OPTION[4]="MsiId64"
|
||||
OPSI_INI_VALUE[4]="{82CD33B2-1DE6-4663-B6F0-1592B2376F78}"
|
||||
|
||||
WINST_NAME[0]="RealUninstallProgramm32"
|
||||
WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[1]@\\immunet-uninstall32.exe"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user