@joebigelow / wix-1 / commits / a6784733

Fix Condition authoring.

Bob Arnson committed Sep 2, 2020 at 13:39 UTC a678473353eacdbed7a46edc958bc02b1fdb8fef
3 files changed +37 -38
global.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "msbuild-sdks": {
3 - "WixToolset.Sdk": "4.0.0-build-0153"
3 + "WixToolset.Sdk": "4.0.0-build-0154"
4 },
5 "sdk": {
6 "allowPrerelease": false
src/test/WixToolsetTest.Util/UtilExtensionFixture.cs
+4 -4
@@ -121,11 +121,11 @@ namespace WixToolsetTest.Util
121 "CustomAction:Wix4ConfigureEventManifestUnregister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestUnregister\t",
122 "CustomAction:Wix4ExecXmlFile_A64\t11265\tWix4UtilCA_A64\tExecXmlFile\t",
123 "CustomAction:Wix4ExecXmlFileRollback_A64\t11521\tWix4UtilCA_A64\tExecXmlFileRollback\t",
124 - "CustomAction:Wix4RegisterEventManifest_A64\t3073\tWix4UtilCA_A64\tCAQuietExec\t",
125 - "CustomAction:Wix4RollbackRegisterEventManifest_A64\t3393\tWix4UtilCA_A64\tCAQuietExec\t",
126 - "CustomAction:Wix4RollbackUnregisterEventManifest_A64\t3329\tWix4UtilCA_A64\tCAQuietExec\t",
124 + "CustomAction:Wix4RegisterEventManifest_A64\t3073\tWix4UtilCA_A64\tWixQuietExec\t",
125 + "CustomAction:Wix4RollbackRegisterEventManifest_A64\t3393\tWix4UtilCA_A64\tWixQuietExec\t",
126 + "CustomAction:Wix4RollbackUnregisterEventManifest_A64\t3329\tWix4UtilCA_A64\tWixQuietExec\t",
127 "CustomAction:Wix4SchedXmlFile_A64\t1\tWix4UtilCA_A64\tSchedXmlFile\t",
128 - "CustomAction:Wix4UnregisterEventManifest_A64\t3137\tWix4UtilCA_A64\tCAQuietExec\t",
128 + "CustomAction:Wix4UnregisterEventManifest_A64\t3137\tWix4UtilCA_A64\tWixQuietExec\t",
129 "Wix4EventManifest:Manifest.dll\t[#Manifest.dll]",
130 "Wix4XmlFile:Config_Manifest.dllMessageFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@messageFileName[\\]]\tmessageFileName\t[Manifest.dll]\t4100\tManifest.dll\t",
131 "Wix4XmlFile:Config_Manifest.dllResourceFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@resourceFileName[\\]]\tresourceFileName\t[Manifest.dll]\t4100\tManifest.dll\t",
src/wixlib/UtilExtension_Platform.wxi
+32 -33
@@ -1,5 +1,4 @@
1 -<?xml version="1.0" encoding="UTF-8"?>
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. -->
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
3
4 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
@@ -9,7 +8,7 @@
8 <CustomAction Id="$(var.Prefix)FailWhenDeferred$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixFailWhenDeferred" Execute="deferred" Return="check" SuppressModularization="yes" />
9
10 <InstallExecuteSequence>
12 - <Custom Action="$(var.Prefix)FailWhenDeferred$(var.Suffix)" Before="InstallFinalize" Overridable="yes">WIXFAILWHENDEFERRED=1 AND VersionNT &gt; 400</Custom>
11 + <Custom Action="$(var.Prefix)FailWhenDeferred$(var.Suffix)" Before="InstallFinalize" Overridable="yes" Condition="WIXFAILWHENDEFERRED=1 AND VersionNT &gt; 400" />
12 </InstallExecuteSequence>
13 </Fragment>
14
@@ -33,7 +32,7 @@
32 <CustomAction Id="$(var.Prefix)ExitEarlyWithSuccess$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixExitEarlyWithSuccess" Execute="immediate" Return="check" SuppressModularization="yes" />
33
34 <InstallExecuteSequence>
36 - <Custom Action="$(var.Prefix)ExitEarlyWithSuccess$(var.Suffix)" After="FindRelatedProducts" Overridable="yes">NEWERVERSIONDETECTED AND VersionNT &gt; 400</Custom>
35 + <Custom Action="$(var.Prefix)ExitEarlyWithSuccess$(var.Suffix)" After="FindRelatedProducts" Overridable="yes" Condition="NEWERVERSIONDETECTED AND VersionNT &gt; 400" />
36 </InstallExecuteSequence>
37 </Fragment>
38
@@ -103,7 +102,7 @@
102
103 <InstallExecuteSequence>
104 <!-- Condition this so it runs on install and MMode, but not uninstall -->
106 - <Custom Action="$(var.Prefix)CheckRebootRequired$(var.Suffix)" After="InstallFinalize" Overridable="yes">NOT REMOVE~="ALL" AND VersionNT &gt; 400</Custom>
105 + <Custom Action="$(var.Prefix)CheckRebootRequired$(var.Suffix)" After="InstallFinalize" Overridable="yes" Condition="NOT REMOVE~=&quot;ALL&quot; AND VersionNT &gt; 400" />
106 </InstallExecuteSequence>
107 </Fragment>
108
@@ -113,7 +112,7 @@
112 <CustomActionRef Id="$(var.Prefix)CheckRebootRequired$(var.Suffix)" />
113
114 <InstallExecuteSequence>
116 - <Custom Action="$(var.Prefix)CloseApplications$(var.Suffix)" Before="InstallFiles" Overridable="yes">VersionNT &gt; 400</Custom>
115 + <Custom Action="$(var.Prefix)CloseApplications$(var.Suffix)" Before="InstallFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
116 </InstallExecuteSequence>
117 </Fragment>
118
@@ -135,7 +134,7 @@
134 <CustomAction Id="$(var.Prefix)RemoveUser$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="RemoveUser" Impersonate="no" Execute="commit" Return="ignore" HideTarget="yes" SuppressModularization="yes" />
135
136 <InstallExecuteSequence>
138 - <Custom Action="$(var.Prefix)ConfigureUsers$(var.Suffix)" Before="InstallFiles" Overridable="yes">VersionNT &gt; 400</Custom>
137 + <Custom Action="$(var.Prefix)ConfigureUsers$(var.Suffix)" Before="InstallFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
138 </InstallExecuteSequence>
139 </Fragment>
140
@@ -150,8 +149,8 @@
149 <CustomAction Id="$(var.Prefix)DropSmbRollback$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CreateSmb" Impersonate="no" Execute="rollback" Return="ignore" HideTarget="yes" SuppressModularization="yes" />
150
151 <InstallExecuteSequence>
153 - <Custom Action="$(var.Prefix)ConfigureSmbInstall$(var.Suffix)" After="InstallFiles" Overridable="yes">VersionNT &gt; 400</Custom>
154 - <Custom Action="$(var.Prefix)ConfigureSmbUninstall$(var.Suffix)" After="RemoveFiles" Overridable="yes">VersionNT &gt; 400</Custom>
152 + <Custom Action="$(var.Prefix)ConfigureSmbInstall$(var.Suffix)" After="InstallFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
153 + <Custom Action="$(var.Prefix)ConfigureSmbUninstall$(var.Suffix)" After="RemoveFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
154 </InstallExecuteSequence>
155 </Fragment>
156
@@ -166,8 +165,8 @@
165 <CustomAction Id="$(var.Prefix)RollbackUnregisterPerfCounterData$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="RegisterPerfCounterData" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
166
167 <InstallExecuteSequence>
169 - <Custom Action="$(var.Prefix)InstallPerfCounterData$(var.Suffix)" After="WriteRegistryValues" Overridable="yes">VersionNT &gt; 400</Custom>
170 - <Custom Action="$(var.Prefix)UninstallPerfCounterData$(var.Suffix)" Before="RemoveRegistryValues" Overridable="yes">VersionNT &gt; 400</Custom>
168 + <Custom Action="$(var.Prefix)InstallPerfCounterData$(var.Suffix)" After="WriteRegistryValues" Overridable="yes" Condition="VersionNT &gt; 400" />
169 + <Custom Action="$(var.Prefix)UninstallPerfCounterData$(var.Suffix)" Before="RemoveRegistryValues" Overridable="yes" Condition="VersionNT &gt; 400" />
170 </InstallExecuteSequence>
171 </Fragment>
172
@@ -182,36 +181,36 @@
181 <CustomAction Id="$(var.Prefix)RollbackUnregisterPerfmon$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="RegisterPerfmon" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" />
182
183 <InstallExecuteSequence>
185 - <Custom Action="$(var.Prefix)ConfigurePerfmonInstall$(var.Suffix)" After="WriteRegistryValues" Overridable="yes">VersionNT &gt; 400</Custom>
186 - <Custom Action="$(var.Prefix)ConfigurePerfmonUninstall$(var.Suffix)" Before="RemoveRegistryValues" Overridable="yes">VersionNT &gt; 400</Custom>
184 + <Custom Action="$(var.Prefix)ConfigurePerfmonInstall$(var.Suffix)" After="WriteRegistryValues" Overridable="yes" Condition="VersionNT &gt; 400" />
185 + <Custom Action="$(var.Prefix)ConfigurePerfmonUninstall$(var.Suffix)" Before="RemoveRegistryValues" Overridable="yes" Condition="VersionNT &gt; 400" />
186 </InstallExecuteSequence>
187 </Fragment>
188
189 <Fragment>
190 <CustomAction Id="$(var.Prefix)ConfigurePerfmonManifestRegister$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="ConfigurePerfmonManifestRegister" Execute="immediate" Return="check" SuppressModularization="yes" />
191 <CustomAction Id="$(var.Prefix)ConfigurePerfmonManifestUnregister$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="ConfigurePerfmonManifestUnregister" Execute="immediate" Return="check" SuppressModularization="yes" />
193 - <CustomAction Id="$(var.Prefix)RegisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" />
194 - <CustomAction Id="$(var.Prefix)UnregisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="ignore" SuppressModularization="yes" />
195 - <CustomAction Id="$(var.Prefix)RollbackRegisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="ignore" SuppressModularization="yes" />
196 - <CustomAction Id="$(var.Prefix)RollbackUnregisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" />
192 + <CustomAction Id="$(var.Prefix)RegisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" />
193 + <CustomAction Id="$(var.Prefix)UnregisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="deferred" Return="ignore" SuppressModularization="yes" />
194 + <CustomAction Id="$(var.Prefix)RollbackRegisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="rollback" Return="ignore" SuppressModularization="yes" />
195 + <CustomAction Id="$(var.Prefix)RollbackUnregisterPerfmonManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" />
196
197 <InstallExecuteSequence>
199 - <Custom Action="$(var.Prefix)ConfigurePerfmonManifestRegister$(var.Suffix)" After="InstallFiles" Overridable="yes">VersionNT &gt; 400</Custom>
200 - <Custom Action="$(var.Prefix)ConfigurePerfmonManifestUnregister$(var.Suffix)" After="RemoveRegistryValues" Overridable="yes">VersionNT &gt; 400</Custom>
198 + <Custom Action="$(var.Prefix)ConfigurePerfmonManifestRegister$(var.Suffix)" After="InstallFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
199 + <Custom Action="$(var.Prefix)ConfigurePerfmonManifestUnregister$(var.Suffix)" After="RemoveRegistryValues" Overridable="yes" Condition="VersionNT &gt; 400" />
200 </InstallExecuteSequence>
201 </Fragment>
202
203 <Fragment>
204 <CustomAction Id="$(var.Prefix)ConfigureEventManifestRegister$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="ConfigureEventManifestRegister" Execute="immediate" Return="check" SuppressModularization="yes" />
205 <CustomAction Id="$(var.Prefix)ConfigureEventManifestUnregister$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="ConfigureEventManifestUnregister" Execute="immediate" Return="check" SuppressModularization="yes" />
207 - <CustomAction Id="$(var.Prefix)RegisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" />
208 - <CustomAction Id="$(var.Prefix)UnregisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="ignore" SuppressModularization="yes" />
209 - <CustomAction Id="$(var.Prefix)RollbackRegisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="ignore" SuppressModularization="yes" />
210 - <CustomAction Id="$(var.Prefix)RollbackUnregisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" />
206 + <CustomAction Id="$(var.Prefix)RegisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" />
207 + <CustomAction Id="$(var.Prefix)UnregisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="deferred" Return="ignore" SuppressModularization="yes" />
208 + <CustomAction Id="$(var.Prefix)RollbackRegisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="rollback" Return="ignore" SuppressModularization="yes" />
209 + <CustomAction Id="$(var.Prefix)RollbackUnregisterEventManifest$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixQuietExec" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" />
210
211 <InstallExecuteSequence>
213 - <Custom Action="$(var.Prefix)ConfigureEventManifestRegister$(var.Suffix)" After="$(var.Prefix)SchedXmlFile$(var.Suffix)" Overridable="yes">VersionNT &gt; 400</Custom>
214 - <Custom Action="$(var.Prefix)ConfigureEventManifestUnregister$(var.Suffix)" After="RemoveRegistryValues" Overridable="yes">VersionNT &gt; 400</Custom>
212 + <Custom Action="$(var.Prefix)ConfigureEventManifestRegister$(var.Suffix)" After="$(var.Prefix)SchedXmlFile$(var.Suffix)" Overridable="yes" Condition="VersionNT &gt; 400" />
213 + <Custom Action="$(var.Prefix)ConfigureEventManifestUnregister$(var.Suffix)" After="RemoveRegistryValues" Overridable="yes" Condition="VersionNT &gt; 400" />
214 </InstallExecuteSequence>
215 </Fragment>
216
@@ -222,7 +221,7 @@
221
222 <InstallExecuteSequence>
223 <!-- Condition this so it runs on install and MMode, but not uninstall -->
225 - <Custom Action="$(var.Prefix)SchedServiceConfig$(var.Suffix)" After="InstallServices" Overridable="yes">NOT REMOVE~="ALL" AND VersionNT &gt; 400</Custom>
224 + <Custom Action="$(var.Prefix)SchedServiceConfig$(var.Suffix)" After="InstallServices" Overridable="yes" Condition="NOT REMOVE~=&quot;ALL&quot; AND VersionNT &gt; 400" />
225 </InstallExecuteSequence>
226 </Fragment>
227
@@ -246,7 +245,7 @@
245 <CustomAction Id="$(var.Prefix)ExecXmlFileRollback$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="ExecXmlFileRollback" Execute="rollback" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" />
246
247 <InstallExecuteSequence>
249 - <Custom Action="$(var.Prefix)SchedXmlFile$(var.Suffix)" After="DuplicateFiles" Overridable="yes">VersionNT &gt; 400</Custom>
248 + <Custom Action="$(var.Prefix)SchedXmlFile$(var.Suffix)" After="DuplicateFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
249 </InstallExecuteSequence>
250 </Fragment>
251
@@ -258,7 +257,7 @@
257 <CustomAction Id="$(var.Prefix)ExecXmlConfigRollback$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="ExecXmlConfigRollback" Execute="rollback" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" />
258
259 <InstallExecuteSequence>
261 - <Custom Action="$(var.Prefix)SchedXmlConfig$(var.Suffix)" After="DuplicateFiles" Overridable="yes">VersionNT &gt; 400</Custom>
260 + <Custom Action="$(var.Prefix)SchedXmlConfig$(var.Suffix)" After="DuplicateFiles" Overridable="yes" Condition="VersionNT &gt; 400" />
261 </InstallExecuteSequence>
262 </Fragment>
263
@@ -268,9 +267,9 @@
267 <CustomAction Id="$(var.Prefix)CreateInternetShortcuts$(var.Suffix)" BinaryKey="$(var.Prefix)UtilCA$(var.Suffix)" DllEntry="WixCreateInternetShortcuts" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" />
268
269 <InstallExecuteSequence>
271 - <Custom Action="$(var.Prefix)SchedInternetShortcuts$(var.Suffix)" Before="RemoveFolders" Overridable="yes">VersionNT &gt; 400</Custom>
272 - <Custom Action="$(var.Prefix)RollbackInternetShortcuts$(var.Suffix)" Before="$(var.Prefix)CreateInternetShortcuts$(var.Suffix)" Overridable="yes">VersionNT &gt; 400</Custom>
273 - <Custom Action="$(var.Prefix)CreateInternetShortcuts$(var.Suffix)" After="CreateShortcuts" Overridable="yes">VersionNT &gt; 400</Custom>
270 + <Custom Action="$(var.Prefix)SchedInternetShortcuts$(var.Suffix)" Before="RemoveFolders" Overridable="yes" Condition="VersionNT &gt; 400" />
271 + <Custom Action="$(var.Prefix)RollbackInternetShortcuts$(var.Suffix)" Before="$(var.Prefix)CreateInternetShortcuts$(var.Suffix)" Overridable="yes" Condition="VersionNT &gt; 400" />
272 + <Custom Action="$(var.Prefix)CreateInternetShortcuts$(var.Suffix)" After="CreateShortcuts" Overridable="yes" Condition="VersionNT &gt; 400" />
273 </InstallExecuteSequence>
274 </Fragment>
275
@@ -284,8 +283,8 @@
283
284 <InstallExecuteSequence>
285 <!-- Condition this so it runs on install and MMode, but not uninstall -->
287 - <Custom Action="$(var.Prefix)SchedSecureObjects$(var.Suffix)" After="InstallServices" Overridable="yes">NOT REMOVE~="ALL" AND VersionNT &gt; 400</Custom>
288 - <Custom Action="$(var.Prefix)SchedSecureObjectsRollback$(var.Suffix)" After="UnpublishFeatures" Overridable="yes">VersionNT &gt; 400</Custom>
286 + <Custom Action="$(var.Prefix)SchedSecureObjects$(var.Suffix)" After="InstallServices" Overridable="yes" Condition="NOT REMOVE~=&quot;ALL&quot; AND VersionNT &gt; 400" />
287 + <Custom Action="$(var.Prefix)SchedSecureObjectsRollback$(var.Suffix)" After="UnpublishFeatures" Overridable="yes" Condition="VersionNT &gt; 400" />
288 </InstallExecuteSequence>
289 </Fragment>
290