diff options
Diffstat (limited to 'src/dnchost/dnchost.cpp')
| -rw-r--r-- | src/dnchost/dnchost.cpp | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/dnchost/dnchost.cpp b/src/dnchost/dnchost.cpp index 503537c0..8ca326fc 100644 --- a/src/dnchost/dnchost.cpp +++ b/src/dnchost/dnchost.cpp | |||
| @@ -169,9 +169,6 @@ static HRESULT LoadDncConfiguration( | |||
| 169 | HRESULT hr = S_OK; | 169 | HRESULT hr = S_OK; |
| 170 | IXMLDOMDocument* pixdManifest = NULL; | 170 | IXMLDOMDocument* pixdManifest = NULL; |
| 171 | IXMLDOMNode* pixnHost = NULL; | 171 | IXMLDOMNode* pixnHost = NULL; |
| 172 | IXMLDOMNode* pixnPayload = NULL; | ||
| 173 | LPWSTR sczPayloadId = NULL; | ||
| 174 | LPWSTR sczPayloadXPath = NULL; | ||
| 175 | LPWSTR sczPayloadName = NULL; | 172 | LPWSTR sczPayloadName = NULL; |
| 176 | DWORD dwBool = 0; | 173 | DWORD dwBool = 0; |
| 177 | 174 | ||
| @@ -187,21 +184,8 @@ static HRESULT LoadDncConfiguration( | |||
| 187 | BalExitOnRootFailure(hr, "Failed to find WixBalBAFactoryAssembly element in bootstrapper application config."); | 184 | BalExitOnRootFailure(hr, "Failed to find WixBalBAFactoryAssembly element in bootstrapper application config."); |
| 188 | } | 185 | } |
| 189 | 186 | ||
| 190 | hr = XmlGetAttributeEx(pixnHost, L"PayloadId", &sczPayloadId); | 187 | hr = XmlGetAttributeEx(pixnHost, L"FilePath", &sczPayloadName); |
| 191 | BalExitOnFailure(hr, "Failed to get WixBalBAFactoryAssembly/@PayloadId."); | 188 | BalExitOnFailure(hr, "Failed to get WixBalBAFactoryAssembly/@FilePath."); |
| 192 | |||
| 193 | hr = StrAllocFormatted(&sczPayloadXPath, L"/BootstrapperApplicationData/WixPayloadProperties[@Payload='%ls']", sczPayloadId); | ||
| 194 | BalExitOnFailure(hr, "Failed to format BAFactoryAssembly payload XPath."); | ||
| 195 | |||
| 196 | hr = XmlSelectSingleNode(pixdManifest, sczPayloadXPath, &pixnPayload); | ||
| 197 | if (S_FALSE == hr) | ||
| 198 | { | ||
| 199 | hr = E_NOTFOUND; | ||
| 200 | } | ||
| 201 | BalExitOnFailure(hr, "Failed to find WixPayloadProperties node for BAFactoryAssembly PayloadId: %ls.", sczPayloadId); | ||
| 202 | |||
| 203 | hr = XmlGetAttributeEx(pixnPayload, L"Name", &sczPayloadName); | ||
| 204 | BalExitOnFailure(hr, "Failed to get BAFactoryAssembly payload Name."); | ||
| 205 | 189 | ||
| 206 | hr = PathConcat(pArgs->pCommand->wzBootstrapperWorkingFolder, sczPayloadName, &pState->sczBaFactoryAssemblyPath); | 190 | hr = PathConcat(pArgs->pCommand->wzBootstrapperWorkingFolder, sczPayloadName, &pState->sczBaFactoryAssemblyPath); |
| 207 | BalExitOnFailure(hr, "Failed to create BaFactoryAssemblyPath."); | 191 | BalExitOnFailure(hr, "Failed to create BaFactoryAssemblyPath."); |
| @@ -250,9 +234,6 @@ static HRESULT LoadDncConfiguration( | |||
| 250 | 234 | ||
| 251 | LExit: | 235 | LExit: |
| 252 | ReleaseStr(sczPayloadName); | 236 | ReleaseStr(sczPayloadName); |
| 253 | ReleaseObject(pixnPayload); | ||
| 254 | ReleaseStr(sczPayloadXPath); | ||
| 255 | ReleaseStr(sczPayloadId); | ||
| 256 | ReleaseObject(pixnHost); | 237 | ReleaseObject(pixnHost); |
| 257 | ReleaseObject(pixdManifest); | 238 | ReleaseObject(pixdManifest); |
| 258 | 239 | ||
