Check for both 32 and 64bit cockatrice when uninstalling (#3323)
This commit is contained in:
parent
c01aad6767
commit
b61c07a205
1 changed files with 27 additions and 5 deletions
|
@ -154,17 +154,39 @@ FunctionEnd
|
||||||
Function componentsPagePre
|
Function componentsPagePre
|
||||||
${If} $PortableMode = 0
|
${If} $PortableMode = 0
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
|
||||||
StrCmp $R0 "" done
|
|
||||||
|
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst
|
# uninstall 32bit version
|
||||||
|
SetRegView 32
|
||||||
|
|
||||||
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||||
|
StrCmp $R0 "" done32
|
||||||
|
|
||||||
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
uninst:
|
uninst32:
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ExecWait "$R0"
|
ExecWait "$R0"
|
||||||
|
|
||||||
done:
|
done32:
|
||||||
|
|
||||||
|
# uninstall 64bit version
|
||||||
|
${If} ${NSIS_IS_64_BIT} == 1
|
||||||
|
SetRegView 64
|
||||||
|
|
||||||
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||||
|
StrCmp $R0 "" done64
|
||||||
|
|
||||||
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
|
||||||
|
Abort
|
||||||
|
|
||||||
|
uninst64:
|
||||||
|
ClearErrors
|
||||||
|
ExecWait "$R0"
|
||||||
|
|
||||||
|
done64:
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
${Else}
|
${Else}
|
||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
Loading…
Reference in a new issue