diff options
author | Rob Mensching <rob@firegiant.com> | 2021-04-11 12:23:19 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-04-12 19:28:07 -0700 |
commit | ae7e9817bb10d635e031e51496f2e529595a9cfe (patch) | |
tree | c70942b721dc860dd8ea7d14e90ed0f880030983 /src/wixext/Symbols | |
parent | 13c4becf524dbd12b92f099320726aa0b59f3bbc (diff) | |
download | wix-ae7e9817bb10d635e031e51496f2e529595a9cfe.tar.gz wix-ae7e9817bb10d635e031e51496f2e529595a9cfe.tar.bz2 wix-ae7e9817bb10d635e031e51496f2e529595a9cfe.zip |
Add RemoveRegistryKey
Diffstat (limited to 'src/wixext/Symbols')
-rw-r--r-- | src/wixext/Symbols/UtilSymbolDefinitions.cs | 4 | ||||
-rw-r--r-- | src/wixext/Symbols/WixRemoveRegistryKeyExSymbol.cs | 86 |
2 files changed, 90 insertions, 0 deletions
diff --git a/src/wixext/Symbols/UtilSymbolDefinitions.cs b/src/wixext/Symbols/UtilSymbolDefinitions.cs index 5f062676..72091c3b 100644 --- a/src/wixext/Symbols/UtilSymbolDefinitions.cs +++ b/src/wixext/Symbols/UtilSymbolDefinitions.cs | |||
@@ -23,6 +23,7 @@ namespace WixToolset.Util | |||
23 | WixFormatFiles, | 23 | WixFormatFiles, |
24 | WixInternetShortcut, | 24 | WixInternetShortcut, |
25 | WixRemoveFolderEx, | 25 | WixRemoveFolderEx, |
26 | WixRemoveRegistryKeyEx, | ||
26 | WixRestartResource, | 27 | WixRestartResource, |
27 | WixTouchFile, | 28 | WixTouchFile, |
28 | WixWindowsFeatureSearch, | 29 | WixWindowsFeatureSearch, |
@@ -93,6 +94,9 @@ namespace WixToolset.Util | |||
93 | case UtilSymbolDefinitionType.WixRemoveFolderEx: | 94 | case UtilSymbolDefinitionType.WixRemoveFolderEx: |
94 | return UtilSymbolDefinitions.WixRemoveFolderEx; | 95 | return UtilSymbolDefinitions.WixRemoveFolderEx; |
95 | 96 | ||
97 | case UtilSymbolDefinitionType.WixRemoveRegistryKeyEx: | ||
98 | return UtilSymbolDefinitions.WixRemoveRegistryKeyEx; | ||
99 | |||
96 | case UtilSymbolDefinitionType.WixRestartResource: | 100 | case UtilSymbolDefinitionType.WixRestartResource: |
97 | return UtilSymbolDefinitions.WixRestartResource; | 101 | return UtilSymbolDefinitions.WixRestartResource; |
98 | 102 | ||
diff --git a/src/wixext/Symbols/WixRemoveRegistryKeyExSymbol.cs b/src/wixext/Symbols/WixRemoveRegistryKeyExSymbol.cs new file mode 100644 index 00000000..8e4bd212 --- /dev/null +++ b/src/wixext/Symbols/WixRemoveRegistryKeyExSymbol.cs | |||
@@ -0,0 +1,86 @@ | |||
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 | namespace WixToolset.Util | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Util.Symbols; | ||
7 | |||
8 | public static partial class UtilSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixRemoveRegistryKeyEx = new IntermediateSymbolDefinition( | ||
11 | UtilSymbolDefinitionType.WixRemoveRegistryKeyEx.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixRemoveRegistryKeyExSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixRemoveRegistryKeyExSymbolFields.Root), IntermediateFieldType.Number), | ||
16 | new IntermediateFieldDefinition(nameof(WixRemoveRegistryKeyExSymbolFields.Key), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixRemoveRegistryKeyExSymbolFields.InstallMode), IntermediateFieldType.Number), | ||
18 | new IntermediateFieldDefinition(nameof(WixRemoveRegistryKeyExSymbolFields.Condition), IntermediateFieldType.String), | ||
19 | }, | ||
20 | typeof(WixRemoveRegistryKeyExSymbol)); | ||
21 | } | ||
22 | } | ||
23 | |||
24 | namespace WixToolset.Util.Symbols | ||
25 | { | ||
26 | using WixToolset.Data; | ||
27 | using WixToolset.Data.Symbols; | ||
28 | |||
29 | public enum WixRemoveRegistryKeyExSymbolFields | ||
30 | { | ||
31 | ComponentRef, | ||
32 | Root, | ||
33 | Key, | ||
34 | InstallMode, | ||
35 | Condition, | ||
36 | } | ||
37 | |||
38 | public enum WixRemoveRegistryKeyExInstallMode | ||
39 | { | ||
40 | Install = 1, | ||
41 | Uninstall = 2, | ||
42 | } | ||
43 | |||
44 | public class WixRemoveRegistryKeyExSymbol : IntermediateSymbol | ||
45 | { | ||
46 | public WixRemoveRegistryKeyExSymbol() : base(UtilSymbolDefinitions.WixRemoveRegistryKeyEx, null, null) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | public WixRemoveRegistryKeyExSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.WixRemoveRegistryKeyEx, sourceLineNumber, id) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | public IntermediateField this[WixRemoveRegistryKeyExSymbolFields index] => this.Fields[(int)index]; | ||
55 | |||
56 | public string ComponentRef | ||
57 | { | ||
58 | get => this.Fields[(int)WixRemoveRegistryKeyExSymbolFields.ComponentRef].AsString(); | ||
59 | set => this.Set((int)WixRemoveRegistryKeyExSymbolFields.ComponentRef, value); | ||
60 | } | ||
61 | |||
62 | public RegistryRootType Root | ||
63 | { | ||
64 | get => (RegistryRootType)this.Fields[(int)WixRemoveRegistryKeyExSymbolFields.Root].AsNumber(); | ||
65 | set => this.Set((int)WixRemoveRegistryKeyExSymbolFields.Root, (int)value); | ||
66 | } | ||
67 | |||
68 | public string Key | ||
69 | { | ||
70 | get => (string)this.Fields[(int)WixRemoveRegistryKeyExSymbolFields.Key]; | ||
71 | set => this.Set((int)WixRemoveRegistryKeyExSymbolFields.Key, value); | ||
72 | } | ||
73 | |||
74 | public WixRemoveRegistryKeyExInstallMode InstallMode | ||
75 | { | ||
76 | get => (WixRemoveRegistryKeyExInstallMode)this.Fields[(int)WixRemoveRegistryKeyExSymbolFields.InstallMode].AsNumber(); | ||
77 | set => this.Set((int)WixRemoveRegistryKeyExSymbolFields.InstallMode, (int)value); | ||
78 | } | ||
79 | |||
80 | public string Condition | ||
81 | { | ||
82 | get => this.Fields[(int)WixRemoveRegistryKeyExSymbolFields.Condition].AsString(); | ||
83 | set => this.Set((int)WixRemoveRegistryKeyExSymbolFields.Condition, value); | ||
84 | } | ||
85 | } | ||
86 | } | ||