Fix deferred custom action invocations.
Bob Arnson committed
Jul 4, 2020 at 18:36 UTC
e6510bc49ebe47d37790a1930587f6405249def7
3 files changed
+19
-4
src/ca/caDecor.h
new
+13
@@ -0,0 +1,13 @@
1
+#pragma once
2
+// 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.
3
+
4
+
5
+#if defined(_M_ARM64)
6
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7
+#elif defined(_M_AMD64)
8
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9
+#elif defined(_M_ARM)
10
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11
+#else
12
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13
+#endif
src/ca/firewall.cpp
+4
-4
@@ -150,16 +150,16 @@ static UINT SchedFirewallExceptions(
150
151
if (WCA_TODO_INSTALL == todoSched)
152
{
153
- hr = WcaDoDeferredAction(L"WixRollbackFirewallExceptionsInstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
153
+ hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackFirewallExceptionsInstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
154
ExitOnFailure(hr, "failed to schedule firewall install exceptions rollback");
155
- hr = WcaDoDeferredAction(L"WixExecFirewallExceptionsInstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
155
+ hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecFirewallExceptionsInstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
156
ExitOnFailure(hr, "failed to schedule firewall install exceptions execution");
157
}
158
else
159
{
160
- hr = WcaDoDeferredAction(L"WixRollbackFirewallExceptionsUninstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
160
+ hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackFirewallExceptionsUninstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
161
ExitOnFailure(hr, "failed to schedule firewall uninstall exceptions rollback");
162
- hr = WcaDoDeferredAction(L"WixExecFirewallExceptionsUninstall", pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
162
+ hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecFirewallExceptionsUninstall"), pwzCustomActionData, cFirewallExceptions * COST_FIREWALL_EXCEPTION);
163
ExitOnFailure(hr, "failed to schedule firewall uninstall exceptions execution");
164
}
165
}
src/ca/precomp.h
+2
@@ -15,3 +15,5 @@
15
16
#include "CustomMsiErrors.h"
17
#include "cost.h"
18
+
19
+#include "caDecor.h"