diff options
Diffstat (limited to 'src/burn/engine/exeengine.cpp')
-rw-r--r-- | src/burn/engine/exeengine.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/burn/engine/exeengine.cpp b/src/burn/engine/exeengine.cpp index ef0015ac..b4898d42 100644 --- a/src/burn/engine/exeengine.cpp +++ b/src/burn/engine/exeengine.cpp | |||
@@ -1040,6 +1040,7 @@ static HRESULT DetectArpEntry( | |||
1040 | { | 1040 | { |
1041 | HRESULT hr = S_OK; | 1041 | HRESULT hr = S_OK; |
1042 | HKEY hKey = NULL; | 1042 | HKEY hKey = NULL; |
1043 | BOOL fExists = FALSE; | ||
1043 | VERUTIL_VERSION* pVersion = NULL; | 1044 | VERUTIL_VERSION* pVersion = NULL; |
1044 | int nCompareResult = 0; | 1045 | int nCompareResult = 0; |
1045 | HKEY hkRoot = pPackage->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 1046 | HKEY hkRoot = pPackage->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
@@ -1052,18 +1053,20 @@ static HRESULT DetectArpEntry( | |||
1052 | } | 1053 | } |
1053 | 1054 | ||
1054 | hr = RegOpenEx(hkRoot, pPackage->Exe.sczArpKeyPath, KEY_READ, keyBitness, &hKey); | 1055 | hr = RegOpenEx(hkRoot, pPackage->Exe.sczArpKeyPath, KEY_READ, keyBitness, &hKey); |
1055 | if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr || HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr) | 1056 | ExitOnPathFailure(hr, fExists, "Failed to open registry key: %ls.", pPackage->Exe.sczArpKeyPath); |
1057 | |||
1058 | if (!fExists) | ||
1056 | { | 1059 | { |
1057 | ExitFunction1(hr = S_OK); | 1060 | ExitFunction(); |
1058 | } | 1061 | } |
1059 | ExitOnFailure(hr, "Failed to open registry key: %ls.", pPackage->Exe.sczArpKeyPath); | ||
1060 | 1062 | ||
1061 | hr = RegReadWixVersion(hKey, L"DisplayVersion", &pVersion); | 1063 | hr = RegReadWixVersion(hKey, L"DisplayVersion", &pVersion); |
1062 | if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr) | 1064 | ExitOnPathFailure(hr, fExists, "Failed to read DisplayVersion."); |
1065 | |||
1066 | if (!fExists) | ||
1063 | { | 1067 | { |
1064 | ExitFunction1(hr = S_OK); | 1068 | ExitFunction(); |
1065 | } | 1069 | } |
1066 | ExitOnFailure(hr, "Failed to read DisplayVersion."); | ||
1067 | 1070 | ||
1068 | if (pVersion->fInvalid) | 1071 | if (pVersion->fInvalid) |
1069 | { | 1072 | { |
@@ -1089,11 +1092,7 @@ static HRESULT DetectArpEntry( | |||
1089 | if (psczQuietUninstallString) | 1092 | if (psczQuietUninstallString) |
1090 | { | 1093 | { |
1091 | hr = RegReadString(hKey, L"QuietUninstallString", psczQuietUninstallString); | 1094 | hr = RegReadString(hKey, L"QuietUninstallString", psczQuietUninstallString); |
1092 | if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr) | 1095 | ExitOnPathFailure(hr, fExists, "Failed to read QuietUninstallString."); |
1093 | { | ||
1094 | hr = S_OK; | ||
1095 | } | ||
1096 | ExitOnFailure(hr, "Failed to read QuietUninstallString."); | ||
1097 | } | 1096 | } |
1098 | 1097 | ||
1099 | LExit: | 1098 | LExit: |