From 4fac8fca0e04b6d7f9be8c3cf90439f9f614cecf Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 4 Jun 2021 13:38:04 -0500 Subject: Fix loading BAFunctions. --- .../WixStandardBootstrapperApplication.cpp | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp') diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp index d4bf7b43..42dfb220 100644 --- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp @@ -3849,9 +3849,6 @@ private: // privates { HRESULT hr = S_OK; IXMLDOMNode* pBAFunctionsNode = NULL; - IXMLDOMNode* pPayloadNode = NULL; - LPWSTR sczPayloadId = NULL; - LPWSTR sczPayloadXPath = NULL; LPWSTR sczBafName = NULL; LPWSTR sczBafPath = NULL; BA_FUNCTIONS_CREATE_ARGS bafCreateArgs = { }; @@ -3865,21 +3862,8 @@ private: // privates ExitFunction(); } - hr = XmlGetAttributeEx(pBAFunctionsNode, L"PayloadId", &sczPayloadId); - BalExitOnFailure(hr, "Failed to get BAFunctions PayloadId."); - - hr = StrAllocFormatted(&sczPayloadXPath, L"/BootstrapperApplicationData/WixPayloadProperties[@Payload='%ls']", sczPayloadId); - BalExitOnFailure(hr, "Failed to format BAFunctions payload XPath."); - - hr = XmlSelectSingleNode(pixdManifest, sczPayloadXPath, &pPayloadNode); - if (S_FALSE == hr) - { - hr = E_NOTFOUND; - } - BalExitOnFailure(hr, "Failed to find WixPayloadProperties node for BAFunctions PayloadId: %ls.", sczPayloadId); - - hr = XmlGetAttributeEx(pPayloadNode, L"Name", &sczBafName); - BalExitOnFailure(hr, "Failed to get BAFunctions Name."); + hr = XmlGetAttributeEx(pBAFunctionsNode, L"FilePath", &sczBafName); + BalExitOnFailure(hr, "Failed to get BAFunctions FilePath."); hr = PathRelativeToModule(&sczBafPath, sczBafName, m_hModule); BalExitOnFailure(hr, "Failed to get path to BAFunctions DLL."); @@ -3912,10 +3896,7 @@ private: // privates } ReleaseStr(sczBafPath); ReleaseStr(sczBafName); - ReleaseStr(sczPayloadXPath); - ReleaseStr(sczPayloadId); ReleaseObject(pBAFunctionsNode); - ReleaseObject(pPayloadNode); return hr; } -- cgit v1.2.3-55-g6feb