aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/ca/scagroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Util/ca/scagroup.cpp')
-rw-r--r--src/ext/Util/ca/scagroup.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ext/Util/ca/scagroup.cpp b/src/ext/Util/ca/scagroup.cpp
index bab438ea..666100b0 100644
--- a/src/ext/Util/ca/scagroup.cpp
+++ b/src/ext/Util/ca/scagroup.cpp
@@ -1,7 +1,6 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3#include "precomp.h" 3#include "precomp.h"
4#include "scanet.h"
5 4
6LPCWSTR vcsGroupQuery = L"SELECT `Group`, `Component_`, `Name`, `Domain` FROM `Wix4Group` WHERE `Group`=?"; 5LPCWSTR vcsGroupQuery = L"SELECT `Group`, `Component_`, `Name`, `Domain` FROM `Wix4Group` WHERE `Group`=?";
7enum eGroupQuery { vgqGroup = 1, vgqComponent, vgqName, vgqDomain }; 6enum eGroupQuery { vgqGroup = 1, vgqComponent, vgqName, vgqDomain };
@@ -458,7 +457,20 @@ HRESULT ScaGroupExecute(
458 // and removing groups. Note: MSDN says that it is safe to call these APIs from any 457 // and removing groups. Note: MSDN says that it is safe to call these APIs from any
459 // user, so we should be safe calling it during immediate mode. 458 // user, so we should be safe calling it during immediate mode.
460 459
461 hr = GetDomainServerName(psg->wzDomain, &pwzServerName); 460 hr = GetDomainServerName(psg->wzDomain, &pwzServerName, 0);
461 if (HRESULT_FROM_WIN32(ERROR_NO_SUCH_DOMAIN) == hr)
462 {
463 if (SCAG_NON_VITAL & psg->iAttributes)
464 {
465 WcaLog(LOGMSG_VERBOSE, "Domain does not exist for non-vital group: %ls\\%ls - continuing", psg->wzDomain, psg->wzName);
466 hr = S_OK;
467 goto ExitCurrentGroup;
468 }
469 else
470 {
471 ExitOnFailure(hr, "Domain does not exist for vital group: %ls\\%ls - aborting", psg->wzDomain, psg->wzName);
472 }
473 }
462 474
463 er = ::NetLocalGroupGetInfo(pwzServerName, psg->wzName, 0, reinterpret_cast<LPBYTE*>(&pGroupInfo)); 475 er = ::NetLocalGroupGetInfo(pwzServerName, psg->wzName, 0, reinterpret_cast<LPBYTE*>(&pGroupInfo));
464 if (NERR_Success == er) 476 if (NERR_Success == er)
@@ -597,6 +609,7 @@ HRESULT ScaGroupExecute(
597 ExitOnFailure(hr, "failed to schedule RemoveGroup"); 609 ExitOnFailure(hr, "failed to schedule RemoveGroup");
598 } 610 }
599 611
612 ExitCurrentGroup:
600 ReleaseNullStr(pwzScriptKey); 613 ReleaseNullStr(pwzScriptKey);
601 ReleaseNullStr(pwzActionData); 614 ReleaseNullStr(pwzActionData);
602 ReleaseNullStr(pwzRollbackData); 615 ReleaseNullStr(pwzRollbackData);