From 3a4dffe9feb62ea383e767ba903ff1edc8234f0e Mon Sep 17 00:00:00 2001
From: Bob Arnson <bob@firegiant.com>
Date: Sun, 19 Sep 2021 22:29:32 -0400
Subject: Table ids per https://github.com/wixtoolset/issues/issues/5933.

---
 src/ext/Iis/ca/caDecor.h                           | 13 --------
 src/ext/Iis/ca/precomp.h                           |  2 +-
 src/ext/Iis/ca/scacert.cpp                         |  2 +-
 src/ext/Iis/ca/scasched.cpp                        | 34 +++++++++----------
 src/ext/Iis/ca/scauser.cpp                         |  8 ++---
 src/ext/Iis/ca/scawebdir7.cpp                      |  2 +-
 src/ext/Iis/ca/scaweblog7.cpp                      |  4 +--
 .../test/WixToolsetTest.Iis/IisExtensionFixture.cs |  5 +--
 src/ext/Iis/wixext/IisTableDefinitions.cs          | 36 ++++++++++----------
 src/ext/Iis/wixlib/IIsExtension_Platform.wxi       |  6 ++--
 src/ext/Iis/wixlib/caDecor.wxi                     | 39 ----------------------
 src/ext/caDecor.h                                  | 13 ++++++++
 src/ext/caDecor.wxi                                | 39 ++++++++++++++++++++++
 13 files changed, 102 insertions(+), 101 deletions(-)
 delete mode 100644 src/ext/Iis/ca/caDecor.h
 delete mode 100644 src/ext/Iis/wixlib/caDecor.wxi
 create mode 100644 src/ext/caDecor.h
 create mode 100644 src/ext/caDecor.wxi

(limited to 'src/ext')

diff --git a/src/ext/Iis/ca/caDecor.h b/src/ext/Iis/ca/caDecor.h
deleted file mode 100644
index da274650..00000000
--- a/src/ext/Iis/ca/caDecor.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-// 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.
-
-
-#if defined(_M_ARM64)
-#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
-#elif defined(_M_AMD64)
-#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
-#elif defined(_M_ARM)
-#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
-#else
-#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
-#endif
diff --git a/src/ext/Iis/ca/precomp.h b/src/ext/Iis/ca/precomp.h
index 106ab884..a165154b 100644
--- a/src/ext/Iis/ca/precomp.h
+++ b/src/ext/Iis/ca/precomp.h
@@ -61,4 +61,4 @@
 #include "scassl7.h"
 #include "scaexecIIS7.h"
 
-#include "caDecor.h"
+#include "..\..\caDecor.h"
diff --git a/src/ext/Iis/ca/scacert.cpp b/src/ext/Iis/ca/scacert.cpp
index 0bb87f9f..82a83f18 100644
--- a/src/ext/Iis/ca/scacert.cpp
+++ b/src/ext/Iis/ca/scacert.cpp
@@ -85,7 +85,7 @@ VOID ParseCertificateAuthority(__in LPCWSTR wzCertificateAuthorityOrig, __out LP
 */
 
 
-LPCWSTR vcsCertQuery = L"SELECT `Certificate`, `Name`, `Component_`, `StoreLocation`, `StoreName`, `Attributes`, `Binary_`, `CertificatePath`, `PFXPassword` FROM `Certificate`";
+LPCWSTR vcsCertQuery = L"SELECT `Certificate`, `Name`, `Component_`, `StoreLocation`, `StoreName`, `Attributes`, `Binary_`, `CertificatePath`, `PFXPassword` FROM `Wix4Certificate`";
 enum eCertQuery { cqCertificate = 1, cqName, cqComponent, cqStoreLocation, cqStoreName, cqAttributes, cqCertificateBinary, cqCertificatePath, cqPFXPassword };
 
 
diff --git a/src/ext/Iis/ca/scasched.cpp b/src/ext/Iis/ca/scasched.cpp
index de021275..14fa97ac 100644
--- a/src/ext/Iis/ca/scasched.cpp
+++ b/src/ext/Iis/ca/scasched.cpp
@@ -7,58 +7,58 @@ const int WriteMetabaseChangesCost = 20;
 const int WriteIIS7ConfigChangesCost = 20;
 
 // sql queries
-LPCWSTR vcsUserDeferredQuery = L"SELECT `User`, `Component_`, `Name`, `Domain`, `Password` FROM `User`";
+LPCWSTR vcsUserDeferredQuery = L"SELECT `User`, `Component_`, `Name`, `Domain`, `Password` FROM `Wix4User`";
 
-LPCWSTR vcsWebSvcExtQuery = L"SELECT `Component_`, `File`, `Description`, `Group`, `Attributes` FROM `IIsWebServiceExtension`";
+LPCWSTR vcsWebSvcExtQuery = L"SELECT `Component_`, `File`, `Description`, `Group`, `Attributes` FROM `Wix4IIsWebServiceExtension`";
 
-LPCWSTR vcsAppPoolQuery = L"SELECT `AppPool`, `Name`, `Component_`, `Attributes`, `User_`, `RecycleMinutes`, `RecycleRequests`, `RecycleTimes`, `VirtualMemory`, `PrivateMemory`, `IdleTimeout`, `QueueLimit`, `CPUMon`, `MaxProc`, `ManagedRuntimeVersion`, `ManagedPipelineMode` FROM `IIsAppPool`";
+LPCWSTR vcsAppPoolQuery = L"SELECT `AppPool`, `Name`, `Component_`, `Attributes`, `User_`, `RecycleMinutes`, `RecycleRequests`, `RecycleTimes`, `VirtualMemory`, `PrivateMemory`, `IdleTimeout`, `QueueLimit`, `CPUMon`, `MaxProc`, `ManagedRuntimeVersion`, `ManagedPipelineMode` FROM `Wix4IIsAppPool`";
 
 LPCWSTR vcsComponentAttrQuery = L"SELECT `Component`,`Attributes` FROM `Component`";
 
-LPCWSTR vcsMimeMapQuery = L"SELECT `MimeMap`, `ParentType`, `ParentValue`, `MimeType`, `Extension` FROM `IIsMimeMap`";
+LPCWSTR vcsMimeMapQuery = L"SELECT `MimeMap`, `ParentType`, `ParentValue`, `MimeType`, `Extension` FROM `Wix4IIsMimeMap`";
 
-LPCWSTR vcsHttpHeaderQuery = L"SELECT `Name`, `ParentType`, `ParentValue`, `Value`, `Attributes` FROM `IIsHttpHeader` ORDER BY `Sequence`";
+LPCWSTR vcsHttpHeaderQuery = L"SELECT `Name`, `ParentType`, `ParentValue`, `Value`, `Attributes` FROM `Wix4IIsHttpHeader` ORDER BY `Sequence`";
 
 LPCWSTR vcsWebErrorQuery =
     L"SELECT `ErrorCode`, `SubCode`, `ParentType`, `ParentValue`, `File`, `URL` "
-    L"FROM `IIsWebError` ORDER BY `ErrorCode`, `SubCode`";
+    L"FROM `Wix4IIsWebError` ORDER BY `ErrorCode`, `SubCode`";
 
 LPCWSTR vcsWebDirPropertiesQuery = L"SELECT `DirProperties`, `Access`, `Authorization`, `AnonymousUser_`, `IIsControlledPassword`, `LogVisits`, `Index`, `DefaultDoc`, `AspDetailedError`, `HttpExpires`, `CacheControlMaxAge`, `CacheControlCustom`, `NoCustomError`, `AccessSSLFlags`, `AuthenticationProviders` "
-    L"FROM `IIsWebDirProperties`";
+    L"FROM `Wix4IIsWebDirProperties`";
 
-LPCWSTR vcsSslCertificateQuery = L"SELECT `Certificate`.`StoreName`, `CertificateHash`.`Hash`, `IIsWebSiteCertificates`.`Web_` FROM `Certificate`, `CertificateHash`, `IIsWebSiteCertificates` WHERE `Certificate`.`Certificate`=`CertificateHash`.`Certificate_` AND `CertificateHash`.`Certificate_`=`IIsWebSiteCertificates`.`Certificate_`";
+LPCWSTR vcsSslCertificateQuery = L"SELECT `Wix4Certificate`.`StoreName`, `Wix4CertificateHash`.`Hash`, `Wix4IIsWebSiteCertificates`.`Web_` FROM `Wix4Certificate`, `Wix4CertificateHash`, `Wix4IIsWebSiteCertificates` WHERE `Wix4Certificate`.`Certificate`=`Wix4CertificateHash`.`Certificate_` AND `Wix4CertificateHash`.`Certificate_`=`Wix4IIsWebSiteCertificates`.`Certificate_`";
 
 LPCWSTR vcsWebLogQuery = L"SELECT `Log`, `Format` "
-    L"FROM `IIsWebLog`";
+    L"FROM `Wix4IIsWebLog`";
 
 LPCWSTR vcsWebApplicationQuery = L"SELECT `Name`, `Isolation`, `AllowSessions`, `SessionTimeout`, "
     L"`Buffer`, `ParentPaths`, `DefaultScript`, `ScriptTimeout`, "
     L"`ServerDebugging`, `ClientDebugging`, `AppPool_`, `Application` "
-    L"FROM `IIsWebApplication`";
+    L"FROM `Wix4IIsWebApplication`";
 
-LPCWSTR vcsWebAppExtensionQuery = L"SELECT `Extension`, `Verbs`, `Executable`, `Attributes`, `Application_` FROM `IIsWebApplicationExtension`";
+LPCWSTR vcsWebAppExtensionQuery = L"SELECT `Extension`, `Verbs`, `Executable`, `Attributes`, `Application_` FROM `Wix4IIsWebApplicationExtension`";
 
 LPCWSTR vcsWebQuery = L"SELECT `Web`, `Component_`, `Id`, `Description`, `ConnectionTimeout`, `Directory_`, `State`, `Attributes`, `DirProperties_`, `Application_`, "
-    L"`Address`, `IP`, `Port`, `Header`, `Secure`, `Log_` FROM `IIsWebSite`, `IIsWebAddress` "
+    L"`Address`, `IP`, `Port`, `Header`, `Secure`, `Log_` FROM `Wix4IIsWebSite`, `Wix4IIsWebAddress` "
     L"WHERE `KeyAddress_`=`Address` ORDER BY `Sequence`";
 
 LPCWSTR vcsWebAddressQuery = L"SELECT `Address`, `Web_`, `IP`, `Port`, `Header`, `Secure` "
-    L"FROM `IIsWebAddress`";
+    L"FROM `Wix4IIsWebAddress`";
 
 LPCWSTR vcsWebBaseQuery = L"SELECT `Web`, `Id`, `IP`, `Port`, `Header`, `Secure`, `Description` "
-    L"FROM `IIsWebSite`, `IIsWebAddress` "
+    L"FROM `Wix4IIsWebSite`, `Wix4IIsWebAddress` "
     L"WHERE `KeyAddress_`=`Address`";
 
 LPCWSTR vcsWebDirQuery = L"SELECT `Web_`, `WebDir`, `Component_`, `Path`, `DirProperties_`, `Application_` "
-    L"FROM `IIsWebDir`";
+    L"FROM `Wix4IIsWebDir`";
 
 LPCWSTR vcsVDirQuery = L"SELECT `Web_`, `VirtualDir`, `Component_`, `Alias`, `Directory_`, `DirProperties_`, `Application_` "
     L"FROM `IIsWebVirtualDir`";
 
-LPCWSTR vcsFilterQuery = L"SELECT `Web_`, `Name`, `Component_`, `Path`, `Description`, `Flags`, `LoadOrder` FROM `IIsFilter` ORDER BY `Web_`";
+LPCWSTR vcsFilterQuery = L"SELECT `Web_`, `Name`, `Component_`, `Path`, `Description`, `Flags`, `LoadOrder` FROM `Wix4IIsFilter` ORDER BY `Web_`";
 
 LPCWSTR vcsPropertyQuery = L"SELECT `Property`, `Component_`, `Attributes`, `Value` "
-    L"FROM `IIsProperty`";
+    L"FROM `Wix4IIsProperty`";
 
 #define IIS7CONDITION L"VersionNT >= 600"
 #define USEIIS7CONDITION IIS7CONDITION L"AND NOT UseIis6Compatibility"
diff --git a/src/ext/Iis/ca/scauser.cpp b/src/ext/Iis/ca/scauser.cpp
index 0b99edff..eaea8f2c 100644
--- a/src/ext/Iis/ca/scauser.cpp
+++ b/src/ext/Iis/ca/scauser.cpp
@@ -2,16 +2,16 @@
 
 #include "precomp.h"
 
-LPCWSTR vcsUserQuery = L"SELECT `User`, `Component_`, `Name`, `Domain`, `Password` FROM `User` WHERE `User`=?";
+LPCWSTR vcsUserQuery = L"SELECT `User`, `Component_`, `Name`, `Domain`, `Password` FROM `Wix4User` WHERE `User`=?";
 enum eUserQuery { vuqUser = 1, vuqComponent, vuqName, vuqDomain, vuqPassword };
 
-LPCWSTR vcsGroupQuery = L"SELECT `Group`, `Component_`, `Name`, `Domain` FROM `Group` WHERE `Group`=?";
+LPCWSTR vcsGroupQuery = L"SELECT `Group`, `Component_`, `Name`, `Domain` FROM `Wix4Group` WHERE `Group`=?";
 enum eGroupQuery { vgqGroup = 1, vgqComponent, vgqName, vgqDomain };
 
-LPCWSTR vcsUserGroupQuery = L"SELECT `User_`, `Group_` FROM `UserGroup` WHERE `User_`=?";
+LPCWSTR vcsUserGroupQuery = L"SELECT `User_`, `Group_` FROM `Wix4UserGroup` WHERE `User_`=?";
 enum eUserGroupQuery { vugqUser = 1, vugqGroup };
 
-LPCWSTR vActionableQuery = L"SELECT `User`,`Component_`,`Name`,`Domain`,`Password`,`Attributes` FROM `User` WHERE `Component_` IS NOT NULL";
+LPCWSTR vActionableQuery = L"SELECT `User`,`Component_`,`Name`,`Domain`,`Password`,`Attributes` FROM `Wix4User` WHERE `Component_` IS NOT NULL";
 enum eActionableQuery { vaqUser = 1, vaqComponent, vaqName, vaqDomain, vaqPassword, vaqAttributes };
 
 HRESULT __stdcall ScaGetUserDeferred(
diff --git a/src/ext/Iis/ca/scawebdir7.cpp b/src/ext/Iis/ca/scawebdir7.cpp
index 5ead0470..bd338808 100644
--- a/src/ext/Iis/ca/scawebdir7.cpp
+++ b/src/ext/Iis/ca/scawebdir7.cpp
@@ -4,7 +4,7 @@
 
 // sql queries
 static LPCWSTR vcsWebDirQuery7 = L"SELECT `Web_`, `WebDir`, `Component_`, `Path`, `DirProperties_`, `Application_`"
-                                       L"FROM `IIsWebDir`";
+                                 L"FROM `Wix4IIsWebDir`";
 
 enum eWebDirQuery { wdqWeb = 1, wdqWebDir, wdqComponent , wdqPath, wdqProperties, wdqApplication, wdqInstalled, wdqAction };
 
diff --git a/src/ext/Iis/ca/scaweblog7.cpp b/src/ext/Iis/ca/scaweblog7.cpp
index c857c46f..b8a4db9e 100644
--- a/src/ext/Iis/ca/scaweblog7.cpp
+++ b/src/ext/Iis/ca/scaweblog7.cpp
@@ -3,7 +3,7 @@
 #include "precomp.h"
 // sql queries
 LPCWSTR vcsWebLogQuery7 = L"SELECT `Log`, `Format` "
-                         L"FROM `IIsWebLog`  WHERE `Log`=?";
+                         L"FROM `Wix4IIsWebLog`  WHERE `Log`=?";
 
 enum eWebLogQuery { wlqLog = 1, wlqFormat };
 
@@ -50,7 +50,7 @@ HRESULT ScaGetWebLog7(
     ExitOnFailure(hr, "failed to copy log name: %ls", pwzData);
 
     hr = WcaGetRecordString(hRec, wlqFormat, &pwzData);
-    ExitOnFailure(hr, "failed to get IIsWebLog.Format for Log:", wzLog);
+    ExitOnFailure(hr, "failed to get IIsWebLog.Format for Log: %ls", wzLog);
 
     //translate WIX log format name strings to IIS7
     if (0 == lstrcmpW(pwzData, L"Microsoft IIS Log File Format"))
diff --git a/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs b/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs
index 685e7126..26c95050 100644
--- a/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs
+++ b/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs
@@ -16,10 +16,11 @@ namespace WixToolsetTest.Iis
             var folder = TestData.Get(@"TestData\UsingIis");
             var build = new Builder(folder, typeof(IisExtensionFactory), new[] { folder });
 
-            var results = build.BuildAndQuery(Build, "IIsWebAddress");
+            var results = build.BuildAndQuery(Build, "Wix4IIsWebSite", "Wix4IIsWebAddress");
             Assert.Equal(new[]
             {
-                "IIsWebAddress:TestAddress\tTest\t\t[PORT]\t\t0",
+                "Wix4IIsWebAddress:TestAddress\tTest\t\t[PORT]\t\t0",
+                "Wix4IIsWebSite:Test\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tTest web server\t\tTestWebSiteProductDirectory\t2\t2\tTestAddress\tReadAndExecute\t\t\t\t",
             }, results);
         }
 
diff --git a/src/ext/Iis/wixext/IisTableDefinitions.cs b/src/ext/Iis/wixext/IisTableDefinitions.cs
index f513152e..02621a4d 100644
--- a/src/ext/Iis/wixext/IisTableDefinitions.cs
+++ b/src/ext/Iis/wixext/IisTableDefinitions.cs
@@ -7,7 +7,7 @@ namespace WixToolset.Iis
     public static class IisTableDefinitions
     {
         public static readonly TableDefinition Certificate = new TableDefinition(
-            "Certificate",
+            "Wix4Certificate",
             IisSymbolDefinitions.Certificate,
             new[]
             {
@@ -25,7 +25,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition CertificateHash = new TableDefinition(
-            "CertificateHash",
+            "Wix4CertificateHash",
             IisSymbolDefinitions.CertificateHash,
             new[]
             {
@@ -36,7 +36,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebSiteCertificates = new TableDefinition(
-            "IIsWebSiteCertificates",
+            "Wix4IIsWebSiteCertificates",
             IisSymbolDefinitions.IIsWebSiteCertificates,
             new[]
             {
@@ -47,7 +47,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsAppPool = new TableDefinition(
-            "IIsAppPool",
+            "Wix4IIsAppPool",
             IisSymbolDefinitions.IIsAppPool,
             new[]
             {
@@ -72,7 +72,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsMimeMap = new TableDefinition(
-            "IIsMimeMap",
+            "Wix4IIsMimeMap",
             IisSymbolDefinitions.IIsMimeMap,
             new[]
             {
@@ -86,7 +86,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsProperty = new TableDefinition(
-            "IIsProperty",
+            "Wix4IIsProperty",
             IisSymbolDefinitions.IIsProperty,
             new[]
             {
@@ -99,7 +99,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebDirProperties = new TableDefinition(
-            "IIsWebDirProperties",
+            "Wix4IIsWebDirProperties",
             IisSymbolDefinitions.IIsWebDirProperties,
             new[]
             {
@@ -123,7 +123,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebAddress = new TableDefinition(
-            "IIsWebAddress",
+            "Wix4IIsWebAddress",
             IisSymbolDefinitions.IIsWebAddress,
             new[]
             {
@@ -138,7 +138,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebSite = new TableDefinition(
-            "IIsWebSite",
+            "Wix4IIsWebSite",
             IisSymbolDefinitions.IIsWebSite,
             new[]
             {
@@ -160,7 +160,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebApplication = new TableDefinition(
-            "IIsWebApplication",
+            "Wix4IIsWebApplication",
             IisSymbolDefinitions.IIsWebApplication,
             new[]
             {
@@ -181,7 +181,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebApplicationExtension = new TableDefinition(
-            "IIsWebApplicationExtension",
+            "Wix4IIsWebApplicationExtension",
             IisSymbolDefinitions.IIsWebApplicationExtension,
             new[]
             {
@@ -195,7 +195,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsFilter = new TableDefinition(
-            "IIsFilter",
+            "Wix4IIsFilter",
             IisSymbolDefinitions.IIsFilter,
             new[]
             {
@@ -212,7 +212,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebDir = new TableDefinition(
-            "IIsWebDir",
+            "Wix4IIsWebDir",
             IisSymbolDefinitions.IIsWebDir,
             new[]
             {
@@ -227,7 +227,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebError = new TableDefinition(
-            "IIsWebError",
+            "Wix4IIsWebError",
             IisSymbolDefinitions.IIsWebError,
             new[]
             {
@@ -242,7 +242,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsHttpHeader = new TableDefinition(
-            "IIsHttpHeader",
+            "Wix4IIsHttpHeader",
             IisSymbolDefinitions.IIsHttpHeader,
             new[]
             {
@@ -258,7 +258,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebServiceExtension = new TableDefinition(
-            "IIsWebServiceExtension",
+            "Wix4IIsWebServiceExtension",
             IisSymbolDefinitions.IIsWebServiceExtension,
             new[]
             {
@@ -273,7 +273,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebVirtualDir = new TableDefinition(
-            "IIsWebVirtualDir",
+            "Wix4IIsWebVirtualDir",
             IisSymbolDefinitions.IIsWebVirtualDir,
             new[]
             {
@@ -289,7 +289,7 @@ namespace WixToolset.Iis
         );
 
         public static readonly TableDefinition IIsWebLog = new TableDefinition(
-            "IIsWebLog",
+            "Wix4IIsWebLog",
             IisSymbolDefinitions.IIsWebLog,
             new[]
             {
diff --git a/src/ext/Iis/wixlib/IIsExtension_Platform.wxi b/src/ext/Iis/wixlib/IIsExtension_Platform.wxi
index 09562a69..d3a52b80 100644
--- a/src/ext/Iis/wixlib/IIsExtension_Platform.wxi
+++ b/src/ext/Iis/wixlib/IIsExtension_Platform.wxi
@@ -2,7 +2,7 @@
 
 
 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
-  <?include caDecor.wxi ?>
+  <?include ..\..\caDecor.wxi ?>
   
   <Fragment>
     <UIRef Id="WixIIsErrors" />
@@ -58,8 +58,8 @@
     <CustomAction Id="$(var.Prefix)RollbackDeleteMachineCertificate$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" BinaryRef="IisCA$(var.Suffix)" />
 
     <InstallExecuteSequence>
-      <Custom Action="UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
-      <Custom Action="InstallCertificates$(var.Suffix)" After="InstallFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
+      <Custom Action="$(var.Prefix)UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
+      <Custom Action="$(var.Prefix)InstallCertificates$(var.Suffix)" After="InstallFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
     </InstallExecuteSequence>
   </Fragment>
 
diff --git a/src/ext/Iis/wixlib/caDecor.wxi b/src/ext/Iis/wixlib/caDecor.wxi
deleted file mode 100644
index b1711518..00000000
--- a/src/ext/Iis/wixlib/caDecor.wxi
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- 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. -->
-
-
-<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
-    <?ifdef Prefix ?>
-        <?undef Prefix ?>
-    <?endif?>
-
-    <?define Prefix="Wix4" ?>
-
-    <?ifndef platform ?>
-        <?define platform="x86" ?>
-    <?endif?>
-
-    <?if $(var.platform)="" ?>
-        <?undef platform ?>
-        <?define platform="x86" ?>
-    <?endif?>
-
-    <?ifdef Suffix ?>
-        <?undef Suffix ?>
-    <?endif?>
-
-    <?if $(var.platform)~="x86" ?>
-        <?define Suffix="_X86" ?>
-    <?endif?>
-
-    <?if $(var.platform)~="x64" ?>
-        <?define Suffix="_X64" ?>
-    <?endif?>
-
-    <?if $(var.platform)~="arm" ?>
-        <?define Suffix="_A32" ?>
-    <?endif?>
-
-    <?if $(var.platform)~="arm64" ?>
-        <?define Suffix="_A64" ?>
-    <?endif?>
-</Include>
diff --git a/src/ext/caDecor.h b/src/ext/caDecor.h
new file mode 100644
index 00000000..da274650
--- /dev/null
+++ b/src/ext/caDecor.h
@@ -0,0 +1,13 @@
+#pragma once
+// 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.
+
+
+#if defined(_M_ARM64)
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
+#elif defined(_M_AMD64)
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
+#elif defined(_M_ARM)
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
+#else
+#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
+#endif
diff --git a/src/ext/caDecor.wxi b/src/ext/caDecor.wxi
new file mode 100644
index 00000000..b1711518
--- /dev/null
+++ b/src/ext/caDecor.wxi
@@ -0,0 +1,39 @@
+<!-- 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. -->
+
+
+<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
+    <?ifdef Prefix ?>
+        <?undef Prefix ?>
+    <?endif?>
+
+    <?define Prefix="Wix4" ?>
+
+    <?ifndef platform ?>
+        <?define platform="x86" ?>
+    <?endif?>
+
+    <?if $(var.platform)="" ?>
+        <?undef platform ?>
+        <?define platform="x86" ?>
+    <?endif?>
+
+    <?ifdef Suffix ?>
+        <?undef Suffix ?>
+    <?endif?>
+
+    <?if $(var.platform)~="x86" ?>
+        <?define Suffix="_X86" ?>
+    <?endif?>
+
+    <?if $(var.platform)~="x64" ?>
+        <?define Suffix="_X64" ?>
+    <?endif?>
+
+    <?if $(var.platform)~="arm" ?>
+        <?define Suffix="_A32" ?>
+    <?endif?>
+
+    <?if $(var.platform)~="arm64" ?>
+        <?define Suffix="_A64" ?>
+    <?endif?>
+</Include>
-- 
cgit v1.2.3-55-g6feb