summaryrefslogtreecommitdiff
path: root/src/ext/Bal/mbahost/mbahost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Bal/mbahost/mbahost.cpp')
-rw-r--r--src/ext/Bal/mbahost/mbahost.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/ext/Bal/mbahost/mbahost.cpp b/src/ext/Bal/mbahost/mbahost.cpp
index 735f9f21..a9585389 100644
--- a/src/ext/Bal/mbahost/mbahost.cpp
+++ b/src/ext/Bal/mbahost/mbahost.cpp
@@ -290,7 +290,7 @@ static HRESULT CheckSupportedFrameworks(
290 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, NULL))) 290 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, NULL)))
291 { 291 {
292 hr = XmlGetAttributeEx(pNode, L"version", &sczSupportedFrameworkVersion); 292 hr = XmlGetAttributeEx(pNode, L"version", &sczSupportedFrameworkVersion);
293 ExitOnFailure(hr, "Failed to get supportedFramework/@version."); 293 ExitOnRequiredXmlQueryFailure(hr, "Failed to get supportedFramework/@version.");
294 294
295 hr = StrAllocFormatted(&sczFrameworkRegistryKey, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\%ls", sczSupportedFrameworkVersion); 295 hr = StrAllocFormatted(&sczFrameworkRegistryKey, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\%ls", sczSupportedFrameworkVersion);
296 ExitOnFailure(hr, "Failed to allocate path to supported framework Install registry key."); 296 ExitOnFailure(hr, "Failed to allocate path to supported framework Install registry key.");
@@ -351,27 +351,23 @@ static HRESULT UpdateSupportedRuntime(
351 LPWSTR sczSupportedRuntimeVersion = NULL; 351 LPWSTR sczSupportedRuntimeVersion = NULL;
352 IXMLDOMNode* pixnStartup = NULL; 352 IXMLDOMNode* pixnStartup = NULL;
353 IXMLDOMNode* pixnSupportedRuntime = NULL; 353 IXMLDOMNode* pixnSupportedRuntime = NULL;
354 BOOL fXmlFound = FALSE;
354 355
355 *pfUpdatedManifest = FALSE; 356 *pfUpdatedManifest = FALSE;
356 357
357 // If the runtime version attribute is not specified, don't update the manifest. 358 // If the runtime version attribute is not specified, don't update the manifest.
358 hr = XmlGetAttributeEx(pixnSupportedFramework, L"runtimeVersion", &sczSupportedRuntimeVersion); 359 hr = XmlGetAttributeEx(pixnSupportedFramework, L"runtimeVersion", &sczSupportedRuntimeVersion);
359 if (E_NOTFOUND == hr) 360 ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get supportedFramework/@runtimeVersion.");
361
362 if (!fXmlFound)
360 { 363 {
361 ExitFunction1(hr = S_OK); 364 ExitFunction();
362 } 365 }
363 ExitOnFailure(hr, "Failed to get supportedFramework/@runtimeVersion.");
364 366
365 // Get the startup element. Fail if we can't find it since it'll be necessary to load the 367 // Get the startup element. Fail if we can't find it since it'll be necessary to load the
366 // correct runtime. 368 // correct runtime.
367 hr = XmlSelectSingleNode(pixdManifest, L"/configuration/startup", &pixnStartup); 369 hr = XmlSelectSingleNode(pixdManifest, L"/configuration/startup", &pixnStartup);
368 ExitOnFailure(hr, "Failed to get startup element."); 370 ExitOnRequiredXmlQueryFailure(hr, "Failed to get startup element.");
369
370 if (S_FALSE == hr)
371 {
372 hr = E_NOTFOUND;
373 ExitOnRootFailure(hr, "Failed to find startup element in bootstrapper application config.");
374 }
375 371
376 // Remove any pre-existing supported runtimes because they'll just get in the way and create our new one. 372 // Remove any pre-existing supported runtimes because they'll just get in the way and create our new one.
377 hr = XmlRemoveChildren(pixnStartup, L"supportedRuntime"); 373 hr = XmlRemoveChildren(pixnStartup, L"supportedRuntime");