diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-11-01 17:08:51 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-11-01 18:35:01 -0600 |
| commit | d70b0710ba8ae05a5018ce96967f1cf7a7f717f5 (patch) | |
| tree | 95f6d0fadaa7ab93e0c3265fd4c766d89f0dc080 /src/engine | |
| parent | 352aefb0ac67ffbf74cd126db710031d4944fe89 (diff) | |
| download | wix-d70b0710ba8ae05a5018ce96967f1cf7a7f717f5.tar.gz wix-d70b0710ba8ae05a5018ce96967f1cf7a7f717f5.tar.bz2 wix-d70b0710ba8ae05a5018ce96967f1cf7a7f717f5.zip | |
WIXFEAT:5355 - Don't clear variable for missing key or value.
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/search.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/engine/search.cpp b/src/engine/search.cpp index 065003c7..6d5f8d49 100644 --- a/src/engine/search.cpp +++ b/src/engine/search.cpp | |||
| @@ -946,8 +946,7 @@ static HRESULT RegistrySearchValue( | |||
| 946 | { | 946 | { |
| 947 | // What if there is a hidden variable in sczKey? | 947 | // What if there is a hidden variable in sczKey? |
| 948 | LogStringLine(REPORT_STANDARD, "Registry key not found. Key = '%ls'", sczKey); | 948 | LogStringLine(REPORT_STANDARD, "Registry key not found. Key = '%ls'", sczKey); |
| 949 | hr = VariableSetVariant(pVariables, pSearch->sczVariable, &value); | 949 | |
| 950 | ExitOnFailure(hr, "Failed to clear variable."); | ||
| 951 | ExitFunction1(hr = S_OK); | 950 | ExitFunction1(hr = S_OK); |
| 952 | } | 951 | } |
| 953 | ExitOnFailure(hr, "Failed to open registry key."); | 952 | ExitOnFailure(hr, "Failed to open registry key."); |
| @@ -958,8 +957,7 @@ static HRESULT RegistrySearchValue( | |||
| 958 | { | 957 | { |
| 959 | // What if there is a hidden variable in sczKey or sczValue? | 958 | // What if there is a hidden variable in sczKey or sczValue? |
| 960 | LogStringLine(REPORT_STANDARD, "Registry value not found. Key = '%ls', Value = '%ls'", sczKey, sczValue); | 959 | LogStringLine(REPORT_STANDARD, "Registry value not found. Key = '%ls', Value = '%ls'", sczKey, sczValue); |
| 961 | hr = VariableSetVariant(pVariables, pSearch->sczVariable, &value); | 960 | |
| 962 | ExitOnFailure(hr, "Failed to clear variable."); | ||
| 963 | ExitFunction1(hr = S_OK); | 961 | ExitFunction1(hr = S_OK); |
| 964 | } | 962 | } |
| 965 | ExitOnWin32Error(er, hr, "Failed to query registry key value size."); | 963 | ExitOnWin32Error(er, hr, "Failed to query registry key value size."); |
