summaryrefslogtreecommitdiff
path: root/src/test/msi/TestData/UtilExtensionUserTests
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-04-28 21:02:23 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-04-29 00:23:14 -0500
commit5b04bce6567855325810bc4e6bcd2f6e05b329c7 (patch)
treea36e140d36c83a2ef7e81a88d941dd792bef3f55 /src/test/msi/TestData/UtilExtensionUserTests
parent681da11cfc9a266304b47b88843cb8a365015c63 (diff)
downloadwix-5b04bce6567855325810bc4e6bcd2f6e05b329c7.tar.gz
wix-5b04bce6567855325810bc4e6bcd2f6e05b329c7.tar.bz2
wix-5b04bce6567855325810bc4e6bcd2f6e05b329c7.zip
Port UtilExtension.UserTests from wix3.
Diffstat (limited to 'src/test/msi/TestData/UtilExtensionUserTests')
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductA/ProductA.wixproj13
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductA/product.wxs35
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductFail/ProductFail.wixproj13
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductFail/product_fail.wxs39
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/FailIfExists.wxs24
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/ProductFailIfExists.wixproj13
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/NonVitalUserGroup.wxs22
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/ProductNonVitalUserGroup.wixproj13
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/ProductRestrictedDomain.wixproj13
-rw-r--r--src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/RestrictedDomain.wxs20
10 files changed, 205 insertions, 0 deletions
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductA/ProductA.wixproj b/src/test/msi/TestData/UtilExtensionUserTests/ProductA/ProductA.wixproj
new file mode 100644
index 00000000..fbc6f292
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductA/ProductA.wixproj
@@ -0,0 +1,13 @@
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<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <UpgradeCode>{1A1795A6-87C0-4A9A-ABD5-DF9BED697037}</UpgradeCode>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <PackageReference Include="WixToolset.Util.wixext" />
12 </ItemGroup>
13</Project> \ No newline at end of file
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductA/product.wxs b/src/test/msi/TestData/UtilExtensionUserTests/ProductA/product.wxs
new file mode 100644
index 00000000..a7bec54e
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductA/product.wxs
@@ -0,0 +1,35 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
5 <Fragment>
6 <ComponentGroup Id="ProductComponents">
7 <ComponentRef Id="Component1" />
8 </ComponentGroup>
9
10 <Property Id="TEMPDOMAIN" Secure="yes" />
11 <Property Id="TEMPUSERNAME" Secure="yes" />
12 </Fragment>
13
14 <Fragment>
15 <util:Group Id="ADMIN" Name="Administrators" />
16 <util:Group Id="POWER_USER" Name="Power Users" />
17
18 <Component Id="Component1" Guid="00030829-0000-0000-C000-000000000046" Directory="INSTALLFOLDER">
19 <File Source="$(sys.SOURCEFILEPATH)" KeyPath="yes" />
20
21 <util:User Id="TEST_USER1" Name="testName1" Password="test123!@#" PasswordExpired="yes">
22 <util:GroupRef Id="ADMIN" />
23 <util:GroupRef Id="POWER_USER" />
24 </util:User>
25
26 <util:User Id="TEST_USER2" Name="testName2" Password="test123!@#" Disabled="yes" RemoveOnUninstall="no" PasswordNeverExpires="yes" UpdateIfExists="yes">
27 <util:GroupRef Id="POWER_USER" />
28 </util:User>
29
30 <util:User Id="TEST_USER3" Name="[TEMPUSERNAME]" Domain="[TEMPDOMAIN]" CreateUser="no">
31 <util:GroupRef Id="POWER_USER" />
32 </util:User>
33 </Component>
34 </Fragment>
35</Wix>
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductFail/ProductFail.wixproj b/src/test/msi/TestData/UtilExtensionUserTests/ProductFail/ProductFail.wixproj
new file mode 100644
index 00000000..e2fe3aa8
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductFail/ProductFail.wixproj
@@ -0,0 +1,13 @@
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<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <UpgradeCode>{91D27DAC-04C1-4160-914E-343676D36CAA}</UpgradeCode>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <PackageReference Include="WixToolset.Util.wixext" />
12 </ItemGroup>
13</Project> \ No newline at end of file
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductFail/product_fail.wxs b/src/test/msi/TestData/UtilExtensionUserTests/ProductFail/product_fail.wxs
new file mode 100644
index 00000000..c5da862c
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductFail/product_fail.wxs
@@ -0,0 +1,39 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
5 <Fragment>
6 <ComponentGroup Id="ProductComponents">
7 <ComponentRef Id="Component1" />
8 </ComponentGroup>
9
10 <Property Id="TEMPDOMAIN" Secure="yes" />
11 <Property Id="TEMPUSERNAME" Secure="yes" />
12
13 <InstallExecuteSequence>
14 <Custom Action="CaFail" After="Wix4ConfigureUsers_X86" />
15 </InstallExecuteSequence>
16 </Fragment>
17
18 <Fragment>
19 <util:Group Id="ADMIN" Name="Administrators" />
20 <util:Group Id="POWER_USER" Name="Power Users" />
21
22 <Component Id="Component1" Guid="00030829-0000-0000-C000-000000000046" Directory="INSTALLFOLDER">
23 <File Source="$(sys.SOURCEFILEPATH)" KeyPath="yes" />
24
25 <util:User Id="TEST_USER1" Name="testName1" Password="test123!@#" PasswordExpired="yes">
26 <util:GroupRef Id="ADMIN" />
27 <util:GroupRef Id="POWER_USER" />
28 </util:User>
29
30 <util:User Id="TEST_USER2" Name="testName2" Password="test123!@#" Disabled="yes" RemoveOnUninstall="no" PasswordNeverExpires="yes" UpdateIfExists="yes">
31 <util:GroupRef Id="POWER_USER" />
32 </util:User>
33
34 <util:User Id="TEST_USER3" Name="[TEMPUSERNAME]" Domain="[TEMPDOMAIN]" CreateUser="no">
35 <util:GroupRef Id="POWER_USER" />
36 </util:User>
37 </Component>
38 </Fragment>
39</Wix>
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/FailIfExists.wxs b/src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/FailIfExists.wxs
new file mode 100644
index 00000000..0da4f2b9
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/FailIfExists.wxs
@@ -0,0 +1,24 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
5 <Fragment>
6 <ComponentGroup Id="ProductComponents">
7 <ComponentRef Id="Component1" />
8 </ComponentGroup>
9 </Fragment>
10
11 <Fragment>
12 <util:Group Id="ADMIN" Name="Administrators" />
13 <util:Group Id="POWER_USER" Name="Power Users" />
14
15 <Component Id="Component1" Guid="00030829-0000-0000-C000-000000000046" Directory="INSTALLFOLDER">
16 <File Source="$(sys.SOURCEFILEPATH)" KeyPath="yes" />
17
18 <util:User Id="TEST_USER4" Name="existinguser" Password="test123!@#" LogonAsService="yes" FailIfExists="yes" RemoveOnUninstall="yes">
19 <util:GroupRef Id="ADMIN" />
20 <util:GroupRef Id="POWER_USER" />
21 </util:User>
22 </Component>
23 </Fragment>
24</Wix>
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/ProductFailIfExists.wixproj b/src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/ProductFailIfExists.wixproj
new file mode 100644
index 00000000..9e1a836f
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductFailIfExists/ProductFailIfExists.wixproj
@@ -0,0 +1,13 @@
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<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <UpgradeCode>{BC803822-929E-47DA-AB3A-3A62EEEA2BFB}</UpgradeCode>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <PackageReference Include="WixToolset.Util.wixext" />
12 </ItemGroup>
13</Project> \ No newline at end of file
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/NonVitalUserGroup.wxs b/src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/NonVitalUserGroup.wxs
new file mode 100644
index 00000000..461648ee
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/NonVitalUserGroup.wxs
@@ -0,0 +1,22 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
5 <Fragment>
6 <ComponentGroup Id="ProductComponents">
7 <ComponentRef Id="Component1" />
8 </ComponentGroup>
9 </Fragment>
10
11 <Fragment>
12 <util:Group Id="ShouldNotExist" Name="Should Not Exist" />
13
14 <Component Id="Component1" Guid="00030829-0000-0000-C000-000000000046" Directory="INSTALLFOLDER">
15 <File Source="$(sys.SOURCEFILEPATH)" KeyPath="yes" />
16
17 <util:User Id="CurrentUser" Name="[LogonUser]" Domain="[%USERDOMAIN]" RemoveOnUninstall="no" Vital="no">
18 <util:GroupRef Id="ShouldNotExist" />
19 </util:User>
20 </Component>
21 </Fragment>
22</Wix>
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/ProductNonVitalUserGroup.wixproj b/src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/ProductNonVitalUserGroup.wixproj
new file mode 100644
index 00000000..8734224d
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductNonVitalUserGroup/ProductNonVitalUserGroup.wixproj
@@ -0,0 +1,13 @@
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<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <UpgradeCode>{455C8D4F-6D59-405C-AD51-0ACC7FB91A26}</UpgradeCode>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <PackageReference Include="WixToolset.Util.wixext" />
12 </ItemGroup>
13</Project> \ No newline at end of file
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/ProductRestrictedDomain.wixproj b/src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/ProductRestrictedDomain.wixproj
new file mode 100644
index 00000000..e4a01a3a
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/ProductRestrictedDomain.wixproj
@@ -0,0 +1,13 @@
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<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <UpgradeCode>{50CF526C-A862-4327-9EA3-C96AAB6FABCE}</UpgradeCode>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <PackageReference Include="WixToolset.Util.wixext" />
12 </ItemGroup>
13</Project> \ No newline at end of file
diff --git a/src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/RestrictedDomain.wxs b/src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/RestrictedDomain.wxs
new file mode 100644
index 00000000..f200a06a
--- /dev/null
+++ b/src/test/msi/TestData/UtilExtensionUserTests/ProductRestrictedDomain/RestrictedDomain.wxs
@@ -0,0 +1,20 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
5 <Fragment>
6 <ComponentGroup Id="ProductComponents">
7 <ComponentRef Id="Component1" />
8 </ComponentGroup>
9
10 <Property Id="TEMPDOMAIN" Secure="yes" />
11 </Fragment>
12
13 <Fragment>
14 <Component Id="Component1" Guid="00030829-0000-0000-C000-000000000046" Directory="INSTALLFOLDER">
15 <File Source="$(sys.SOURCEFILEPATH)" KeyPath="yes" />
16
17 <util:User Id="TEST_USER_test" Name="testName1" Domain="[TEMPDOMAIN]" Password="test123!@#" PasswordExpired="no" />
18 </Component>
19 </Fragment>
20</Wix>