NSIS: clear errors before checking WinPcap uninstall registry entry

Otherwise it can lead to a false verdict in after the check for Wireshark uninstall registry entry

Bug: 10867
Change-Id: I213ac8ffadfb3578b05d33b996540bd4330a0ec5
Reviewed-on: https://code.wireshark.org/review/11621
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2015-11-07 16:44:47 +01:00
parent 8ebc1084b2
commit cdcf27255a
1 changed files with 4 additions and 2 deletions

View File

@ -215,6 +215,9 @@ Var TMP_UNINSTALLER
; ============================================================================
!include x64.nsh
!include "GetWindowsVersion.nsh"
!include WinMessages.nsh
Function .onInit
!if ${WIRESHARK_TARGET_PLATFORM} == "win64"
; http://forums.winamp.com/printthread.php?s=16ffcdd04a8c8d52bee90c0cae273ac5&threadid=262873
@ -1200,8 +1203,6 @@ FunctionEnd
!endif
!include "GetWindowsVersion.nsh"
!include WinMessages.nsh
!include "VersionCompare.nsh"
Var WINPCAP_NAME ; DisplayName from WinPcap installation
@ -1224,6 +1225,7 @@ Function myShowCallback
WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" ""
!endif
ClearErrors
; detect if WinPcap should be installed
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Text" "Install WinPcap ${PCAP_DISPLAY_VERSION}"
ReadRegStr $WINPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"