diff options
Diffstat (limited to 'src')
65 files changed, 22790 insertions, 0 deletions
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 00000000..453aa442 --- /dev/null +++ b/src/Cpp.Build.props | |||
@@ -0,0 +1,101 @@ | |||
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. --> | ||
3 | |||
4 | <Project> | ||
5 | <PropertyGroup> | ||
6 | <Platform Condition=" '$(Platform)' == 'AnyCPU' ">Win32</Platform> | ||
7 | <BaseOutputPath>$(OutputPath)</BaseOutputPath> | ||
8 | <IntDir>$(BaseIntermediateOutputPath)$(Platform)\</IntDir> | ||
9 | <OutDir>$(OutputPath)$(Platform)\</OutDir> | ||
10 | </PropertyGroup> | ||
11 | |||
12 | <ItemDefinitionGroup> | ||
13 | <ClCompile> | ||
14 | <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings> | ||
15 | <WarningLevel>Level4</WarningLevel> | ||
16 | <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
17 | <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
18 | <PrecompiledHeader>Use</PrecompiledHeader> | ||
19 | <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile> | ||
20 | <CallingConvention>StdCall</CallingConvention> | ||
21 | <TreatWarningAsError>true</TreatWarningAsError> | ||
22 | <ExceptionHandling>false</ExceptionHandling> | ||
23 | <AdditionalOptions>-YlprecompDefine</AdditionalOptions> | ||
24 | <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions> | ||
25 | <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation> | ||
26 | </ClCompile> | ||
27 | <ResourceCompile> | ||
28 | <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
29 | <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
30 | </ResourceCompile> | ||
31 | <Lib> | ||
32 | <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
33 | </Lib> | ||
34 | <Link> | ||
35 | <SubSystem>$(ProjectSubSystem)</SubSystem> | ||
36 | <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile> | ||
37 | <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint> | ||
38 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
39 | <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
40 | <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
41 | <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions> | ||
42 | </Link> | ||
43 | </ItemDefinitionGroup> | ||
44 | |||
45 | <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'"> | ||
46 | <ClCompile> | ||
47 | <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet> | ||
48 | </ClCompile> | ||
49 | </ItemDefinitionGroup> | ||
50 | <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' "> | ||
51 | <ClCompile> | ||
52 | <CallingConvention>CDecl</CallingConvention> | ||
53 | </ClCompile> | ||
54 | </ItemDefinitionGroup> | ||
55 | <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' "> | ||
56 | <ClCompile> | ||
57 | <DebugInformationFormat>OldStyle</DebugInformationFormat> | ||
58 | <OmitDefaultLibName>true</OmitDefaultLibName> | ||
59 | <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> | ||
60 | </ClCompile> | ||
61 | </ItemDefinitionGroup> | ||
62 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' "> | ||
63 | <ClCompile> | ||
64 | <Optimization>Disabled</Optimization> | ||
65 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
66 | <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
67 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
68 | </ClCompile> | ||
69 | </ItemDefinitionGroup> | ||
70 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' "> | ||
71 | <ClCompile> | ||
72 | <BasicRuntimeChecks></BasicRuntimeChecks> | ||
73 | <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary> | ||
74 | </ClCompile> | ||
75 | </ItemDefinitionGroup> | ||
76 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' "> | ||
77 | <ClCompile> | ||
78 | <Optimization>MinSpace</Optimization> | ||
79 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
80 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
81 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
82 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
83 | </ClCompile> | ||
84 | <Link> | ||
85 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
86 | <OptimizeReferences>true</OptimizeReferences> | ||
87 | </Link> | ||
88 | </ItemDefinitionGroup> | ||
89 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' "> | ||
90 | <ClCompile> | ||
91 | <BasicRuntimeChecks></BasicRuntimeChecks> | ||
92 | <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> | ||
93 | </ClCompile> | ||
94 | </ItemDefinitionGroup> | ||
95 | <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' "> | ||
96 | <Link> | ||
97 | <KeyFile>$(LinkKeyFile)</KeyFile> | ||
98 | <DelaySign>$(LinkDelaySign)</DelaySign> | ||
99 | </Link> | ||
100 | </ItemDefinitionGroup> | ||
101 | </Project> | ||
diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..63ad5d6e --- /dev/null +++ b/src/Directory.Build.props | |||
@@ -0,0 +1,22 @@ | |||
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. --> | ||
3 | |||
4 | <Project> | ||
5 | <PropertyGroup> | ||
6 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
7 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
8 | <BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath> | ||
9 | <OutputPath>$(MSBuildThisFileDirectory)..\build\$(Configuration)\</OutputPath> | ||
10 | |||
11 | <Authors>WiX Toolset Team</Authors> | ||
12 | <Company>WiX Toolset</Company> | ||
13 | <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright> | ||
14 | </PropertyGroup> | ||
15 | |||
16 | <PropertyGroup> | ||
17 | <WixToolsetRootFolder>$(MSBuildThisFileDirectory)..\..\</WixToolsetRootFolder> | ||
18 | </PropertyGroup> | ||
19 | |||
20 | <Import Project="Cpp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.vcxproj' " /> | ||
21 | <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " /> | ||
22 | </Project> | ||
diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..016dac77 --- /dev/null +++ b/src/FindLocalWix.props | |||
@@ -0,0 +1,8 @@ | |||
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. --> | ||
3 | |||
4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
5 | <PropertyGroup> | ||
6 | <WixTargetsPath Condition=" '$(Configuration)' != 'Release' And Exists('$(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets') ">$(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets</WixTargetsPath> | ||
7 | </PropertyGroup> | ||
8 | </Project> | ||
diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp new file mode 100644 index 00000000..35ae6d1c --- /dev/null +++ b/src/ca/dllmain.cpp | |||
@@ -0,0 +1,26 @@ | |||
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 | #include "precomp.h" | ||
4 | |||
5 | /******************************************************************** | ||
6 | DllMain - standard entry point for all WiX custom actions | ||
7 | |||
8 | ********************************************************************/ | ||
9 | extern "C" BOOL WINAPI DllMain( | ||
10 | IN HINSTANCE hInst, | ||
11 | IN ULONG ulReason, | ||
12 | IN LPVOID) | ||
13 | { | ||
14 | switch(ulReason) | ||
15 | { | ||
16 | case DLL_PROCESS_ATTACH: | ||
17 | WcaGlobalInitialize(hInst); | ||
18 | break; | ||
19 | |||
20 | case DLL_PROCESS_DETACH: | ||
21 | WcaGlobalFinalize(); | ||
22 | break; | ||
23 | } | ||
24 | |||
25 | return TRUE; | ||
26 | } | ||
diff --git a/src/ca/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..b74ff5d0 --- /dev/null +++ b/src/ca/packages.config | |||
@@ -0,0 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <packages> | ||
3 | <package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="1.14.114" targetFramework="native" developmentDependency="true" /> | ||
4 | <package id="WixToolset.DUtil" version="4.0.6" targetFramework="native" /> | ||
5 | <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" /> | ||
6 | </packages> \ No newline at end of file | ||
diff --git a/src/ca/precomp.h b/src/ca/precomp.h new file mode 100644 index 00000000..3edad7ed --- /dev/null +++ b/src/ca/precomp.h | |||
@@ -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 | #include <windows.h> | ||
6 | #include <msiquery.h> | ||
7 | |||
8 | #define MAXUINT USHRT_MAX | ||
9 | #include <Setup.Configuration.h> | ||
10 | |||
11 | #include "wcautil.h" | ||
12 | #include "fileutil.h" | ||
13 | #include "strutil.h" | ||
diff --git a/src/ca/utilca.cpp b/src/ca/utilca.cpp new file mode 100644 index 00000000..37664a1c --- /dev/null +++ b/src/ca/utilca.cpp | |||
@@ -0,0 +1,3 @@ | |||
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 | #include "precomp.h" | ||
diff --git a/src/ca/utilca.def b/src/ca/utilca.def new file mode 100644 index 00000000..4b34b3a4 --- /dev/null +++ b/src/ca/utilca.def | |||
@@ -0,0 +1,7 @@ | |||
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 | LIBRARY "utilca" | ||
5 | |||
6 | EXPORTS | ||
7 | |||
diff --git a/src/ca/utilca.vcxproj b/src/ca/utilca.vcxproj new file mode 100644 index 00000000..37b5c7de --- /dev/null +++ b/src/ca/utilca.vcxproj | |||
@@ -0,0 +1,69 @@ | |||
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. --> | ||
3 | |||
4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
5 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" /> | ||
6 | <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" /> | ||
7 | |||
8 | <ItemGroup Label="ProjectConfigurations"> | ||
9 | <ProjectConfiguration Include="Debug|Win32"> | ||
10 | <Configuration>Debug</Configuration> | ||
11 | <Platform>Win32</Platform> | ||
12 | </ProjectConfiguration> | ||
13 | <ProjectConfiguration Include="Release|Win32"> | ||
14 | <Configuration>Release</Configuration> | ||
15 | <Platform>Win32</Platform> | ||
16 | </ProjectConfiguration> | ||
17 | </ItemGroup> | ||
18 | |||
19 | <PropertyGroup Label="Globals"> | ||
20 | <ProjectGuid>{076018F7-19BD-423A-ABBF-229273DA08D8}</ProjectGuid> | ||
21 | <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
22 | <TargetName>utilca</TargetName> | ||
23 | <PlatformToolset>v141</PlatformToolset> | ||
24 | <CharacterSet>Unicode</CharacterSet> | ||
25 | <ProjectModuleDefinitionFile>utilca.def</ProjectModuleDefinitionFile> | ||
26 | <Description>WiX Toolset Util CustomAction</Description> | ||
27 | </PropertyGroup> | ||
28 | |||
29 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
30 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
31 | |||
32 | <ImportGroup Label="ExtensionSettings"> | ||
33 | </ImportGroup> | ||
34 | |||
35 | <ImportGroup Label="Shared"> | ||
36 | <Import Project="..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" /> | ||
37 | </ImportGroup> | ||
38 | |||
39 | <PropertyGroup> | ||
40 | <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries> | ||
41 | </PropertyGroup> | ||
42 | |||
43 | <ItemGroup> | ||
44 | <ClCompile Include="dllmain.cpp"> | ||
45 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
46 | </ClCompile> | ||
47 | <ClCompile Include="utilca.cpp" /> | ||
48 | </ItemGroup> | ||
49 | |||
50 | <ItemGroup> | ||
51 | <ClInclude Include="precomp.h" /> | ||
52 | </ItemGroup> | ||
53 | |||
54 | <ItemGroup> | ||
55 | <None Include="packages.config" /> | ||
56 | <None Include="utilca.def" /> | ||
57 | </ItemGroup> | ||
58 | |||
59 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
60 | |||
61 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
62 | <PropertyGroup> | ||
63 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
64 | </PropertyGroup> | ||
65 | <Error Condition="!Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets'))" /> | ||
66 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props'))" /> | ||
67 | <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" /> | ||
68 | </Target> | ||
69 | </Project> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.en-us.wxl | |||
@@ -0,0 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | |||
3 | <!-- | ||
4 | This file contains the declaration of all the localizable strings. | ||
5 | --> | ||
6 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
7 | |||
8 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
9 | <String Id="FeatureTitle">MsiPackage</String> | ||
10 | |||
11 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.wxs b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.wxs new file mode 100644 index 00000000..68ff98fd --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.wxs | |||
@@ -0,0 +1,22 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
3 | <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
4 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
5 | |||
6 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
7 | <MediaTemplate /> | ||
8 | |||
9 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
10 | <ComponentGroupRef Id="ProductComponents" /> | ||
11 | </Feature> | ||
12 | |||
13 | </Product> | ||
14 | |||
15 | <Fragment> | ||
16 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
17 | <Directory Id="ProgramFilesFolder"> | ||
18 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
19 | </Directory> | ||
20 | </Directory> | ||
21 | </Fragment> | ||
22 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/PackageComponents.wxs new file mode 100644 index 00000000..c548bc1d --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/PackageComponents.wxs | |||
@@ -0,0 +1,16 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
3 | xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
4 | <Fragment> | ||
5 | <util:User Id="Everyone" Name="Everyone" /> | ||
6 | |||
7 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
8 | <Component> | ||
9 | <File Source="example.txt" /> | ||
10 | <util:FileShare Id="ExampleFileShare" Description="An example file share" Name="example"> | ||
11 | <util:FileSharePermission User="Everyone" Read="yes" /> | ||
12 | </util:FileShare> | ||
13 | </Component> | ||
14 | </ComponentGroup> | ||
15 | </Fragment> | ||
16 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/example.txt b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/example.txt | |||
@@ -0,0 +1 @@ | |||
This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs new file mode 100644 index 00000000..5ce9f5ea --- /dev/null +++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |||
@@ -0,0 +1,34 @@ | |||
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 WixToolsetTest.VisualStudio | ||
4 | { | ||
5 | using System.Linq; | ||
6 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Core.TestPackage; | ||
8 | using WixToolset.Util; | ||
9 | using Xunit; | ||
10 | |||
11 | public class VisualStudioExtensionFixture | ||
12 | { | ||
13 | [Fact] | ||
14 | public void CanBuildUsingFileShare() | ||
15 | { | ||
16 | var folder = TestData.Get(@"TestData\UsingFileShare"); | ||
17 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
18 | |||
19 | var results = build.BuildAndQuery(Build, "FileShare", "FileSharePermissions"); | ||
20 | Assert.Equal(new[] | ||
21 | { | ||
22 | "FileShare:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t0", | ||
23 | "FileSharePermissions:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t0", | ||
24 | }, results.OrderBy(s => s).ToArray()); | ||
25 | } | ||
26 | |||
27 | private static void Build(string[] args) | ||
28 | { | ||
29 | var result = WixRunner.Execute(args, out var messages); | ||
30 | Assert.Equal(0, result); | ||
31 | Assert.Empty(messages); | ||
32 | } | ||
33 | } | ||
34 | } | ||
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj new file mode 100644 index 00000000..9559059d --- /dev/null +++ b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | |||
@@ -0,0 +1,40 @@ | |||
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. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>netcoreapp2.0</TargetFramework> | ||
7 | <IsPackable>false</IsPackable> | ||
8 | </PropertyGroup> | ||
9 | |||
10 | <PropertyGroup> | ||
11 | <NoWarn>NU1701</NoWarn> | ||
12 | </PropertyGroup> | ||
13 | |||
14 | <ItemGroup> | ||
15 | <Content Include="TestData\UsingFileShare\example.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
16 | <Content Include="TestData\UsingFileShare\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
17 | <Content Include="TestData\UsingFileShare\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
18 | <Content Include="TestData\UsingFileShare\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
19 | </ItemGroup> | ||
20 | |||
21 | <ItemGroup> | ||
22 | <ProjectReference Include="..\..\wixext\WixToolset.Util.wixext.csproj" /> | ||
23 | </ItemGroup> | ||
24 | |||
25 | <ItemGroup> | ||
26 | <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj') " /> | ||
27 | <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\wix\wix.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\src\wix\wix.csproj') " /> | ||
28 | <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj') " PrivateAssets="all" /> | ||
29 | </ItemGroup> | ||
30 | |||
31 | <ItemGroup> | ||
32 | <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" /> | ||
33 | </ItemGroup> | ||
34 | |||
35 | <ItemGroup> | ||
36 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" /> | ||
37 | <PackageReference Include="xunit" Version="2.2.0" /> | ||
38 | <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /> | ||
39 | </ItemGroup> | ||
40 | </Project> | ||
diff --git a/src/wixext/PerformanceCounterType.cs b/src/wixext/PerformanceCounterType.cs new file mode 100644 index 00000000..1e06efd3 --- /dev/null +++ b/src/wixext/PerformanceCounterType.cs | |||
@@ -0,0 +1,192 @@ | |||
1 | // Captured from: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll | ||
2 | |||
3 | namespace System.Diagnostics | ||
4 | { | ||
5 | public enum PerformanceCounterType | ||
6 | { | ||
7 | // | ||
8 | // Summary: | ||
9 | // An instantaneous counter that shows the most recently observed value in hexadecimal | ||
10 | // format. Used, for example, to maintain a simple count of items or operations. | ||
11 | NumberOfItemsHEX32 = 0, | ||
12 | // | ||
13 | // Summary: | ||
14 | // An instantaneous counter that shows the most recently observed value. Used, for | ||
15 | // example, to maintain a simple count of a very large number of items or operations. | ||
16 | // It is the same as NumberOfItemsHEX32 except that it uses larger fields to accommodate | ||
17 | // larger values. | ||
18 | NumberOfItemsHEX64 = 256, | ||
19 | // | ||
20 | // Summary: | ||
21 | // An instantaneous counter that shows the most recently observed value. Used, for | ||
22 | // example, to maintain a simple count of items or operations. | ||
23 | NumberOfItems32 = 65536, | ||
24 | // | ||
25 | // Summary: | ||
26 | // An instantaneous counter that shows the most recently observed value. Used, for | ||
27 | // example, to maintain a simple count of a very large number of items or operations. | ||
28 | // It is the same as NumberOfItems32 except that it uses larger fields to accommodate | ||
29 | // larger values. | ||
30 | NumberOfItems64 = 65792, | ||
31 | // | ||
32 | // Summary: | ||
33 | // A difference counter that shows the change in the measured attribute between | ||
34 | // the two most recent sample intervals. | ||
35 | CounterDelta32 = 4195328, | ||
36 | // | ||
37 | // Summary: | ||
38 | // A difference counter that shows the change in the measured attribute between | ||
39 | // the two most recent sample intervals. It is the same as the CounterDelta32 counter | ||
40 | // type except that is uses larger fields to accomodate larger values. | ||
41 | CounterDelta64 = 4195584, | ||
42 | // | ||
43 | // Summary: | ||
44 | // An average counter that shows the average number of operations completed in one | ||
45 | // second. When a counter of this type samples the data, each sampling interrupt | ||
46 | // returns one or zero. The counter data is the number of ones that were sampled. | ||
47 | // It measures time in units of ticks of the system performance timer. | ||
48 | SampleCounter = 4260864, | ||
49 | // | ||
50 | // Summary: | ||
51 | // An average counter designed to monitor the average length of a queue to a resource | ||
52 | // over time. It shows the difference between the queue lengths observed during | ||
53 | // the last two sample intervals divided by the duration of the interval. This type | ||
54 | // of counter is typically used to track the number of items that are queued or | ||
55 | // waiting. | ||
56 | CountPerTimeInterval32 = 4523008, | ||
57 | // | ||
58 | // Summary: | ||
59 | // An average counter that monitors the average length of a queue to a resource | ||
60 | // over time. Counters of this type display the difference between the queue lengths | ||
61 | // observed during the last two sample intervals, divided by the duration of the | ||
62 | // interval. This counter type is the same as CountPerTimeInterval32 except that | ||
63 | // it uses larger fields to accommodate larger values. This type of counter is typically | ||
64 | // used to track a high-volume or very large number of items that are queued or | ||
65 | // waiting. | ||
66 | CountPerTimeInterval64 = 4523264, | ||
67 | // | ||
68 | // Summary: | ||
69 | // A difference counter that shows the average number of operations completed during | ||
70 | // each second of the sample interval. Counters of this type measure time in ticks | ||
71 | // of the system clock. | ||
72 | RateOfCountsPerSecond32 = 272696320, | ||
73 | // | ||
74 | // Summary: | ||
75 | // A difference counter that shows the average number of operations completed during | ||
76 | // each second of the sample interval. Counters of this type measure time in ticks | ||
77 | // of the system clock. This counter type is the same as the RateOfCountsPerSecond32 | ||
78 | // type, but it uses larger fields to accommodate larger values to track a high-volume | ||
79 | // number of items or operations per second, such as a byte-transmission rate. | ||
80 | RateOfCountsPerSecond64 = 272696576, | ||
81 | // | ||
82 | // Summary: | ||
83 | // An instantaneous percentage counter that shows the ratio of a subset to its set | ||
84 | // as a percentage. For example, it compares the number of bytes in use on a disk | ||
85 | // to the total number of bytes on the disk. Counters of this type display the current | ||
86 | // percentage only, not an average over time. | ||
87 | RawFraction = 537003008, | ||
88 | // | ||
89 | // Summary: | ||
90 | // A percentage counter that shows the average time that a component is active as | ||
91 | // a percentage of the total sample time. | ||
92 | CounterTimer = 541132032, | ||
93 | // | ||
94 | // Summary: | ||
95 | // A percentage counter that shows the active time of a component as a percentage | ||
96 | // of the total elapsed time of the sample interval. It measures time in units of | ||
97 | // 100 nanoseconds (ns). Counters of this type are designed to measure the activity | ||
98 | // of one component at a time. | ||
99 | Timer100Ns = 542180608, | ||
100 | // | ||
101 | // Summary: | ||
102 | // A percentage counter that shows the average ratio of hits to all operations during | ||
103 | // the last two sample intervals. | ||
104 | SampleFraction = 549585920, | ||
105 | // | ||
106 | // Summary: | ||
107 | // A percentage counter that displays the average percentage of active time observed | ||
108 | // during sample interval. The value of these counters is calculated by monitoring | ||
109 | // the percentage of time that the service was inactive and then subtracting that | ||
110 | // value from 100 percent. | ||
111 | CounterTimerInverse = 557909248, | ||
112 | // | ||
113 | // Summary: | ||
114 | // A percentage counter that shows the average percentage of active time observed | ||
115 | // during the sample interval. | ||
116 | Timer100NsInverse = 558957824, | ||
117 | // | ||
118 | // Summary: | ||
119 | // A percentage counter that displays the active time of one or more components | ||
120 | // as a percentage of the total time of the sample interval. Because the numerator | ||
121 | // records the active time of components operating simultaneously, the resulting | ||
122 | // percentage can exceed 100 percent. | ||
123 | CounterMultiTimer = 574686464, | ||
124 | // | ||
125 | // Summary: | ||
126 | // A percentage counter that shows the active time of one or more components as | ||
127 | // a percentage of the total time of the sample interval. It measures time in 100 | ||
128 | // nanosecond (ns) units. | ||
129 | CounterMultiTimer100Ns = 575735040, | ||
130 | // | ||
131 | // Summary: | ||
132 | // A percentage counter that shows the active time of one or more components as | ||
133 | // a percentage of the total time of the sample interval. It derives the active | ||
134 | // time by measuring the time that the components were not active and subtracting | ||
135 | // the result from 100 percent by the number of objects monitored. | ||
136 | CounterMultiTimerInverse = 591463680, | ||
137 | // | ||
138 | // Summary: | ||
139 | // A percentage counter that shows the active time of one or more components as | ||
140 | // a percentage of the total time of the sample interval. Counters of this type | ||
141 | // measure time in 100 nanosecond (ns) units. They derive the active time by measuring | ||
142 | // the time that the components were not active and subtracting the result from | ||
143 | // multiplying 100 percent by the number of objects monitored. | ||
144 | CounterMultiTimer100NsInverse = 592512256, | ||
145 | // | ||
146 | // Summary: | ||
147 | // An average counter that measures the time it takes, on average, to complete a | ||
148 | // process or operation. Counters of this type display a ratio of the total elapsed | ||
149 | // time of the sample interval to the number of processes or operations completed | ||
150 | // during that time. This counter type measures time in ticks of the system clock. | ||
151 | AverageTimer32 = 805438464, | ||
152 | // | ||
153 | // Summary: | ||
154 | // A difference timer that shows the total time between when the component or process | ||
155 | // started and the time when this value is calculated. | ||
156 | ElapsedTime = 807666944, | ||
157 | // | ||
158 | // Summary: | ||
159 | // An average counter that shows how many items are processed, on average, during | ||
160 | // an operation. Counters of this type display a ratio of the items processed to | ||
161 | // the number of operations completed. The ratio is calculated by comparing the | ||
162 | // number of items processed during the last interval to the number of operations | ||
163 | // completed during the last interval. | ||
164 | AverageCount64 = 1073874176, | ||
165 | // | ||
166 | // Summary: | ||
167 | // A base counter that stores the number of sampling interrupts taken and is used | ||
168 | // as a denominator in the sampling fraction. The sampling fraction is the number | ||
169 | // of samples that were 1 (or true) for a sample interrupt. Check that this value | ||
170 | // is greater than zero before using it as the denominator in a calculation of SampleFraction. | ||
171 | SampleBase = 1073939457, | ||
172 | // | ||
173 | // Summary: | ||
174 | // A base counter that is used in the calculation of time or count averages, such | ||
175 | // as AverageTimer32 and AverageCount64. Stores the denominator for calculating | ||
176 | // a counter to present "time per operation" or "count per operation". | ||
177 | AverageBase = 1073939458, | ||
178 | // | ||
179 | // Summary: | ||
180 | // A base counter that stores the denominator of a counter that presents a general | ||
181 | // arithmetic fraction. Check that this value is greater than zero before using | ||
182 | // it as the denominator in a RawFraction value calculation. | ||
183 | RawBase = 1073939459, | ||
184 | // | ||
185 | // Summary: | ||
186 | // A base counter that indicates the number of items sampled. It is used as the | ||
187 | // denominator in the calculations to get an average among the items sampled when | ||
188 | // taking timings of multiple, but similar items. Used with CounterMultiTimer, CounterMultiTimerInverse, | ||
189 | // CounterMultiTimer100Ns, and CounterMultiTimer100NsInverse. | ||
190 | CounterMultiBase = 1107494144 | ||
191 | } | ||
192 | } | ||
diff --git a/src/wixext/Tuples/EventManifestTuple.cs b/src/wixext/Tuples/EventManifestTuple.cs new file mode 100644 index 00000000..b74d2d59 --- /dev/null +++ b/src/wixext/Tuples/EventManifestTuple.cs | |||
@@ -0,0 +1,55 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition EventManifest = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.EventManifest.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(EventManifestTupleFields.Component_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(EventManifestTupleFields.File), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(EventManifestTuple)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Util.Tuples | ||
22 | { | ||
23 | using WixToolset.Data; | ||
24 | |||
25 | public enum EventManifestTupleFields | ||
26 | { | ||
27 | Component_, | ||
28 | File, | ||
29 | } | ||
30 | |||
31 | public class EventManifestTuple : IntermediateTuple | ||
32 | { | ||
33 | public EventManifestTuple() : base(UtilTupleDefinitions.EventManifest, null, null) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | public EventManifestTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.EventManifest, sourceLineNumber, id) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public IntermediateField this[EventManifestTupleFields index] => this.Fields[(int)index]; | ||
42 | |||
43 | public string Component_ | ||
44 | { | ||
45 | get => this.Fields[(int)EventManifestTupleFields.Component_].AsString(); | ||
46 | set => this.Set((int)EventManifestTupleFields.Component_, value); | ||
47 | } | ||
48 | |||
49 | public string File | ||
50 | { | ||
51 | get => this.Fields[(int)EventManifestTupleFields.File].AsString(); | ||
52 | set => this.Set((int)EventManifestTupleFields.File, value); | ||
53 | } | ||
54 | } | ||
55 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/FileSharePermissionsTuple.cs b/src/wixext/Tuples/FileSharePermissionsTuple.cs new file mode 100644 index 00000000..3f037e0e --- /dev/null +++ b/src/wixext/Tuples/FileSharePermissionsTuple.cs | |||
@@ -0,0 +1,63 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition FileSharePermissions = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.FileSharePermissions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(FileSharePermissionsTupleFields.FileShare_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(FileSharePermissionsTupleFields.User_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(FileSharePermissionsTupleFields.Permissions), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(FileSharePermissionsTuple)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Util.Tuples | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum FileSharePermissionsTupleFields | ||
27 | { | ||
28 | FileShare_, | ||
29 | User_, | ||
30 | Permissions, | ||
31 | } | ||
32 | |||
33 | public class FileSharePermissionsTuple : IntermediateTuple | ||
34 | { | ||
35 | public FileSharePermissionsTuple() : base(UtilTupleDefinitions.FileSharePermissions, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public FileSharePermissionsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.FileSharePermissions, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[FileSharePermissionsTupleFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string FileShare_ | ||
46 | { | ||
47 | get => this.Fields[(int)FileSharePermissionsTupleFields.FileShare_].AsString(); | ||
48 | set => this.Set((int)FileSharePermissionsTupleFields.FileShare_, value); | ||
49 | } | ||
50 | |||
51 | public string User_ | ||
52 | { | ||
53 | get => this.Fields[(int)FileSharePermissionsTupleFields.User_].AsString(); | ||
54 | set => this.Set((int)FileSharePermissionsTupleFields.User_, value); | ||
55 | } | ||
56 | |||
57 | public int Permissions | ||
58 | { | ||
59 | get => this.Fields[(int)FileSharePermissionsTupleFields.Permissions].AsNumber(); | ||
60 | set => this.Set((int)FileSharePermissionsTupleFields.Permissions, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/FileShareTuple.cs b/src/wixext/Tuples/FileShareTuple.cs new file mode 100644 index 00000000..043f24bd --- /dev/null +++ b/src/wixext/Tuples/FileShareTuple.cs | |||
@@ -0,0 +1,95 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition FileShare = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.FileShare.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.FileShare), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.ShareName), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.Component_), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.Description), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.Directory_), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.User_), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(FileShareTupleFields.Permissions), IntermediateFieldType.Number), | ||
21 | }, | ||
22 | typeof(FileShareTuple)); | ||
23 | } | ||
24 | } | ||
25 | |||
26 | namespace WixToolset.Util.Tuples | ||
27 | { | ||
28 | using WixToolset.Data; | ||
29 | |||
30 | public enum FileShareTupleFields | ||
31 | { | ||
32 | FileShare, | ||
33 | ShareName, | ||
34 | Component_, | ||
35 | Description, | ||
36 | Directory_, | ||
37 | User_, | ||
38 | Permissions, | ||
39 | } | ||
40 | |||
41 | public class FileShareTuple : IntermediateTuple | ||
42 | { | ||
43 | public FileShareTuple() : base(UtilTupleDefinitions.FileShare, null, null) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public FileShareTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.FileShare, sourceLineNumber, id) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public IntermediateField this[FileShareTupleFields index] => this.Fields[(int)index]; | ||
52 | |||
53 | public string FileShare | ||
54 | { | ||
55 | get => this.Fields[(int)FileShareTupleFields.FileShare].AsString(); | ||
56 | set => this.Set((int)FileShareTupleFields.FileShare, value); | ||
57 | } | ||
58 | |||
59 | public string ShareName | ||
60 | { | ||
61 | get => this.Fields[(int)FileShareTupleFields.ShareName].AsString(); | ||
62 | set => this.Set((int)FileShareTupleFields.ShareName, value); | ||
63 | } | ||
64 | |||
65 | public string Component_ | ||
66 | { | ||
67 | get => this.Fields[(int)FileShareTupleFields.Component_].AsString(); | ||
68 | set => this.Set((int)FileShareTupleFields.Component_, value); | ||
69 | } | ||
70 | |||
71 | public string Description | ||
72 | { | ||
73 | get => this.Fields[(int)FileShareTupleFields.Description].AsString(); | ||
74 | set => this.Set((int)FileShareTupleFields.Description, value); | ||
75 | } | ||
76 | |||
77 | public string Directory_ | ||
78 | { | ||
79 | get => this.Fields[(int)FileShareTupleFields.Directory_].AsString(); | ||
80 | set => this.Set((int)FileShareTupleFields.Directory_, value); | ||
81 | } | ||
82 | |||
83 | public string User_ | ||
84 | { | ||
85 | get => this.Fields[(int)FileShareTupleFields.User_].AsString(); | ||
86 | set => this.Set((int)FileShareTupleFields.User_, value); | ||
87 | } | ||
88 | |||
89 | public int Permissions | ||
90 | { | ||
91 | get => this.Fields[(int)FileShareTupleFields.Permissions].AsNumber(); | ||
92 | set => this.Set((int)FileShareTupleFields.Permissions, value); | ||
93 | } | ||
94 | } | ||
95 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/GroupTuple.cs b/src/wixext/Tuples/GroupTuple.cs new file mode 100644 index 00000000..97335714 --- /dev/null +++ b/src/wixext/Tuples/GroupTuple.cs | |||
@@ -0,0 +1,71 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition Group = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.Group.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Group), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Name), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Domain), IntermediateFieldType.String), | ||
18 | }, | ||
19 | typeof(GroupTuple)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Util.Tuples | ||
24 | { | ||
25 | using WixToolset.Data; | ||
26 | |||
27 | public enum GroupTupleFields | ||
28 | { | ||
29 | Group, | ||
30 | Component_, | ||
31 | Name, | ||
32 | Domain, | ||
33 | } | ||
34 | |||
35 | public class GroupTuple : IntermediateTuple | ||
36 | { | ||
37 | public GroupTuple() : base(UtilTupleDefinitions.Group, null, null) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public GroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.Group, sourceLineNumber, id) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public IntermediateField this[GroupTupleFields index] => this.Fields[(int)index]; | ||
46 | |||
47 | public string Group | ||
48 | { | ||
49 | get => this.Fields[(int)GroupTupleFields.Group].AsString(); | ||
50 | set => this.Set((int)GroupTupleFields.Group, value); | ||
51 | } | ||
52 | |||
53 | public string Component_ | ||
54 | { | ||
55 | get => this.Fields[(int)GroupTupleFields.Component_].AsString(); | ||
56 | set => this.Set((int)GroupTupleFields.Component_, value); | ||
57 | } | ||
58 | |||
59 | public string Name | ||
60 | { | ||
61 | get => this.Fields[(int)GroupTupleFields.Name].AsString(); | ||
62 | set => this.Set((int)GroupTupleFields.Name, value); | ||
63 | } | ||
64 | |||
65 | public string Domain | ||
66 | { | ||
67 | get => this.Fields[(int)GroupTupleFields.Domain].AsString(); | ||
68 | set => this.Set((int)GroupTupleFields.Domain, value); | ||
69 | } | ||
70 | } | ||
71 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/PerfmonManifestTuple.cs b/src/wixext/Tuples/PerfmonManifestTuple.cs new file mode 100644 index 00000000..3f6cb8cc --- /dev/null +++ b/src/wixext/Tuples/PerfmonManifestTuple.cs | |||
@@ -0,0 +1,63 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition PerfmonManifest = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.PerfmonManifest.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(PerfmonManifestTupleFields.Component_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(PerfmonManifestTupleFields.File), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(PerfmonManifestTupleFields.ResourceFileDirectory), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(PerfmonManifestTuple)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Util.Tuples | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum PerfmonManifestTupleFields | ||
27 | { | ||
28 | Component_, | ||
29 | File, | ||
30 | ResourceFileDirectory, | ||
31 | } | ||
32 | |||
33 | public class PerfmonManifestTuple : IntermediateTuple | ||
34 | { | ||
35 | public PerfmonManifestTuple() : base(UtilTupleDefinitions.PerfmonManifest, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public PerfmonManifestTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.PerfmonManifest, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[PerfmonManifestTupleFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string Component_ | ||
46 | { | ||
47 | get => this.Fields[(int)PerfmonManifestTupleFields.Component_].AsString(); | ||
48 | set => this.Set((int)PerfmonManifestTupleFields.Component_, value); | ||
49 | } | ||
50 | |||
51 | public string File | ||
52 | { | ||
53 | get => this.Fields[(int)PerfmonManifestTupleFields.File].AsString(); | ||
54 | set => this.Set((int)PerfmonManifestTupleFields.File, value); | ||
55 | } | ||
56 | |||
57 | public string ResourceFileDirectory | ||
58 | { | ||
59 | get => this.Fields[(int)PerfmonManifestTupleFields.ResourceFileDirectory].AsString(); | ||
60 | set => this.Set((int)PerfmonManifestTupleFields.ResourceFileDirectory, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/PerfmonTuple.cs b/src/wixext/Tuples/PerfmonTuple.cs new file mode 100644 index 00000000..00ea818b --- /dev/null +++ b/src/wixext/Tuples/PerfmonTuple.cs | |||
@@ -0,0 +1,63 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition Perfmon = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.Perfmon.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(PerfmonTupleFields.Component_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(PerfmonTupleFields.File), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(PerfmonTupleFields.Name), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(PerfmonTuple)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Util.Tuples | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum PerfmonTupleFields | ||
27 | { | ||
28 | Component_, | ||
29 | File, | ||
30 | Name, | ||
31 | } | ||
32 | |||
33 | public class PerfmonTuple : IntermediateTuple | ||
34 | { | ||
35 | public PerfmonTuple() : base(UtilTupleDefinitions.Perfmon, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public PerfmonTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.Perfmon, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[PerfmonTupleFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string Component_ | ||
46 | { | ||
47 | get => this.Fields[(int)PerfmonTupleFields.Component_].AsString(); | ||
48 | set => this.Set((int)PerfmonTupleFields.Component_, value); | ||
49 | } | ||
50 | |||
51 | public string File | ||
52 | { | ||
53 | get => this.Fields[(int)PerfmonTupleFields.File].AsString(); | ||
54 | set => this.Set((int)PerfmonTupleFields.File, value); | ||
55 | } | ||
56 | |||
57 | public string Name | ||
58 | { | ||
59 | get => this.Fields[(int)PerfmonTupleFields.Name].AsString(); | ||
60 | set => this.Set((int)PerfmonTupleFields.Name, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/PerformanceCategoryTuple.cs b/src/wixext/Tuples/PerformanceCategoryTuple.cs new file mode 100644 index 00000000..ec2ba73d --- /dev/null +++ b/src/wixext/Tuples/PerformanceCategoryTuple.cs | |||
@@ -0,0 +1,79 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition PerformanceCategory = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.PerformanceCategory.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(PerformanceCategoryTupleFields.PerformanceCategory), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(PerformanceCategoryTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(PerformanceCategoryTupleFields.Name), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(PerformanceCategoryTupleFields.IniData), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(PerformanceCategoryTupleFields.ConstantData), IntermediateFieldType.String), | ||
19 | }, | ||
20 | typeof(PerformanceCategoryTuple)); | ||
21 | } | ||
22 | } | ||
23 | |||
24 | namespace WixToolset.Util.Tuples | ||
25 | { | ||
26 | using WixToolset.Data; | ||
27 | |||
28 | public enum PerformanceCategoryTupleFields | ||
29 | { | ||
30 | PerformanceCategory, | ||
31 | Component_, | ||
32 | Name, | ||
33 | IniData, | ||
34 | ConstantData, | ||
35 | } | ||
36 | |||
37 | public class PerformanceCategoryTuple : IntermediateTuple | ||
38 | { | ||
39 | public PerformanceCategoryTuple() : base(UtilTupleDefinitions.PerformanceCategory, null, null) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public PerformanceCategoryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.PerformanceCategory, sourceLineNumber, id) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public IntermediateField this[PerformanceCategoryTupleFields index] => this.Fields[(int)index]; | ||
48 | |||
49 | public string PerformanceCategory | ||
50 | { | ||
51 | get => this.Fields[(int)PerformanceCategoryTupleFields.PerformanceCategory].AsString(); | ||
52 | set => this.Set((int)PerformanceCategoryTupleFields.PerformanceCategory, value); | ||
53 | } | ||
54 | |||
55 | public string Component_ | ||
56 | { | ||
57 | get => this.Fields[(int)PerformanceCategoryTupleFields.Component_].AsString(); | ||
58 | set => this.Set((int)PerformanceCategoryTupleFields.Component_, value); | ||
59 | } | ||
60 | |||
61 | public string Name | ||
62 | { | ||
63 | get => this.Fields[(int)PerformanceCategoryTupleFields.Name].AsString(); | ||
64 | set => this.Set((int)PerformanceCategoryTupleFields.Name, value); | ||
65 | } | ||
66 | |||
67 | public string IniData | ||
68 | { | ||
69 | get => this.Fields[(int)PerformanceCategoryTupleFields.IniData].AsString(); | ||
70 | set => this.Set((int)PerformanceCategoryTupleFields.IniData, value); | ||
71 | } | ||
72 | |||
73 | public string ConstantData | ||
74 | { | ||
75 | get => this.Fields[(int)PerformanceCategoryTupleFields.ConstantData].AsString(); | ||
76 | set => this.Set((int)PerformanceCategoryTupleFields.ConstantData, value); | ||
77 | } | ||
78 | } | ||
79 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/SecureObjectsTuple.cs b/src/wixext/Tuples/SecureObjectsTuple.cs new file mode 100644 index 00000000..f54b23d8 --- /dev/null +++ b/src/wixext/Tuples/SecureObjectsTuple.cs | |||
@@ -0,0 +1,87 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition SecureObjects = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.SecureObjects.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(SecureObjectsTupleFields.SecureObject), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(SecureObjectsTupleFields.Table), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(SecureObjectsTupleFields.Domain), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(SecureObjectsTupleFields.User), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(SecureObjectsTupleFields.Permission), IntermediateFieldType.Number), | ||
19 | new IntermediateFieldDefinition(nameof(SecureObjectsTupleFields.Component_), IntermediateFieldType.String), | ||
20 | }, | ||
21 | typeof(SecureObjectsTuple)); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | namespace WixToolset.Util.Tuples | ||
26 | { | ||
27 | using WixToolset.Data; | ||
28 | |||
29 | public enum SecureObjectsTupleFields | ||
30 | { | ||
31 | SecureObject, | ||
32 | Table, | ||
33 | Domain, | ||
34 | User, | ||
35 | Permission, | ||
36 | Component_, | ||
37 | } | ||
38 | |||
39 | public class SecureObjectsTuple : IntermediateTuple | ||
40 | { | ||
41 | public SecureObjectsTuple() : base(UtilTupleDefinitions.SecureObjects, null, null) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public SecureObjectsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.SecureObjects, sourceLineNumber, id) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | public IntermediateField this[SecureObjectsTupleFields index] => this.Fields[(int)index]; | ||
50 | |||
51 | public string SecureObject | ||
52 | { | ||
53 | get => this.Fields[(int)SecureObjectsTupleFields.SecureObject].AsString(); | ||
54 | set => this.Set((int)SecureObjectsTupleFields.SecureObject, value); | ||
55 | } | ||
56 | |||
57 | public string Table | ||
58 | { | ||
59 | get => this.Fields[(int)SecureObjectsTupleFields.Table].AsString(); | ||
60 | set => this.Set((int)SecureObjectsTupleFields.Table, value); | ||
61 | } | ||
62 | |||
63 | public string Domain | ||
64 | { | ||
65 | get => this.Fields[(int)SecureObjectsTupleFields.Domain].AsString(); | ||
66 | set => this.Set((int)SecureObjectsTupleFields.Domain, value); | ||
67 | } | ||
68 | |||
69 | public string User | ||
70 | { | ||
71 | get => this.Fields[(int)SecureObjectsTupleFields.User].AsString(); | ||
72 | set => this.Set((int)SecureObjectsTupleFields.User, value); | ||
73 | } | ||
74 | |||
75 | public int Permission | ||
76 | { | ||
77 | get => this.Fields[(int)SecureObjectsTupleFields.Permission].AsNumber(); | ||
78 | set => this.Set((int)SecureObjectsTupleFields.Permission, value); | ||
79 | } | ||
80 | |||
81 | public string Component_ | ||
82 | { | ||
83 | get => this.Fields[(int)SecureObjectsTupleFields.Component_].AsString(); | ||
84 | set => this.Set((int)SecureObjectsTupleFields.Component_, value); | ||
85 | } | ||
86 | } | ||
87 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/ServiceConfigTuple.cs b/src/wixext/Tuples/ServiceConfigTuple.cs new file mode 100644 index 00000000..74d96bca --- /dev/null +++ b/src/wixext/Tuples/ServiceConfigTuple.cs | |||
@@ -0,0 +1,119 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition ServiceConfig = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.ServiceConfig.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.ServiceName), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.NewService), IntermediateFieldType.Number), | ||
17 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.FirstFailureActionType), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.SecondFailureActionType), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.ThirdFailureActionType), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.ResetPeriodInDays), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.RestartServiceDelayInSeconds), IntermediateFieldType.Number), | ||
22 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.ProgramCommandLine), IntermediateFieldType.String), | ||
23 | new IntermediateFieldDefinition(nameof(ServiceConfigTupleFields.RebootMessage), IntermediateFieldType.String), | ||
24 | }, | ||
25 | typeof(ServiceConfigTuple)); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | namespace WixToolset.Util.Tuples | ||
30 | { | ||
31 | using WixToolset.Data; | ||
32 | |||
33 | public enum ServiceConfigTupleFields | ||
34 | { | ||
35 | ServiceName, | ||
36 | Component_, | ||
37 | NewService, | ||
38 | FirstFailureActionType, | ||
39 | SecondFailureActionType, | ||
40 | ThirdFailureActionType, | ||
41 | ResetPeriodInDays, | ||
42 | RestartServiceDelayInSeconds, | ||
43 | ProgramCommandLine, | ||
44 | RebootMessage, | ||
45 | } | ||
46 | |||
47 | public class ServiceConfigTuple : IntermediateTuple | ||
48 | { | ||
49 | public ServiceConfigTuple() : base(UtilTupleDefinitions.ServiceConfig, null, null) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | public ServiceConfigTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.ServiceConfig, sourceLineNumber, id) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | public IntermediateField this[ServiceConfigTupleFields index] => this.Fields[(int)index]; | ||
58 | |||
59 | public string ServiceName | ||
60 | { | ||
61 | get => this.Fields[(int)ServiceConfigTupleFields.ServiceName].AsString(); | ||
62 | set => this.Set((int)ServiceConfigTupleFields.ServiceName, value); | ||
63 | } | ||
64 | |||
65 | public string Component_ | ||
66 | { | ||
67 | get => this.Fields[(int)ServiceConfigTupleFields.Component_].AsString(); | ||
68 | set => this.Set((int)ServiceConfigTupleFields.Component_, value); | ||
69 | } | ||
70 | |||
71 | public int NewService | ||
72 | { | ||
73 | get => this.Fields[(int)ServiceConfigTupleFields.NewService].AsNumber(); | ||
74 | set => this.Set((int)ServiceConfigTupleFields.NewService, value); | ||
75 | } | ||
76 | |||
77 | public string FirstFailureActionType | ||
78 | { | ||
79 | get => this.Fields[(int)ServiceConfigTupleFields.FirstFailureActionType].AsString(); | ||
80 | set => this.Set((int)ServiceConfigTupleFields.FirstFailureActionType, value); | ||
81 | } | ||
82 | |||
83 | public string SecondFailureActionType | ||
84 | { | ||
85 | get => this.Fields[(int)ServiceConfigTupleFields.SecondFailureActionType].AsString(); | ||
86 | set => this.Set((int)ServiceConfigTupleFields.SecondFailureActionType, value); | ||
87 | } | ||
88 | |||
89 | public string ThirdFailureActionType | ||
90 | { | ||
91 | get => this.Fields[(int)ServiceConfigTupleFields.ThirdFailureActionType].AsString(); | ||
92 | set => this.Set((int)ServiceConfigTupleFields.ThirdFailureActionType, value); | ||
93 | } | ||
94 | |||
95 | public int ResetPeriodInDays | ||
96 | { | ||
97 | get => this.Fields[(int)ServiceConfigTupleFields.ResetPeriodInDays].AsNumber(); | ||
98 | set => this.Set((int)ServiceConfigTupleFields.ResetPeriodInDays, value); | ||
99 | } | ||
100 | |||
101 | public int RestartServiceDelayInSeconds | ||
102 | { | ||
103 | get => this.Fields[(int)ServiceConfigTupleFields.RestartServiceDelayInSeconds].AsNumber(); | ||
104 | set => this.Set((int)ServiceConfigTupleFields.RestartServiceDelayInSeconds, value); | ||
105 | } | ||
106 | |||
107 | public string ProgramCommandLine | ||
108 | { | ||
109 | get => this.Fields[(int)ServiceConfigTupleFields.ProgramCommandLine].AsString(); | ||
110 | set => this.Set((int)ServiceConfigTupleFields.ProgramCommandLine, value); | ||
111 | } | ||
112 | |||
113 | public string RebootMessage | ||
114 | { | ||
115 | get => this.Fields[(int)ServiceConfigTupleFields.RebootMessage].AsString(); | ||
116 | set => this.Set((int)ServiceConfigTupleFields.RebootMessage, value); | ||
117 | } | ||
118 | } | ||
119 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/UserGroupTuple.cs b/src/wixext/Tuples/UserGroupTuple.cs new file mode 100644 index 00000000..0386a26e --- /dev/null +++ b/src/wixext/Tuples/UserGroupTuple.cs | |||
@@ -0,0 +1,55 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition UserGroup = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.UserGroup.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(UserGroupTupleFields.User_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(UserGroupTupleFields.Group_), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(UserGroupTuple)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Util.Tuples | ||
22 | { | ||
23 | using WixToolset.Data; | ||
24 | |||
25 | public enum UserGroupTupleFields | ||
26 | { | ||
27 | User_, | ||
28 | Group_, | ||
29 | } | ||
30 | |||
31 | public class UserGroupTuple : IntermediateTuple | ||
32 | { | ||
33 | public UserGroupTuple() : base(UtilTupleDefinitions.UserGroup, null, null) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | public UserGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.UserGroup, sourceLineNumber, id) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public IntermediateField this[UserGroupTupleFields index] => this.Fields[(int)index]; | ||
42 | |||
43 | public string User_ | ||
44 | { | ||
45 | get => this.Fields[(int)UserGroupTupleFields.User_].AsString(); | ||
46 | set => this.Set((int)UserGroupTupleFields.User_, value); | ||
47 | } | ||
48 | |||
49 | public string Group_ | ||
50 | { | ||
51 | get => this.Fields[(int)UserGroupTupleFields.Group_].AsString(); | ||
52 | set => this.Set((int)UserGroupTupleFields.Group_, value); | ||
53 | } | ||
54 | } | ||
55 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/UserTuple.cs b/src/wixext/Tuples/UserTuple.cs new file mode 100644 index 00000000..e8c5315c --- /dev/null +++ b/src/wixext/Tuples/UserTuple.cs | |||
@@ -0,0 +1,87 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition User = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.User.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(UserTupleFields.User), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(UserTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(UserTupleFields.Name), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(UserTupleFields.Domain), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(UserTupleFields.Password), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(UserTupleFields.Attributes), IntermediateFieldType.Number), | ||
20 | }, | ||
21 | typeof(UserTuple)); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | namespace WixToolset.Util.Tuples | ||
26 | { | ||
27 | using WixToolset.Data; | ||
28 | |||
29 | public enum UserTupleFields | ||
30 | { | ||
31 | User, | ||
32 | Component_, | ||
33 | Name, | ||
34 | Domain, | ||
35 | Password, | ||
36 | Attributes, | ||
37 | } | ||
38 | |||
39 | public class UserTuple : IntermediateTuple | ||
40 | { | ||
41 | public UserTuple() : base(UtilTupleDefinitions.User, null, null) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public UserTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.User, sourceLineNumber, id) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | public IntermediateField this[UserTupleFields index] => this.Fields[(int)index]; | ||
50 | |||
51 | public string User | ||
52 | { | ||
53 | get => this.Fields[(int)UserTupleFields.User].AsString(); | ||
54 | set => this.Set((int)UserTupleFields.User, value); | ||
55 | } | ||
56 | |||
57 | public string Component_ | ||
58 | { | ||
59 | get => this.Fields[(int)UserTupleFields.Component_].AsString(); | ||
60 | set => this.Set((int)UserTupleFields.Component_, value); | ||
61 | } | ||
62 | |||
63 | public string Name | ||
64 | { | ||
65 | get => this.Fields[(int)UserTupleFields.Name].AsString(); | ||
66 | set => this.Set((int)UserTupleFields.Name, value); | ||
67 | } | ||
68 | |||
69 | public string Domain | ||
70 | { | ||
71 | get => this.Fields[(int)UserTupleFields.Domain].AsString(); | ||
72 | set => this.Set((int)UserTupleFields.Domain, value); | ||
73 | } | ||
74 | |||
75 | public string Password | ||
76 | { | ||
77 | get => this.Fields[(int)UserTupleFields.Password].AsString(); | ||
78 | set => this.Set((int)UserTupleFields.Password, value); | ||
79 | } | ||
80 | |||
81 | public int Attributes | ||
82 | { | ||
83 | get => this.Fields[(int)UserTupleFields.Attributes].AsNumber(); | ||
84 | set => this.Set((int)UserTupleFields.Attributes, value); | ||
85 | } | ||
86 | } | ||
87 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/UtilTupleDefinitions.cs b/src/wixext/Tuples/UtilTupleDefinitions.cs new file mode 100644 index 00000000..00c98337 --- /dev/null +++ b/src/wixext/Tuples/UtilTupleDefinitions.cs | |||
@@ -0,0 +1,111 @@ | |||
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 System; | ||
6 | using WixToolset.Data; | ||
7 | |||
8 | public enum UtilTupleDefinitionType | ||
9 | { | ||
10 | EventManifest, | ||
11 | FileShare, | ||
12 | FileSharePermissions, | ||
13 | Group, | ||
14 | Perfmon, | ||
15 | PerfmonManifest, | ||
16 | PerformanceCategory, | ||
17 | SecureObjects, | ||
18 | ServiceConfig, | ||
19 | User, | ||
20 | UserGroup, | ||
21 | WixCloseApplication, | ||
22 | WixFormatFiles, | ||
23 | WixInternetShortcut, | ||
24 | WixRemoveFolderEx, | ||
25 | WixRestartResource, | ||
26 | WixTouchFile, | ||
27 | XmlConfig, | ||
28 | XmlFile, | ||
29 | } | ||
30 | |||
31 | public static partial class UtilTupleDefinitions | ||
32 | { | ||
33 | public static readonly Version Version = new Version("4.0.0"); | ||
34 | |||
35 | public static IntermediateTupleDefinition ByName(string name) | ||
36 | { | ||
37 | if (!Enum.TryParse(name, out UtilTupleDefinitionType type)) | ||
38 | { | ||
39 | return null; | ||
40 | } | ||
41 | |||
42 | return ByType(type); | ||
43 | } | ||
44 | |||
45 | public static IntermediateTupleDefinition ByType(UtilTupleDefinitionType type) | ||
46 | { | ||
47 | switch (type) | ||
48 | { | ||
49 | case UtilTupleDefinitionType.EventManifest: | ||
50 | return UtilTupleDefinitions.EventManifest; | ||
51 | |||
52 | case UtilTupleDefinitionType.FileShare: | ||
53 | return UtilTupleDefinitions.FileShare; | ||
54 | |||
55 | case UtilTupleDefinitionType.FileSharePermissions: | ||
56 | return UtilTupleDefinitions.FileSharePermissions; | ||
57 | |||
58 | case UtilTupleDefinitionType.Group: | ||
59 | return UtilTupleDefinitions.Group; | ||
60 | |||
61 | case UtilTupleDefinitionType.Perfmon: | ||
62 | return UtilTupleDefinitions.Perfmon; | ||
63 | |||
64 | case UtilTupleDefinitionType.PerfmonManifest: | ||
65 | return UtilTupleDefinitions.PerfmonManifest; | ||
66 | |||
67 | case UtilTupleDefinitionType.PerformanceCategory: | ||
68 | return UtilTupleDefinitions.PerformanceCategory; | ||
69 | |||
70 | case UtilTupleDefinitionType.SecureObjects: | ||
71 | return UtilTupleDefinitions.SecureObjects; | ||
72 | |||
73 | case UtilTupleDefinitionType.ServiceConfig: | ||
74 | return UtilTupleDefinitions.ServiceConfig; | ||
75 | |||
76 | case UtilTupleDefinitionType.User: | ||
77 | return UtilTupleDefinitions.User; | ||
78 | |||
79 | case UtilTupleDefinitionType.UserGroup: | ||
80 | return UtilTupleDefinitions.UserGroup; | ||
81 | |||
82 | case UtilTupleDefinitionType.WixCloseApplication: | ||
83 | return UtilTupleDefinitions.WixCloseApplication; | ||
84 | |||
85 | case UtilTupleDefinitionType.WixFormatFiles: | ||
86 | return UtilTupleDefinitions.WixFormatFiles; | ||
87 | |||
88 | case UtilTupleDefinitionType.WixInternetShortcut: | ||
89 | return UtilTupleDefinitions.WixInternetShortcut; | ||
90 | |||
91 | case UtilTupleDefinitionType.WixRemoveFolderEx: | ||
92 | return UtilTupleDefinitions.WixRemoveFolderEx; | ||
93 | |||
94 | case UtilTupleDefinitionType.WixRestartResource: | ||
95 | return UtilTupleDefinitions.WixRestartResource; | ||
96 | |||
97 | case UtilTupleDefinitionType.WixTouchFile: | ||
98 | return UtilTupleDefinitions.WixTouchFile; | ||
99 | |||
100 | case UtilTupleDefinitionType.XmlConfig: | ||
101 | return UtilTupleDefinitions.XmlConfig; | ||
102 | |||
103 | case UtilTupleDefinitionType.XmlFile: | ||
104 | return UtilTupleDefinitions.XmlFile; | ||
105 | |||
106 | default: | ||
107 | throw new ArgumentOutOfRangeException(nameof(type)); | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | } | ||
diff --git a/src/wixext/Tuples/WixCloseApplicationTuple.cs b/src/wixext/Tuples/WixCloseApplicationTuple.cs new file mode 100644 index 00000000..c2095d93 --- /dev/null +++ b/src/wixext/Tuples/WixCloseApplicationTuple.cs | |||
@@ -0,0 +1,111 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixCloseApplication = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.WixCloseApplication.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.WixCloseApplication), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Target), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Description), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Condition), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Attributes), IntermediateFieldType.Number), | ||
19 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Sequence), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Property), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.TerminateExitCode), IntermediateFieldType.Number), | ||
22 | new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Timeout), IntermediateFieldType.Number), | ||
23 | }, | ||
24 | typeof(WixCloseApplicationTuple)); | ||
25 | } | ||
26 | } | ||
27 | |||
28 | namespace WixToolset.Util.Tuples | ||
29 | { | ||
30 | using WixToolset.Data; | ||
31 | |||
32 | public enum WixCloseApplicationTupleFields | ||
33 | { | ||
34 | WixCloseApplication, | ||
35 | Target, | ||
36 | Description, | ||
37 | Condition, | ||
38 | Attributes, | ||
39 | Sequence, | ||
40 | Property, | ||
41 | TerminateExitCode, | ||
42 | Timeout, | ||
43 | } | ||
44 | |||
45 | public class WixCloseApplicationTuple : IntermediateTuple | ||
46 | { | ||
47 | public WixCloseApplicationTuple() : base(UtilTupleDefinitions.WixCloseApplication, null, null) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public WixCloseApplicationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixCloseApplication, sourceLineNumber, id) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | public IntermediateField this[WixCloseApplicationTupleFields index] => this.Fields[(int)index]; | ||
56 | |||
57 | public string WixCloseApplication | ||
58 | { | ||
59 | get => this.Fields[(int)WixCloseApplicationTupleFields.WixCloseApplication].AsString(); | ||
60 | set => this.Set((int)WixCloseApplicationTupleFields.WixCloseApplication, value); | ||
61 | } | ||
62 | |||
63 | public string Target | ||
64 | { | ||
65 | get => this.Fields[(int)WixCloseApplicationTupleFields.Target].AsString(); | ||
66 | set => this.Set((int)WixCloseApplicationTupleFields.Target, value); | ||
67 | } | ||
68 | |||
69 | public string Description | ||
70 | { | ||
71 | get => this.Fields[(int)WixCloseApplicationTupleFields.Description].AsString(); | ||
72 | set => this.Set((int)WixCloseApplicationTupleFields.Description, value); | ||
73 | } | ||
74 | |||
75 | public string Condition | ||
76 | { | ||
77 | get => this.Fields[(int)WixCloseApplicationTupleFields.Condition].AsString(); | ||
78 | set => this.Set((int)WixCloseApplicationTupleFields.Condition, value); | ||
79 | } | ||
80 | |||
81 | public int Attributes | ||
82 | { | ||
83 | get => this.Fields[(int)WixCloseApplicationTupleFields.Attributes].AsNumber(); | ||
84 | set => this.Set((int)WixCloseApplicationTupleFields.Attributes, value); | ||
85 | } | ||
86 | |||
87 | public int Sequence | ||
88 | { | ||
89 | get => this.Fields[(int)WixCloseApplicationTupleFields.Sequence].AsNumber(); | ||
90 | set => this.Set((int)WixCloseApplicationTupleFields.Sequence, value); | ||
91 | } | ||
92 | |||
93 | public string Property | ||
94 | { | ||
95 | get => this.Fields[(int)WixCloseApplicationTupleFields.Property].AsString(); | ||
96 | set => this.Set((int)WixCloseApplicationTupleFields.Property, value); | ||
97 | } | ||
98 | |||
99 | public int TerminateExitCode | ||
100 | { | ||
101 | get => this.Fields[(int)WixCloseApplicationTupleFields.TerminateExitCode].AsNumber(); | ||
102 | set => this.Set((int)WixCloseApplicationTupleFields.TerminateExitCode, value); | ||
103 | } | ||
104 | |||
105 | public int Timeout | ||
106 | { | ||
107 | get => this.Fields[(int)WixCloseApplicationTupleFields.Timeout].AsNumber(); | ||
108 | set => this.Set((int)WixCloseApplicationTupleFields.Timeout, value); | ||
109 | } | ||
110 | } | ||
111 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/WixFormatFilesTuple.cs b/src/wixext/Tuples/WixFormatFilesTuple.cs new file mode 100644 index 00000000..7fc092b0 --- /dev/null +++ b/src/wixext/Tuples/WixFormatFilesTuple.cs | |||
@@ -0,0 +1,55 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixFormatFiles = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.WixFormatFiles.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixFormatFilesTupleFields.Binary_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixFormatFilesTupleFields.File_), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(WixFormatFilesTuple)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Util.Tuples | ||
22 | { | ||
23 | using WixToolset.Data; | ||
24 | |||
25 | public enum WixFormatFilesTupleFields | ||
26 | { | ||
27 | Binary_, | ||
28 | File_, | ||
29 | } | ||
30 | |||
31 | public class WixFormatFilesTuple : IntermediateTuple | ||
32 | { | ||
33 | public WixFormatFilesTuple() : base(UtilTupleDefinitions.WixFormatFiles, null, null) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | public WixFormatFilesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixFormatFiles, sourceLineNumber, id) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public IntermediateField this[WixFormatFilesTupleFields index] => this.Fields[(int)index]; | ||
42 | |||
43 | public string Binary_ | ||
44 | { | ||
45 | get => this.Fields[(int)WixFormatFilesTupleFields.Binary_].AsString(); | ||
46 | set => this.Set((int)WixFormatFilesTupleFields.Binary_, value); | ||
47 | } | ||
48 | |||
49 | public string File_ | ||
50 | { | ||
51 | get => this.Fields[(int)WixFormatFilesTupleFields.File_].AsString(); | ||
52 | set => this.Set((int)WixFormatFilesTupleFields.File_, value); | ||
53 | } | ||
54 | } | ||
55 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/WixInternetShortcutTuple.cs b/src/wixext/Tuples/WixInternetShortcutTuple.cs new file mode 100644 index 00000000..5c29cda6 --- /dev/null +++ b/src/wixext/Tuples/WixInternetShortcutTuple.cs | |||
@@ -0,0 +1,103 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixInternetShortcut = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.WixInternetShortcut.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.WixInternetShortcut), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.Directory_), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.Name), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.Target), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.Attributes), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.IconFile), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(WixInternetShortcutTupleFields.IconIndex), IntermediateFieldType.Number), | ||
22 | }, | ||
23 | typeof(WixInternetShortcutTuple)); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | namespace WixToolset.Util.Tuples | ||
28 | { | ||
29 | using WixToolset.Data; | ||
30 | |||
31 | public enum WixInternetShortcutTupleFields | ||
32 | { | ||
33 | WixInternetShortcut, | ||
34 | Component_, | ||
35 | Directory_, | ||
36 | Name, | ||
37 | Target, | ||
38 | Attributes, | ||
39 | IconFile, | ||
40 | IconIndex, | ||
41 | } | ||
42 | |||
43 | public class WixInternetShortcutTuple : IntermediateTuple | ||
44 | { | ||
45 | public WixInternetShortcutTuple() : base(UtilTupleDefinitions.WixInternetShortcut, null, null) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | public WixInternetShortcutTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixInternetShortcut, sourceLineNumber, id) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | public IntermediateField this[WixInternetShortcutTupleFields index] => this.Fields[(int)index]; | ||
54 | |||
55 | public string WixInternetShortcut | ||
56 | { | ||
57 | get => this.Fields[(int)WixInternetShortcutTupleFields.WixInternetShortcut].AsString(); | ||
58 | set => this.Set((int)WixInternetShortcutTupleFields.WixInternetShortcut, value); | ||
59 | } | ||
60 | |||
61 | public string Component_ | ||
62 | { | ||
63 | get => this.Fields[(int)WixInternetShortcutTupleFields.Component_].AsString(); | ||
64 | set => this.Set((int)WixInternetShortcutTupleFields.Component_, value); | ||
65 | } | ||
66 | |||
67 | public string Directory_ | ||
68 | { | ||
69 | get => this.Fields[(int)WixInternetShortcutTupleFields.Directory_].AsString(); | ||
70 | set => this.Set((int)WixInternetShortcutTupleFields.Directory_, value); | ||
71 | } | ||
72 | |||
73 | public string Name | ||
74 | { | ||
75 | get => this.Fields[(int)WixInternetShortcutTupleFields.Name].AsString(); | ||
76 | set => this.Set((int)WixInternetShortcutTupleFields.Name, value); | ||
77 | } | ||
78 | |||
79 | public string Target | ||
80 | { | ||
81 | get => this.Fields[(int)WixInternetShortcutTupleFields.Target].AsString(); | ||
82 | set => this.Set((int)WixInternetShortcutTupleFields.Target, value); | ||
83 | } | ||
84 | |||
85 | public int Attributes | ||
86 | { | ||
87 | get => this.Fields[(int)WixInternetShortcutTupleFields.Attributes].AsNumber(); | ||
88 | set => this.Set((int)WixInternetShortcutTupleFields.Attributes, value); | ||
89 | } | ||
90 | |||
91 | public string IconFile | ||
92 | { | ||
93 | get => this.Fields[(int)WixInternetShortcutTupleFields.IconFile].AsString(); | ||
94 | set => this.Set((int)WixInternetShortcutTupleFields.IconFile, value); | ||
95 | } | ||
96 | |||
97 | public int IconIndex | ||
98 | { | ||
99 | get => this.Fields[(int)WixInternetShortcutTupleFields.IconIndex].AsNumber(); | ||
100 | set => this.Set((int)WixInternetShortcutTupleFields.IconIndex, value); | ||
101 | } | ||
102 | } | ||
103 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/WixRemoveFolderExTuple.cs b/src/wixext/Tuples/WixRemoveFolderExTuple.cs new file mode 100644 index 00000000..35e22e2d --- /dev/null +++ b/src/wixext/Tuples/WixRemoveFolderExTuple.cs | |||
@@ -0,0 +1,71 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixRemoveFolderEx = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.WixRemoveFolderEx.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExTupleFields.WixRemoveFolderEx), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExTupleFields.Property), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExTupleFields.InstallMode), IntermediateFieldType.Number), | ||
18 | }, | ||
19 | typeof(WixRemoveFolderExTuple)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Util.Tuples | ||
24 | { | ||
25 | using WixToolset.Data; | ||
26 | |||
27 | public enum WixRemoveFolderExTupleFields | ||
28 | { | ||
29 | WixRemoveFolderEx, | ||
30 | Component_, | ||
31 | Property, | ||
32 | InstallMode, | ||
33 | } | ||
34 | |||
35 | public class WixRemoveFolderExTuple : IntermediateTuple | ||
36 | { | ||
37 | public WixRemoveFolderExTuple() : base(UtilTupleDefinitions.WixRemoveFolderEx, null, null) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public WixRemoveFolderExTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixRemoveFolderEx, sourceLineNumber, id) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public IntermediateField this[WixRemoveFolderExTupleFields index] => this.Fields[(int)index]; | ||
46 | |||
47 | public string WixRemoveFolderEx | ||
48 | { | ||
49 | get => this.Fields[(int)WixRemoveFolderExTupleFields.WixRemoveFolderEx].AsString(); | ||
50 | set => this.Set((int)WixRemoveFolderExTupleFields.WixRemoveFolderEx, value); | ||
51 | } | ||
52 | |||
53 | public string Component_ | ||
54 | { | ||
55 | get => this.Fields[(int)WixRemoveFolderExTupleFields.Component_].AsString(); | ||
56 | set => this.Set((int)WixRemoveFolderExTupleFields.Component_, value); | ||
57 | } | ||
58 | |||
59 | public string Property | ||
60 | { | ||
61 | get => this.Fields[(int)WixRemoveFolderExTupleFields.Property].AsString(); | ||
62 | set => this.Set((int)WixRemoveFolderExTupleFields.Property, value); | ||
63 | } | ||
64 | |||
65 | public int InstallMode | ||
66 | { | ||
67 | get => this.Fields[(int)WixRemoveFolderExTupleFields.InstallMode].AsNumber(); | ||
68 | set => this.Set((int)WixRemoveFolderExTupleFields.InstallMode, value); | ||
69 | } | ||
70 | } | ||
71 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/WixRestartResourceTuple.cs b/src/wixext/Tuples/WixRestartResourceTuple.cs new file mode 100644 index 00000000..828d9d15 --- /dev/null +++ b/src/wixext/Tuples/WixRestartResourceTuple.cs | |||
@@ -0,0 +1,71 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixRestartResource = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.WixRestartResource.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixRestartResourceTupleFields.WixRestartResource), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixRestartResourceTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixRestartResourceTupleFields.Resource), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixRestartResourceTupleFields.Attributes), IntermediateFieldType.Number), | ||
18 | }, | ||
19 | typeof(WixRestartResourceTuple)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Util.Tuples | ||
24 | { | ||
25 | using WixToolset.Data; | ||
26 | |||
27 | public enum WixRestartResourceTupleFields | ||
28 | { | ||
29 | WixRestartResource, | ||
30 | Component_, | ||
31 | Resource, | ||
32 | Attributes, | ||
33 | } | ||
34 | |||
35 | public class WixRestartResourceTuple : IntermediateTuple | ||
36 | { | ||
37 | public WixRestartResourceTuple() : base(UtilTupleDefinitions.WixRestartResource, null, null) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public WixRestartResourceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixRestartResource, sourceLineNumber, id) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public IntermediateField this[WixRestartResourceTupleFields index] => this.Fields[(int)index]; | ||
46 | |||
47 | public string WixRestartResource | ||
48 | { | ||
49 | get => this.Fields[(int)WixRestartResourceTupleFields.WixRestartResource].AsString(); | ||
50 | set => this.Set((int)WixRestartResourceTupleFields.WixRestartResource, value); | ||
51 | } | ||
52 | |||
53 | public string Component_ | ||
54 | { | ||
55 | get => this.Fields[(int)WixRestartResourceTupleFields.Component_].AsString(); | ||
56 | set => this.Set((int)WixRestartResourceTupleFields.Component_, value); | ||
57 | } | ||
58 | |||
59 | public string Resource | ||
60 | { | ||
61 | get => this.Fields[(int)WixRestartResourceTupleFields.Resource].AsString(); | ||
62 | set => this.Set((int)WixRestartResourceTupleFields.Resource, value); | ||
63 | } | ||
64 | |||
65 | public int Attributes | ||
66 | { | ||
67 | get => this.Fields[(int)WixRestartResourceTupleFields.Attributes].AsNumber(); | ||
68 | set => this.Set((int)WixRestartResourceTupleFields.Attributes, value); | ||
69 | } | ||
70 | } | ||
71 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/WixTouchFileTuple.cs b/src/wixext/Tuples/WixTouchFileTuple.cs new file mode 100644 index 00000000..f87f396e --- /dev/null +++ b/src/wixext/Tuples/WixTouchFileTuple.cs | |||
@@ -0,0 +1,71 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixTouchFile = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.WixTouchFile.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixTouchFileTupleFields.WixTouchFile), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixTouchFileTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixTouchFileTupleFields.Path), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixTouchFileTupleFields.Attributes), IntermediateFieldType.Number), | ||
18 | }, | ||
19 | typeof(WixTouchFileTuple)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Util.Tuples | ||
24 | { | ||
25 | using WixToolset.Data; | ||
26 | |||
27 | public enum WixTouchFileTupleFields | ||
28 | { | ||
29 | WixTouchFile, | ||
30 | Component_, | ||
31 | Path, | ||
32 | Attributes, | ||
33 | } | ||
34 | |||
35 | public class WixTouchFileTuple : IntermediateTuple | ||
36 | { | ||
37 | public WixTouchFileTuple() : base(UtilTupleDefinitions.WixTouchFile, null, null) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public WixTouchFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixTouchFile, sourceLineNumber, id) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public IntermediateField this[WixTouchFileTupleFields index] => this.Fields[(int)index]; | ||
46 | |||
47 | public string WixTouchFile | ||
48 | { | ||
49 | get => this.Fields[(int)WixTouchFileTupleFields.WixTouchFile].AsString(); | ||
50 | set => this.Set((int)WixTouchFileTupleFields.WixTouchFile, value); | ||
51 | } | ||
52 | |||
53 | public string Component_ | ||
54 | { | ||
55 | get => this.Fields[(int)WixTouchFileTupleFields.Component_].AsString(); | ||
56 | set => this.Set((int)WixTouchFileTupleFields.Component_, value); | ||
57 | } | ||
58 | |||
59 | public string Path | ||
60 | { | ||
61 | get => this.Fields[(int)WixTouchFileTupleFields.Path].AsString(); | ||
62 | set => this.Set((int)WixTouchFileTupleFields.Path, value); | ||
63 | } | ||
64 | |||
65 | public int Attributes | ||
66 | { | ||
67 | get => this.Fields[(int)WixTouchFileTupleFields.Attributes].AsNumber(); | ||
68 | set => this.Set((int)WixTouchFileTupleFields.Attributes, value); | ||
69 | } | ||
70 | } | ||
71 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/XmlConfigTuple.cs b/src/wixext/Tuples/XmlConfigTuple.cs new file mode 100644 index 00000000..093299b2 --- /dev/null +++ b/src/wixext/Tuples/XmlConfigTuple.cs | |||
@@ -0,0 +1,111 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition XmlConfig = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.XmlConfig.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.XmlConfig), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.File), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.ElementPath), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.VerifyPath), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.Name), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.Value), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.Flags), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.Component_), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(XmlConfigTupleFields.Sequence), IntermediateFieldType.Number), | ||
23 | }, | ||
24 | typeof(XmlConfigTuple)); | ||
25 | } | ||
26 | } | ||
27 | |||
28 | namespace WixToolset.Util.Tuples | ||
29 | { | ||
30 | using WixToolset.Data; | ||
31 | |||
32 | public enum XmlConfigTupleFields | ||
33 | { | ||
34 | XmlConfig, | ||
35 | File, | ||
36 | ElementPath, | ||
37 | VerifyPath, | ||
38 | Name, | ||
39 | Value, | ||
40 | Flags, | ||
41 | Component_, | ||
42 | Sequence, | ||
43 | } | ||
44 | |||
45 | public class XmlConfigTuple : IntermediateTuple | ||
46 | { | ||
47 | public XmlConfigTuple() : base(UtilTupleDefinitions.XmlConfig, null, null) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public XmlConfigTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.XmlConfig, sourceLineNumber, id) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | public IntermediateField this[XmlConfigTupleFields index] => this.Fields[(int)index]; | ||
56 | |||
57 | public string XmlConfig | ||
58 | { | ||
59 | get => this.Fields[(int)XmlConfigTupleFields.XmlConfig].AsString(); | ||
60 | set => this.Set((int)XmlConfigTupleFields.XmlConfig, value); | ||
61 | } | ||
62 | |||
63 | public string File | ||
64 | { | ||
65 | get => this.Fields[(int)XmlConfigTupleFields.File].AsString(); | ||
66 | set => this.Set((int)XmlConfigTupleFields.File, value); | ||
67 | } | ||
68 | |||
69 | public string ElementPath | ||
70 | { | ||
71 | get => this.Fields[(int)XmlConfigTupleFields.ElementPath].AsString(); | ||
72 | set => this.Set((int)XmlConfigTupleFields.ElementPath, value); | ||
73 | } | ||
74 | |||
75 | public string VerifyPath | ||
76 | { | ||
77 | get => this.Fields[(int)XmlConfigTupleFields.VerifyPath].AsString(); | ||
78 | set => this.Set((int)XmlConfigTupleFields.VerifyPath, value); | ||
79 | } | ||
80 | |||
81 | public string Name | ||
82 | { | ||
83 | get => this.Fields[(int)XmlConfigTupleFields.Name].AsString(); | ||
84 | set => this.Set((int)XmlConfigTupleFields.Name, value); | ||
85 | } | ||
86 | |||
87 | public string Value | ||
88 | { | ||
89 | get => this.Fields[(int)XmlConfigTupleFields.Value].AsString(); | ||
90 | set => this.Set((int)XmlConfigTupleFields.Value, value); | ||
91 | } | ||
92 | |||
93 | public int Flags | ||
94 | { | ||
95 | get => this.Fields[(int)XmlConfigTupleFields.Flags].AsNumber(); | ||
96 | set => this.Set((int)XmlConfigTupleFields.Flags, value); | ||
97 | } | ||
98 | |||
99 | public string Component_ | ||
100 | { | ||
101 | get => this.Fields[(int)XmlConfigTupleFields.Component_].AsString(); | ||
102 | set => this.Set((int)XmlConfigTupleFields.Component_, value); | ||
103 | } | ||
104 | |||
105 | public int Sequence | ||
106 | { | ||
107 | get => this.Fields[(int)XmlConfigTupleFields.Sequence].AsNumber(); | ||
108 | set => this.Set((int)XmlConfigTupleFields.Sequence, value); | ||
109 | } | ||
110 | } | ||
111 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/XmlFileTuple.cs b/src/wixext/Tuples/XmlFileTuple.cs new file mode 100644 index 00000000..27ea7119 --- /dev/null +++ b/src/wixext/Tuples/XmlFileTuple.cs | |||
@@ -0,0 +1,103 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition XmlFile = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.XmlFile.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.XmlFile), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.File), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.ElementPath), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Name), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Value), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Flags), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Component_), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Sequence), IntermediateFieldType.Number), | ||
22 | }, | ||
23 | typeof(XmlFileTuple)); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | namespace WixToolset.Util.Tuples | ||
28 | { | ||
29 | using WixToolset.Data; | ||
30 | |||
31 | public enum XmlFileTupleFields | ||
32 | { | ||
33 | XmlFile, | ||
34 | File, | ||
35 | ElementPath, | ||
36 | Name, | ||
37 | Value, | ||
38 | Flags, | ||
39 | Component_, | ||
40 | Sequence, | ||
41 | } | ||
42 | |||
43 | public class XmlFileTuple : IntermediateTuple | ||
44 | { | ||
45 | public XmlFileTuple() : base(UtilTupleDefinitions.XmlFile, null, null) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | public XmlFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.XmlFile, sourceLineNumber, id) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | public IntermediateField this[XmlFileTupleFields index] => this.Fields[(int)index]; | ||
54 | |||
55 | public string XmlFile | ||
56 | { | ||
57 | get => this.Fields[(int)XmlFileTupleFields.XmlFile].AsString(); | ||
58 | set => this.Set((int)XmlFileTupleFields.XmlFile, value); | ||
59 | } | ||
60 | |||
61 | public string File | ||
62 | { | ||
63 | get => this.Fields[(int)XmlFileTupleFields.File].AsString(); | ||
64 | set => this.Set((int)XmlFileTupleFields.File, value); | ||
65 | } | ||
66 | |||
67 | public string ElementPath | ||
68 | { | ||
69 | get => this.Fields[(int)XmlFileTupleFields.ElementPath].AsString(); | ||
70 | set => this.Set((int)XmlFileTupleFields.ElementPath, value); | ||
71 | } | ||
72 | |||
73 | public string Name | ||
74 | { | ||
75 | get => this.Fields[(int)XmlFileTupleFields.Name].AsString(); | ||
76 | set => this.Set((int)XmlFileTupleFields.Name, value); | ||
77 | } | ||
78 | |||
79 | public string Value | ||
80 | { | ||
81 | get => this.Fields[(int)XmlFileTupleFields.Value].AsString(); | ||
82 | set => this.Set((int)XmlFileTupleFields.Value, value); | ||
83 | } | ||
84 | |||
85 | public int Flags | ||
86 | { | ||
87 | get => this.Fields[(int)XmlFileTupleFields.Flags].AsNumber(); | ||
88 | set => this.Set((int)XmlFileTupleFields.Flags, value); | ||
89 | } | ||
90 | |||
91 | public string Component_ | ||
92 | { | ||
93 | get => this.Fields[(int)XmlFileTupleFields.Component_].AsString(); | ||
94 | set => this.Set((int)XmlFileTupleFields.Component_, value); | ||
95 | } | ||
96 | |||
97 | public int Sequence | ||
98 | { | ||
99 | get => this.Fields[(int)XmlFileTupleFields.Sequence].AsNumber(); | ||
100 | set => this.Set((int)XmlFileTupleFields.Sequence, value); | ||
101 | } | ||
102 | } | ||
103 | } \ No newline at end of file | ||
diff --git a/src/wixext/UtilBinder.cs b/src/wixext/UtilBinder.cs new file mode 100644 index 00000000..ef80a876 --- /dev/null +++ b/src/wixext/UtilBinder.cs | |||
@@ -0,0 +1,347 @@ | |||
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.Extensions | ||
4 | { | ||
5 | #if TODO_BRINGBACK_FOR_BUNDLES | ||
6 | using System; | ||
7 | using System.Collections.Generic; | ||
8 | using System.Globalization; | ||
9 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility; | ||
11 | |||
12 | /// <summary> | ||
13 | /// The binder for the WiX Toolset Utility Extension. | ||
14 | /// </summary> | ||
15 | public sealed class UtilBinder : BinderExtension | ||
16 | { | ||
17 | // TODO: When WixSearch is supported in Product, etc, we may need to call | ||
18 | // ReorderWixSearch() from each of those initializers. | ||
19 | |||
20 | // TODO: A general-purpose "reorder this table given these constraints" | ||
21 | // mechanism may end up being helpful. This could be declaratively stated | ||
22 | // in the table definitions, or exposed from the core Wix.dll and called | ||
23 | // as-needed by any extensions. | ||
24 | |||
25 | /// <summary> | ||
26 | /// Called before bundle binding occurs. | ||
27 | /// </summary> | ||
28 | public override void Initialize(Output bundle) | ||
29 | { | ||
30 | if (OutputType.Bundle == bundle.Type) | ||
31 | { | ||
32 | this.ReorderWixSearch(bundle); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | /// <summary> | ||
37 | /// Reorders Any WixSearch items. | ||
38 | /// </summary> | ||
39 | /// <param name="output">Output containing the tables to process.</param> | ||
40 | private void ReorderWixSearch(Output output) | ||
41 | { | ||
42 | Table wixSearchTable = output.Tables["WixSearch"]; | ||
43 | if (null == wixSearchTable || wixSearchTable.Rows.Count == 0) | ||
44 | { | ||
45 | // nothing to do! | ||
46 | return; | ||
47 | } | ||
48 | |||
49 | RowDictionary rowDictionary = new RowDictionary(); | ||
50 | foreach (Row row in wixSearchTable.Rows) | ||
51 | { | ||
52 | rowDictionary.AddRow(row); | ||
53 | } | ||
54 | |||
55 | Constraints constraints = new Constraints(); | ||
56 | Table wixSearchRelationTable = output.Tables["WixSearchRelation"]; | ||
57 | if (null != wixSearchRelationTable && wixSearchRelationTable.Rows.Count > 0) | ||
58 | { | ||
59 | // add relational info to our data... | ||
60 | foreach (Row row in wixSearchRelationTable.Rows) | ||
61 | { | ||
62 | constraints.AddConstraint((string)row[0], (string)row[1]); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | this.FindCircularReference(constraints); | ||
67 | |||
68 | if (this.Core.EncounteredError) | ||
69 | { | ||
70 | return; | ||
71 | } | ||
72 | |||
73 | this.FlattenDependentReferences(constraints); | ||
74 | |||
75 | // Reorder by topographical sort (http://en.wikipedia.org/wiki/Topological_sorting) | ||
76 | // We use a variation of Kahn (1962) algorithm as described in | ||
77 | // Wikipedia, with the additional criteria that start nodes are sorted | ||
78 | // lexicographically at each step to ensure a deterministic ordering | ||
79 | // based on 'after' dependencies and ID. | ||
80 | TopologicalSort sorter = new TopologicalSort(); | ||
81 | List <string> sortedIds = sorter.Sort(rowDictionary.Keys, constraints); | ||
82 | |||
83 | // Now, re-write the table with the searches in order... | ||
84 | wixSearchTable.Rows.Clear(); | ||
85 | foreach (string id in sortedIds) | ||
86 | { | ||
87 | wixSearchTable.Rows.Add(rowDictionary[id]); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | /// <summary> | ||
92 | /// A dictionary of Row items, indexed by their first column. | ||
93 | /// </summary> | ||
94 | private class RowDictionary : Dictionary<string, Row> | ||
95 | { | ||
96 | public void AddRow(Row row) | ||
97 | { | ||
98 | this.Add((string)row[0], row); | ||
99 | } | ||
100 | |||
101 | // TODO: Hide other Add methods? | ||
102 | } | ||
103 | |||
104 | /// <summary> | ||
105 | /// A dictionary of constraints, mapping an id to a list of ids. | ||
106 | /// </summary> | ||
107 | private class Constraints : Dictionary<string, List<string>> | ||
108 | { | ||
109 | public void AddConstraint(string id, string afterId) | ||
110 | { | ||
111 | if (!this.ContainsKey(id)) | ||
112 | { | ||
113 | this.Add(id, new List<string>()); | ||
114 | } | ||
115 | |||
116 | // TODO: Show warning if a constraint is seen twice? | ||
117 | if (!this[id].Contains(afterId)) | ||
118 | { | ||
119 | this[id].Add(afterId); | ||
120 | } | ||
121 | } | ||
122 | |||
123 | // TODO: Hide other Add methods? | ||
124 | } | ||
125 | |||
126 | /// <summary> | ||
127 | /// Finds circular references in the constraints. | ||
128 | /// </summary> | ||
129 | /// <param name="constraints">Constraints to check.</param> | ||
130 | /// <remarks>This is not particularly performant, but it works.</remarks> | ||
131 | private void FindCircularReference(Constraints constraints) | ||
132 | { | ||
133 | foreach (string id in constraints.Keys) | ||
134 | { | ||
135 | List<string> seenIds = new List<string>(); | ||
136 | string chain = null; | ||
137 | if (FindCircularReference(constraints, id, id, seenIds, out chain)) | ||
138 | { | ||
139 | // We will show a separate message for every ID that's in | ||
140 | // the loop. We could bail after the first one, but then | ||
141 | // we wouldn't catch disjoint loops in a single run. | ||
142 | this.Core.OnMessage(UtilErrors.CircularSearchReference(chain)); | ||
143 | } | ||
144 | } | ||
145 | } | ||
146 | |||
147 | /// <summary> | ||
148 | /// Recursive function that finds circular references in the constraints. | ||
149 | /// </summary> | ||
150 | /// <param name="constraints">Constraints to check.</param> | ||
151 | /// <param name="checkId">The identifier currently being looking for. (Fixed across a given run.)</param> | ||
152 | /// <param name="currentId">The idenifier curently being tested.</param> | ||
153 | /// <param name="seenIds">A list of identifiers seen, to ensure each identifier is only expanded once.</param> | ||
154 | /// <param name="chain">If a circular reference is found, will contain the chain of references.</param> | ||
155 | /// <returns>True if a circular reference is found, false otherwise.</returns> | ||
156 | private bool FindCircularReference(Constraints constraints, string checkId, string currentId, List<string> seenIds, out string chain) | ||
157 | { | ||
158 | chain = null; | ||
159 | List<string> afterList = null; | ||
160 | if (constraints.TryGetValue(currentId, out afterList)) | ||
161 | { | ||
162 | foreach (string afterId in afterList) | ||
163 | { | ||
164 | if (afterId == checkId) | ||
165 | { | ||
166 | chain = String.Format(CultureInfo.InvariantCulture, "{0} -> {1}", currentId, afterId); | ||
167 | return true; | ||
168 | } | ||
169 | |||
170 | if (!seenIds.Contains(afterId)) | ||
171 | { | ||
172 | seenIds.Add(afterId); | ||
173 | if (FindCircularReference(constraints, checkId, afterId, seenIds, out chain)) | ||
174 | { | ||
175 | chain = String.Format(CultureInfo.InvariantCulture, "{0} -> {1}", currentId, chain); | ||
176 | return true; | ||
177 | } | ||
178 | } | ||
179 | } | ||
180 | } | ||
181 | |||
182 | return false; | ||
183 | } | ||
184 | |||
185 | /// <summary> | ||
186 | /// Flattens any dependency chains to simplify reordering. | ||
187 | /// </summary> | ||
188 | /// <param name="constraints"></param> | ||
189 | private void FlattenDependentReferences(Constraints constraints) | ||
190 | { | ||
191 | foreach (string id in constraints.Keys) | ||
192 | { | ||
193 | List<string> flattenedIds = new List<string>(); | ||
194 | AddDependentReferences(constraints, id, flattenedIds); | ||
195 | List<string> constraintList = constraints[id]; | ||
196 | foreach (string flattenedId in flattenedIds) | ||
197 | { | ||
198 | if (!constraintList.Contains(flattenedId)) | ||
199 | { | ||
200 | constraintList.Add(flattenedId); | ||
201 | } | ||
202 | } | ||
203 | } | ||
204 | } | ||
205 | |||
206 | /// <summary> | ||
207 | /// Adds dependent references to a list. | ||
208 | /// </summary> | ||
209 | /// <param name="constraints"></param> | ||
210 | /// <param name="currentId"></param> | ||
211 | /// <param name="seenIds"></param> | ||
212 | private void AddDependentReferences(Constraints constraints, string currentId, List<string> seenIds) | ||
213 | { | ||
214 | List<string> afterList = null; | ||
215 | if (constraints.TryGetValue(currentId, out afterList)) | ||
216 | { | ||
217 | foreach (string afterId in afterList) | ||
218 | { | ||
219 | if (!seenIds.Contains(afterId)) | ||
220 | { | ||
221 | seenIds.Add(afterId); | ||
222 | AddDependentReferences(constraints, afterId, seenIds); | ||
223 | } | ||
224 | } | ||
225 | } | ||
226 | } | ||
227 | |||
228 | /// <summary> | ||
229 | /// Reorder by topological sort | ||
230 | /// </summary> | ||
231 | /// <remarks> | ||
232 | /// We use a variation of Kahn (1962) algorithm as described in | ||
233 | /// Wikipedia (http://en.wikipedia.org/wiki/Topological_sorting), with | ||
234 | /// the additional criteria that start nodes are sorted lexicographically | ||
235 | /// at each step to ensure a deterministic ordering based on 'after' | ||
236 | /// dependencies and ID. | ||
237 | /// </remarks> | ||
238 | private class TopologicalSort | ||
239 | { | ||
240 | private List<string> startIds = new List<string>(); | ||
241 | private Constraints constraints; | ||
242 | |||
243 | /// <summary> | ||
244 | /// Reorder by topological sort | ||
245 | /// </summary> | ||
246 | /// <param name="allIds">The complete list of IDs.</param> | ||
247 | /// <param name="constraints">Constraints to use.</param> | ||
248 | /// <returns>The topologically sorted list of IDs.</returns> | ||
249 | internal List<string> Sort(IEnumerable<string> allIds, Constraints constraints) | ||
250 | { | ||
251 | this.startIds.Clear(); | ||
252 | this.CopyConstraints(constraints); | ||
253 | |||
254 | this.FindInitialStartIds(allIds); | ||
255 | |||
256 | // We always create a new sortedId list, because we return it | ||
257 | // to the caller and don't know what its lifetime may be. | ||
258 | List<string> sortedIds = new List<string>(); | ||
259 | |||
260 | while (this.startIds.Count > 0) | ||
261 | { | ||
262 | this.SortStartIds(); | ||
263 | |||
264 | string currentId = this.startIds[0]; | ||
265 | sortedIds.Add(currentId); | ||
266 | this.startIds.RemoveAt(0); | ||
267 | |||
268 | this.ResolveConstraint(currentId); | ||
269 | } | ||
270 | |||
271 | return sortedIds; | ||
272 | } | ||
273 | |||
274 | /// <summary> | ||
275 | /// Copies a Constraints set (to prevent modifying the incoming data). | ||
276 | /// </summary> | ||
277 | /// <param name="constraints">Constraints to copy.</param> | ||
278 | private void CopyConstraints(Constraints constraints) | ||
279 | { | ||
280 | this.constraints = new Constraints(); | ||
281 | foreach (string id in constraints.Keys) | ||
282 | { | ||
283 | foreach (string afterId in constraints[id]) | ||
284 | { | ||
285 | this.constraints.AddConstraint(id, afterId); | ||
286 | } | ||
287 | } | ||
288 | } | ||
289 | |||
290 | /// <summary> | ||
291 | /// Finds initial start IDs. (Those with no constraints.) | ||
292 | /// </summary> | ||
293 | /// <param name="allIds">The complete list of IDs.</param> | ||
294 | private void FindInitialStartIds(IEnumerable<string> allIds) | ||
295 | { | ||
296 | foreach (string id in allIds) | ||
297 | { | ||
298 | if (!this.constraints.ContainsKey(id)) | ||
299 | { | ||
300 | this.startIds.Add(id); | ||
301 | } | ||
302 | } | ||
303 | } | ||
304 | |||
305 | /// <summary> | ||
306 | /// Sorts start IDs. | ||
307 | /// </summary> | ||
308 | private void SortStartIds() | ||
309 | { | ||
310 | this.startIds.Sort(); | ||
311 | } | ||
312 | |||
313 | /// <summary> | ||
314 | /// Removes the resolved constraint and updates the list of startIds | ||
315 | /// with any now-valid (all constraints resolved) IDs. | ||
316 | /// </summary> | ||
317 | /// <param name="resolvedId">The ID to resolve from the set of constraints.</param> | ||
318 | private void ResolveConstraint(string resolvedId) | ||
319 | { | ||
320 | List<string> newStartIds = new List<string>(); | ||
321 | |||
322 | foreach (string id in constraints.Keys) | ||
323 | { | ||
324 | if (this.constraints[id].Contains(resolvedId)) | ||
325 | { | ||
326 | this.constraints[id].Remove(resolvedId); | ||
327 | |||
328 | // If we just removed the last constraint for this | ||
329 | // ID, it is now a valid start ID. | ||
330 | if (0 == this.constraints[id].Count) | ||
331 | { | ||
332 | newStartIds.Add(id); | ||
333 | } | ||
334 | } | ||
335 | } | ||
336 | |||
337 | foreach (string id in newStartIds) | ||
338 | { | ||
339 | this.constraints.Remove(id); | ||
340 | } | ||
341 | |||
342 | this.startIds.AddRange(newStartIds); | ||
343 | } | ||
344 | } | ||
345 | } | ||
346 | #endif | ||
347 | } | ||
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs new file mode 100644 index 00000000..da48e412 --- /dev/null +++ b/src/wixext/UtilCompiler.cs | |||
@@ -0,0 +1,3911 @@ | |||
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 System; | ||
6 | using System.Collections; | ||
7 | using System.Collections.Generic; | ||
8 | using System.Globalization; | ||
9 | using System.Linq; | ||
10 | using System.Text; | ||
11 | using System.Text.RegularExpressions; | ||
12 | using System.Xml.Linq; | ||
13 | using WixToolset.Data; | ||
14 | using WixToolset.Extensibility; | ||
15 | |||
16 | /// <summary> | ||
17 | /// The compiler for the WiX Toolset Utility Extension. | ||
18 | /// </summary> | ||
19 | public sealed class UtilCompiler : BaseCompilerExtension | ||
20 | { | ||
21 | // user creation attributes definitions (from sca.h) | ||
22 | internal const int UserDontExpirePasswrd = 0x00000001; | ||
23 | internal const int UserPasswdCantChange = 0x00000002; | ||
24 | internal const int UserPasswdChangeReqdOnLogin = 0x00000004; | ||
25 | internal const int UserDisableAccount = 0x00000008; | ||
26 | internal const int UserFailIfExists = 0x00000010; | ||
27 | internal const int UserUpdateIfExists = 0x00000020; | ||
28 | internal const int UserLogonAsService = 0x00000040; | ||
29 | internal const int UserLogonAsBatchJob = 0x00000080; | ||
30 | |||
31 | internal const int UserDontRemoveOnUninstall = 0x00000100; | ||
32 | internal const int UserDontCreateUser = 0x00000200; | ||
33 | internal const int UserNonVital = 0x00000400; | ||
34 | |||
35 | [Flags] | ||
36 | internal enum WixFileSearchAttributes | ||
37 | { | ||
38 | Default = 0x001, | ||
39 | MinVersionInclusive = 0x002, | ||
40 | MaxVersionInclusive = 0x004, | ||
41 | MinSizeInclusive = 0x008, | ||
42 | MaxSizeInclusive = 0x010, | ||
43 | MinDateInclusive = 0x020, | ||
44 | MaxDateInclusive = 0x040, | ||
45 | WantVersion = 0x080, | ||
46 | WantExists = 0x100, | ||
47 | IsDirectory = 0x200, | ||
48 | } | ||
49 | |||
50 | internal enum WixRegistrySearchFormat | ||
51 | { | ||
52 | Raw, | ||
53 | Compatible, | ||
54 | } | ||
55 | |||
56 | [Flags] | ||
57 | internal enum WixRegistrySearchAttributes | ||
58 | { | ||
59 | Raw = 0x01, | ||
60 | Compatible = 0x02, | ||
61 | ExpandEnvironmentVariables = 0x04, | ||
62 | WantValue = 0x08, | ||
63 | WantExists = 0x10, | ||
64 | Win64 = 0x20, | ||
65 | } | ||
66 | |||
67 | internal enum WixComponentSearchAttributes | ||
68 | { | ||
69 | KeyPath = 0x1, | ||
70 | State = 0x2, | ||
71 | WantDirectory = 0x4, | ||
72 | } | ||
73 | |||
74 | [Flags] | ||
75 | internal enum WixProductSearchAttributes | ||
76 | { | ||
77 | Version = 0x01, | ||
78 | Language = 0x02, | ||
79 | State = 0x04, | ||
80 | Assignment = 0x08, | ||
81 | UpgradeCode = 0x10, | ||
82 | } | ||
83 | |||
84 | internal enum WixRestartResourceAttributes | ||
85 | { | ||
86 | Filename = 1, | ||
87 | ProcessName, | ||
88 | ServiceName, | ||
89 | TypeMask = 0xf, | ||
90 | } | ||
91 | |||
92 | internal enum WixRemoveFolderExOn | ||
93 | { | ||
94 | Install = 1, | ||
95 | Uninstall = 2, | ||
96 | Both = 3, | ||
97 | } | ||
98 | |||
99 | private static readonly Regex FindPropertyBrackets = new Regex(@"\[(?!\\|\])|(?<!\[\\\]|\[\\|\\\[)\]", RegexOptions.ExplicitCapture | RegexOptions.Compiled); | ||
100 | |||
101 | public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/util"; | ||
102 | |||
103 | /// <summary> | ||
104 | /// Types of Internet shortcuts. | ||
105 | /// </summary> | ||
106 | public enum InternetShortcutType | ||
107 | { | ||
108 | /// <summary>Create a .lnk file.</summary> | ||
109 | Link = 0, | ||
110 | |||
111 | /// <summary>Create a .url file.</summary> | ||
112 | Url, | ||
113 | } | ||
114 | |||
115 | /// <summary> | ||
116 | /// Types of permission setting methods. | ||
117 | /// </summary> | ||
118 | private enum PermissionType | ||
119 | { | ||
120 | /// <summary>LockPermissions (normal) type permission setting.</summary> | ||
121 | LockPermissions, | ||
122 | |||
123 | /// <summary>FileSharePermissions type permission setting.</summary> | ||
124 | FileSharePermissions, | ||
125 | |||
126 | /// <summary>SecureObjects type permission setting.</summary> | ||
127 | SecureObjects, | ||
128 | } | ||
129 | |||
130 | /// <summary> | ||
131 | /// Processes an element for the Compiler. | ||
132 | /// </summary> | ||
133 | /// <param name="parentElement">Parent element of element to process.</param> | ||
134 | /// <param name="element">Element to process.</param> | ||
135 | /// <param name="context">Extra information about the context in which this element is being parsed.</param> | ||
136 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | ||
137 | { | ||
138 | this.ParsePossibleKeyPathElement(intermediate, section, parentElement, element, context); | ||
139 | } | ||
140 | |||
141 | /// <summary> | ||
142 | /// Processes an element for the Compiler. | ||
143 | /// </summary> | ||
144 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
145 | /// <param name="parentElement">Parent element of element to process.</param> | ||
146 | /// <param name="element">Element to process.</param> | ||
147 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | ||
148 | public override ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | ||
149 | { | ||
150 | ComponentKeyPath possibleKeyPath = null; | ||
151 | |||
152 | switch (parentElement.Name.LocalName) | ||
153 | { | ||
154 | case "CreateFolder": | ||
155 | string createFolderId = context["DirectoryId"]; | ||
156 | string createFolderComponentId = context["ComponentId"]; | ||
157 | |||
158 | // If this doesn't parse successfully, something really odd is going on, so let the exception get thrown | ||
159 | bool createFolderWin64 = Boolean.Parse(context["Win64"]); | ||
160 | |||
161 | switch (element.Name.LocalName) | ||
162 | { | ||
163 | case "PermissionEx": | ||
164 | this.ParsePermissionExElement(intermediate, section, element, createFolderId, createFolderComponentId, createFolderWin64, "CreateFolder"); | ||
165 | break; | ||
166 | default: | ||
167 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
168 | break; | ||
169 | } | ||
170 | break; | ||
171 | case "Component": | ||
172 | string componentId = context["ComponentId"]; | ||
173 | string directoryId = context["DirectoryId"]; | ||
174 | bool componentWin64 = Boolean.Parse(context["Win64"]); | ||
175 | |||
176 | switch (element.Name.LocalName) | ||
177 | { | ||
178 | case "EventSource": | ||
179 | possibleKeyPath = this.ParseEventSourceElement(intermediate, section, element, componentId); | ||
180 | break; | ||
181 | case "FileShare": | ||
182 | this.ParseFileShareElement(intermediate, section, element, componentId, directoryId); | ||
183 | break; | ||
184 | case "InternetShortcut": | ||
185 | this.ParseInternetShortcutElement(intermediate, section, element, componentId, directoryId); | ||
186 | break; | ||
187 | case "PerformanceCategory": | ||
188 | this.ParsePerformanceCategoryElement(intermediate, section, element, componentId); | ||
189 | break; | ||
190 | case "RemoveFolderEx": | ||
191 | this.ParseRemoveFolderExElement(intermediate, section, element, componentId); | ||
192 | break; | ||
193 | case "RestartResource": | ||
194 | this.ParseRestartResourceElement(intermediate, section, element, componentId); | ||
195 | break; | ||
196 | case "ServiceConfig": | ||
197 | this.ParseServiceConfigElement(intermediate, section, element, componentId, "Component", null); | ||
198 | break; | ||
199 | case "TouchFile": | ||
200 | this.ParseTouchFileElement(intermediate, section, element, componentId, componentWin64); | ||
201 | break; | ||
202 | case "User": | ||
203 | this.ParseUserElement(intermediate, section, element, componentId); | ||
204 | break; | ||
205 | case "XmlFile": | ||
206 | this.ParseXmlFileElement(intermediate, section, element, componentId); | ||
207 | break; | ||
208 | case "XmlConfig": | ||
209 | this.ParseXmlConfigElement(intermediate, section, element, componentId, false); | ||
210 | break; | ||
211 | default: | ||
212 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
213 | break; | ||
214 | } | ||
215 | break; | ||
216 | case "File": | ||
217 | string fileId = context["FileId"]; | ||
218 | string fileComponentId = context["ComponentId"]; | ||
219 | |||
220 | // If this doesn't parse successfully, something really odd is going on, so let the exception get thrown | ||
221 | bool fileWin64 = Boolean.Parse(context["Win64"]); | ||
222 | |||
223 | switch (element.Name.LocalName) | ||
224 | { | ||
225 | case "PerfCounter": | ||
226 | this.ParsePerfCounterElement(intermediate, section, element, fileComponentId, fileId); | ||
227 | break; | ||
228 | case "PermissionEx": | ||
229 | this.ParsePermissionExElement(intermediate, section, element, fileId, fileComponentId, fileWin64, "File"); | ||
230 | break; | ||
231 | case "PerfCounterManifest": | ||
232 | this.ParsePerfCounterManifestElement(intermediate, section, element, fileComponentId, fileId); | ||
233 | break; | ||
234 | case "EventManifest": | ||
235 | this.ParseEventManifestElement(intermediate, section, element, fileComponentId, fileId); | ||
236 | break; | ||
237 | case "FormatFile": | ||
238 | this.ParseFormatFileElement(intermediate, section, element, fileId, fileWin64); | ||
239 | break; | ||
240 | default: | ||
241 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
242 | break; | ||
243 | } | ||
244 | break; | ||
245 | case "Bundle": | ||
246 | case "Fragment": | ||
247 | case "Module": | ||
248 | case "Product": | ||
249 | switch (element.Name.LocalName) | ||
250 | { | ||
251 | case "CloseApplication": | ||
252 | this.ParseCloseApplicationElement(intermediate, section, element); | ||
253 | break; | ||
254 | case "Group": | ||
255 | this.ParseGroupElement(intermediate, section, element, null); | ||
256 | break; | ||
257 | case "RestartResource": | ||
258 | // Currently not supported for Bundles. | ||
259 | if (parentElement.Name.LocalName != "Bundle") | ||
260 | { | ||
261 | this.ParseRestartResourceElement(intermediate, section, element, null); | ||
262 | } | ||
263 | else | ||
264 | { | ||
265 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
266 | } | ||
267 | break; | ||
268 | case "User": | ||
269 | this.ParseUserElement(intermediate, section, element, null); | ||
270 | break; | ||
271 | case "ComponentSearch": | ||
272 | case "ComponentSearchRef": | ||
273 | case "DirectorySearch": | ||
274 | case "DirectorySearchRef": | ||
275 | case "FileSearch": | ||
276 | case "FileSearchRef": | ||
277 | case "ProductSearch": | ||
278 | case "ProductSearchRef": | ||
279 | case "RegistrySearch": | ||
280 | case "RegistrySearchRef": | ||
281 | // These will eventually be supported under Module/Product, but are not yet. | ||
282 | if (parentElement.Name.LocalName == "Bundle" || parentElement.Name.LocalName == "Fragment") | ||
283 | { | ||
284 | // TODO: When these are supported by all section types, move | ||
285 | // these out of the nested switch and back into the surrounding one. | ||
286 | switch (element.Name.LocalName) | ||
287 | { | ||
288 | case "ComponentSearch": | ||
289 | this.ParseComponentSearchElement(intermediate, section, element); | ||
290 | break; | ||
291 | case "ComponentSearchRef": | ||
292 | this.ParseComponentSearchRefElement(intermediate, section, element); | ||
293 | break; | ||
294 | case "DirectorySearch": | ||
295 | this.ParseDirectorySearchElement(intermediate, section, element); | ||
296 | break; | ||
297 | case "DirectorySearchRef": | ||
298 | this.ParseWixSearchRefElement(intermediate, section, element); | ||
299 | break; | ||
300 | case "FileSearch": | ||
301 | this.ParseFileSearchElement(intermediate, section, element); | ||
302 | break; | ||
303 | case "FileSearchRef": | ||
304 | this.ParseWixSearchRefElement(intermediate, section, element); | ||
305 | break; | ||
306 | case "ProductSearch": | ||
307 | this.ParseProductSearchElement(intermediate, section, element); | ||
308 | break; | ||
309 | case "ProductSearchRef": | ||
310 | this.ParseWixSearchRefElement(intermediate, section, element); | ||
311 | break; | ||
312 | case "RegistrySearch": | ||
313 | this.ParseRegistrySearchElement(intermediate, section, element); | ||
314 | break; | ||
315 | case "RegistrySearchRef": | ||
316 | this.ParseWixSearchRefElement(intermediate, section, element); | ||
317 | break; | ||
318 | } | ||
319 | } | ||
320 | else | ||
321 | { | ||
322 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
323 | } | ||
324 | break; | ||
325 | default: | ||
326 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
327 | break; | ||
328 | } | ||
329 | break; | ||
330 | case "Registry": | ||
331 | case "RegistryKey": | ||
332 | case "RegistryValue": | ||
333 | string registryId = context["RegistryId"]; | ||
334 | string registryComponentId = context["ComponentId"]; | ||
335 | |||
336 | // If this doesn't parse successfully, something really odd is going on, so let the exception get thrown | ||
337 | bool registryWin64 = Boolean.Parse(context["Win64"]); | ||
338 | |||
339 | switch (element.Name.LocalName) | ||
340 | { | ||
341 | case "PermissionEx": | ||
342 | this.ParsePermissionExElement(intermediate, section, element, registryId, registryComponentId, registryWin64, "Registry"); | ||
343 | break; | ||
344 | default: | ||
345 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
346 | break; | ||
347 | } | ||
348 | break; | ||
349 | case "ServiceInstall": | ||
350 | string serviceInstallId = context["ServiceInstallId"]; | ||
351 | string serviceInstallName = context["ServiceInstallName"]; | ||
352 | string serviceInstallComponentId = context["ServiceInstallComponentId"]; | ||
353 | |||
354 | // If this doesn't parse successfully, something really odd is going on, so let the exception get thrown | ||
355 | bool serviceInstallWin64 = Boolean.Parse(context["Win64"]); | ||
356 | |||
357 | switch (element.Name.LocalName) | ||
358 | { | ||
359 | case "PermissionEx": | ||
360 | this.ParsePermissionExElement(intermediate, section, element, serviceInstallId, serviceInstallComponentId, serviceInstallWin64, "ServiceInstall"); | ||
361 | break; | ||
362 | case "ServiceConfig": | ||
363 | this.ParseServiceConfigElement(intermediate, section, element, serviceInstallComponentId, "ServiceInstall", serviceInstallName); | ||
364 | break; | ||
365 | default: | ||
366 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
367 | break; | ||
368 | } | ||
369 | break; | ||
370 | default: | ||
371 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
372 | break; | ||
373 | } | ||
374 | |||
375 | return possibleKeyPath; | ||
376 | } | ||
377 | |||
378 | /// <summary> | ||
379 | /// Parses the common search attributes shared across all searches. | ||
380 | /// </summary> | ||
381 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
382 | /// <param name="attrib">Attribute to parse.</param> | ||
383 | /// <param name="id">Value of the Id attribute.</param> | ||
384 | /// <param name="variable">Value of the Variable attribute.</param> | ||
385 | /// <param name="condition">Value of the Condition attribute.</param> | ||
386 | /// <param name="after">Value of the After attribute.</param> | ||
387 | private void ParseCommonSearchAttributes(SourceLineNumber sourceLineNumbers, XAttribute attrib, ref Identifier id, ref string variable, ref string condition, ref string after) | ||
388 | { | ||
389 | switch (attrib.Name.LocalName) | ||
390 | { | ||
391 | case "Id": | ||
392 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
393 | break; | ||
394 | case "Variable": | ||
395 | variable = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
396 | // TODO: handle standard bundle variables | ||
397 | break; | ||
398 | case "Condition": | ||
399 | condition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
400 | break; | ||
401 | case "After": | ||
402 | after = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
403 | break; | ||
404 | default: | ||
405 | System.Diagnostics.Debug.Assert(false); | ||
406 | break; | ||
407 | } | ||
408 | } | ||
409 | |||
410 | /// <summary> | ||
411 | /// Parses a ComponentSearch element. | ||
412 | /// </summary> | ||
413 | /// <param name="element">Element to parse.</param> | ||
414 | private void ParseComponentSearchElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
415 | { | ||
416 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
417 | Identifier id = null; | ||
418 | string variable = null; | ||
419 | string condition = null; | ||
420 | string after = null; | ||
421 | string guid = null; | ||
422 | string productCode = null; | ||
423 | Serialize.ComponentSearch.ResultType result = Serialize.ComponentSearch.ResultType.NotSet; | ||
424 | |||
425 | foreach (XAttribute attrib in element.Attributes()) | ||
426 | { | ||
427 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
428 | { | ||
429 | switch (attrib.Name.LocalName) | ||
430 | { | ||
431 | case "Id": | ||
432 | case "Variable": | ||
433 | case "Condition": | ||
434 | case "After": | ||
435 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | ||
436 | break; | ||
437 | case "Guid": | ||
438 | guid = this.ParseHelper.GetAttributeGuidValue(sourceLineNumbers, attrib); | ||
439 | break; | ||
440 | case "ProductCode": | ||
441 | productCode = this.ParseHelper.GetAttributeGuidValue(sourceLineNumbers, attrib); | ||
442 | break; | ||
443 | case "Result": | ||
444 | string resultValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
445 | if (!Serialize.ComponentSearch.TryParseResultType(resultValue, out result)) | ||
446 | { | ||
447 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Parent.Name.LocalName, attrib.Name.LocalName, | ||
448 | resultValue, | ||
449 | Serialize.ComponentSearch.ResultType.directory.ToString(), | ||
450 | Serialize.ComponentSearch.ResultType.state.ToString(), | ||
451 | Serialize.ComponentSearch.ResultType.keyPath.ToString())); | ||
452 | } | ||
453 | break; | ||
454 | default: | ||
455 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
456 | break; | ||
457 | } | ||
458 | } | ||
459 | else | ||
460 | { | ||
461 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
462 | } | ||
463 | } | ||
464 | |||
465 | if (null == variable) | ||
466 | { | ||
467 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Variable")); | ||
468 | } | ||
469 | |||
470 | if (null == guid) | ||
471 | { | ||
472 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Guid")); | ||
473 | } | ||
474 | |||
475 | if (null == id) | ||
476 | { | ||
477 | id = this.ParseHelper.CreateIdentifier("wcs", variable, condition, after, guid, productCode, result.ToString()); | ||
478 | } | ||
479 | |||
480 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
481 | |||
482 | if (!this.Messaging.EncounteredError) | ||
483 | { | ||
484 | this.CreateWixSearchRow(section, sourceLineNumbers, id, variable, condition); | ||
485 | if (after != null) | ||
486 | { | ||
487 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixSearch", after); | ||
488 | // TODO: We're currently defaulting to "always run after", which we will need to change... | ||
489 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); | ||
490 | } | ||
491 | |||
492 | WixComponentSearchAttributes attributes = WixComponentSearchAttributes.KeyPath; | ||
493 | switch (result) | ||
494 | { | ||
495 | case Serialize.ComponentSearch.ResultType.directory: | ||
496 | attributes = WixComponentSearchAttributes.WantDirectory; | ||
497 | break; | ||
498 | case Serialize.ComponentSearch.ResultType.keyPath: | ||
499 | attributes = WixComponentSearchAttributes.KeyPath; | ||
500 | break; | ||
501 | case Serialize.ComponentSearch.ResultType.state: | ||
502 | attributes = WixComponentSearchAttributes.State; | ||
503 | break; | ||
504 | } | ||
505 | |||
506 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixComponentSearch", id); | ||
507 | row.Set(1, guid); | ||
508 | row.Set(2, productCode); | ||
509 | row.Set(3, (int)attributes); | ||
510 | } | ||
511 | } | ||
512 | |||
513 | /// <summary> | ||
514 | /// Parses a ComponentSearchRef element | ||
515 | /// </summary> | ||
516 | /// <param name="element">Element to parse.</param> | ||
517 | private void ParseComponentSearchRefElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
518 | { | ||
519 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
520 | string refId = null; | ||
521 | |||
522 | foreach (XAttribute attrib in element.Attributes()) | ||
523 | { | ||
524 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
525 | { | ||
526 | switch (attrib.Name.LocalName) | ||
527 | { | ||
528 | case "Id": | ||
529 | refId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
530 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixComponentSearch", refId); | ||
531 | break; | ||
532 | default: | ||
533 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
534 | break; | ||
535 | } | ||
536 | } | ||
537 | else | ||
538 | { | ||
539 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
540 | } | ||
541 | } | ||
542 | |||
543 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
544 | } | ||
545 | |||
546 | /// <summary> | ||
547 | /// Parses an event source element. | ||
548 | /// </summary> | ||
549 | /// <param name="element">Element to parse.</param> | ||
550 | /// <param name="componentId">Identifier of parent component.</param> | ||
551 | private ComponentKeyPath ParseEventSourceElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
552 | { | ||
553 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
554 | string sourceName = null; | ||
555 | string logName = null; | ||
556 | string categoryMessageFile = null; | ||
557 | int categoryCount = CompilerConstants.IntegerNotSet; | ||
558 | string eventMessageFile = null; | ||
559 | string parameterMessageFile = null; | ||
560 | int typesSupported = 0; | ||
561 | bool isKeyPath = false; | ||
562 | |||
563 | foreach (XAttribute attrib in element.Attributes()) | ||
564 | { | ||
565 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
566 | { | ||
567 | switch (attrib.Name.LocalName) | ||
568 | { | ||
569 | case "CategoryCount": | ||
570 | categoryCount = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
571 | break; | ||
572 | case "CategoryMessageFile": | ||
573 | categoryMessageFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
574 | break; | ||
575 | case "EventMessageFile": | ||
576 | eventMessageFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
577 | break; | ||
578 | case "KeyPath": | ||
579 | isKeyPath = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
580 | break; | ||
581 | case "Log": | ||
582 | logName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
583 | if ("Security" == logName) | ||
584 | { | ||
585 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, logName, "Application", "System", "<customEventLog>")); | ||
586 | } | ||
587 | break; | ||
588 | case "Name": | ||
589 | sourceName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
590 | break; | ||
591 | case "ParameterMessageFile": | ||
592 | parameterMessageFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
593 | break; | ||
594 | case "SupportsErrors": | ||
595 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
596 | { | ||
597 | typesSupported |= 0x01; // EVENTLOG_ERROR_TYPE | ||
598 | } | ||
599 | break; | ||
600 | case "SupportsFailureAudits": | ||
601 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
602 | { | ||
603 | typesSupported |= 0x10; // EVENTLOG_AUDIT_FAILURE | ||
604 | } | ||
605 | break; | ||
606 | case "SupportsInformationals": | ||
607 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
608 | { | ||
609 | typesSupported |= 0x04; // EVENTLOG_INFORMATION_TYPE | ||
610 | } | ||
611 | break; | ||
612 | case "SupportsSuccessAudits": | ||
613 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
614 | { | ||
615 | typesSupported |= 0x08; // EVENTLOG_AUDIT_SUCCESS | ||
616 | } | ||
617 | break; | ||
618 | case "SupportsWarnings": | ||
619 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
620 | { | ||
621 | typesSupported |= 0x02; // EVENTLOG_WARNING_TYPE | ||
622 | } | ||
623 | break; | ||
624 | default: | ||
625 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
626 | break; | ||
627 | } | ||
628 | } | ||
629 | else | ||
630 | { | ||
631 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
632 | } | ||
633 | } | ||
634 | |||
635 | if (null == sourceName) | ||
636 | { | ||
637 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | ||
638 | } | ||
639 | |||
640 | if (null == logName) | ||
641 | { | ||
642 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "EventLog")); | ||
643 | } | ||
644 | |||
645 | if (null == eventMessageFile) | ||
646 | { | ||
647 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "EventMessageFile")); | ||
648 | } | ||
649 | |||
650 | if (null == categoryMessageFile && 0 < categoryCount) | ||
651 | { | ||
652 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, element.Name.LocalName, "CategoryCount", "CategoryMessageFile")); | ||
653 | } | ||
654 | |||
655 | if (null != categoryMessageFile && CompilerConstants.IntegerNotSet == categoryCount) | ||
656 | { | ||
657 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, element.Name.LocalName, "CategoryMessageFile", "CategoryCount")); | ||
658 | } | ||
659 | |||
660 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
661 | |||
662 | int registryRoot = 2; // MsiInterop.MsidbRegistryRootLocalMachine | ||
663 | string eventSourceKey = String.Format(@"SYSTEM\CurrentControlSet\Services\EventLog\{0}\{1}", logName, sourceName); | ||
664 | Identifier id = this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "EventMessageFile", String.Concat("#%", eventMessageFile), componentId, false); | ||
665 | |||
666 | if (null != categoryMessageFile) | ||
667 | { | ||
668 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "CategoryMessageFile", String.Concat("#%", categoryMessageFile), componentId, false); | ||
669 | } | ||
670 | |||
671 | if (CompilerConstants.IntegerNotSet != categoryCount) | ||
672 | { | ||
673 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "CategoryCount", String.Concat("#", categoryCount), componentId, false); | ||
674 | } | ||
675 | |||
676 | if (null != parameterMessageFile) | ||
677 | { | ||
678 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "ParameterMessageFile", String.Concat("#%", parameterMessageFile), componentId, false); | ||
679 | } | ||
680 | |||
681 | if (0 != typesSupported) | ||
682 | { | ||
683 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "TypesSupported", String.Concat("#", typesSupported), componentId, false); | ||
684 | } | ||
685 | |||
686 | return new ComponentKeyPath() { Id = id.Id, Explicit = isKeyPath, Type = ComponentKeyPathType.Registry }; | ||
687 | } | ||
688 | |||
689 | /// <summary> | ||
690 | /// Parses a close application element. | ||
691 | /// </summary> | ||
692 | /// <param name="element">Element to parse.</param> | ||
693 | private void ParseCloseApplicationElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
694 | { | ||
695 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
696 | string condition = null; | ||
697 | string description = null; | ||
698 | string target = null; | ||
699 | string property = null; | ||
700 | Identifier id = null; | ||
701 | int attributes = 2; // default to CLOSEAPP_ATTRIBUTE_REBOOTPROMPT enabled | ||
702 | int sequence = CompilerConstants.IntegerNotSet; | ||
703 | int terminateExitCode = CompilerConstants.IntegerNotSet; | ||
704 | int timeout = CompilerConstants.IntegerNotSet; | ||
705 | |||
706 | foreach (XAttribute attrib in element.Attributes()) | ||
707 | { | ||
708 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
709 | { | ||
710 | switch (attrib.Name.LocalName) | ||
711 | { | ||
712 | case "Id": | ||
713 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
714 | break; | ||
715 | case "Description": | ||
716 | description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
717 | break; | ||
718 | case "Property": | ||
719 | property = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
720 | break; | ||
721 | case "Sequence": | ||
722 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
723 | break; | ||
724 | case "Timeout": | ||
725 | timeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
726 | break; | ||
727 | case "Target": | ||
728 | target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
729 | break; | ||
730 | case "CloseMessage": | ||
731 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
732 | { | ||
733 | attributes |= 1; // CLOSEAPP_ATTRIBUTE_CLOSEMESSAGE | ||
734 | } | ||
735 | else | ||
736 | { | ||
737 | attributes &= ~1; // CLOSEAPP_ATTRIBUTE_CLOSEMESSAGE | ||
738 | } | ||
739 | break; | ||
740 | case "EndSessionMessage": | ||
741 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
742 | { | ||
743 | attributes |= 8; // CLOSEAPP_ATTRIBUTE_ENDSESSIONMESSAGE | ||
744 | } | ||
745 | else | ||
746 | { | ||
747 | attributes &= ~8; // CLOSEAPP_ATTRIBUTE_ENDSESSIONMESSAGE | ||
748 | } | ||
749 | break; | ||
750 | case "PromptToContinue": | ||
751 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
752 | { | ||
753 | attributes |= 0x40; // CLOSEAPP_ATTRIBUTE_PROMPTTOCONTINUE | ||
754 | } | ||
755 | else | ||
756 | { | ||
757 | attributes &= ~0x40; // CLOSEAPP_ATTRIBUTE_PROMPTTOCONTINUE | ||
758 | } | ||
759 | break; | ||
760 | case "RebootPrompt": | ||
761 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
762 | { | ||
763 | attributes |= 2; // CLOSEAPP_ATTRIBUTE_REBOOTPROMPT | ||
764 | } | ||
765 | else | ||
766 | { | ||
767 | attributes &= ~2; // CLOSEAPP_ATTRIBUTE_REBOOTPROMPT | ||
768 | } | ||
769 | break; | ||
770 | case "ElevatedCloseMessage": | ||
771 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
772 | { | ||
773 | attributes |= 4; // CLOSEAPP_ATTRIBUTE_ELEVATEDCLOSEMESSAGE | ||
774 | } | ||
775 | else | ||
776 | { | ||
777 | attributes &= ~4; // CLOSEAPP_ATTRIBUTE_ELEVATEDCLOSEMESSAGE | ||
778 | } | ||
779 | break; | ||
780 | case "ElevatedEndSessionMessage": | ||
781 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
782 | { | ||
783 | attributes |= 0x10; // CLOSEAPP_ATTRIBUTE_ELEVATEDENDSESSIONMESSAGE | ||
784 | } | ||
785 | else | ||
786 | { | ||
787 | attributes &= ~0x10; // CLOSEAPP_ATTRIBUTE_ELEVATEDENDSESSIONMESSAGE | ||
788 | } | ||
789 | break; | ||
790 | case "TerminateProcess": | ||
791 | terminateExitCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
792 | attributes |= 0x20; // CLOSEAPP_ATTRIBUTE_TERMINATEPROCESS | ||
793 | break; | ||
794 | default: | ||
795 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
796 | break; | ||
797 | } | ||
798 | } | ||
799 | else | ||
800 | { | ||
801 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
802 | } | ||
803 | } | ||
804 | |||
805 | if (null == target) | ||
806 | { | ||
807 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target")); | ||
808 | } | ||
809 | else if (null == id) | ||
810 | { | ||
811 | id = this.ParseHelper.CreateIdentifier("ca", target); | ||
812 | } | ||
813 | |||
814 | if (String.IsNullOrEmpty(description) && 0x40 == (attributes & 0x40)) | ||
815 | { | ||
816 | this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, element.Name.LocalName, "PromptToContinue", "yes", "Description")); | ||
817 | } | ||
818 | |||
819 | if (0x22 == (attributes & 0x22)) | ||
820 | { | ||
821 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "TerminateProcess", "RebootPrompt", "yes")); | ||
822 | } | ||
823 | |||
824 | // get the condition from the inner text of the element | ||
825 | condition = this.ParseHelper.GetConditionInnerText(element); | ||
826 | |||
827 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
828 | |||
829 | // Reference CustomAction since nothing will happen without it | ||
830 | if (this.Context.Platform == Platform.ARM) | ||
831 | { | ||
832 | // Ensure ARM version of the CA is referenced | ||
833 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixCloseApplications_ARM"); | ||
834 | } | ||
835 | else | ||
836 | { | ||
837 | // All other supported platforms use x86 | ||
838 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixCloseApplications"); | ||
839 | } | ||
840 | |||
841 | if (!this.Messaging.EncounteredError) | ||
842 | { | ||
843 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixCloseApplication", id); | ||
844 | row.Set(1, target); | ||
845 | row.Set(2, description); | ||
846 | row.Set(3, condition); | ||
847 | row.Set(4, attributes); | ||
848 | if (CompilerConstants.IntegerNotSet != sequence) | ||
849 | { | ||
850 | row.Set(5, sequence); | ||
851 | } | ||
852 | row.Set(6, property); | ||
853 | if (CompilerConstants.IntegerNotSet != terminateExitCode) | ||
854 | { | ||
855 | row.Set(7, terminateExitCode); | ||
856 | } | ||
857 | if (CompilerConstants.IntegerNotSet != timeout) | ||
858 | { | ||
859 | row.Set(8, timeout * 1000); // make the timeout milliseconds in the table. | ||
860 | } | ||
861 | } | ||
862 | } | ||
863 | |||
864 | /// <summary> | ||
865 | /// Parses a DirectorySearch element. | ||
866 | /// </summary> | ||
867 | /// <param name="element">Element to parse.</param> | ||
868 | private void ParseDirectorySearchElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
869 | { | ||
870 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
871 | Identifier id = null; | ||
872 | string variable = null; | ||
873 | string condition = null; | ||
874 | string after = null; | ||
875 | string path = null; | ||
876 | Serialize.DirectorySearch.ResultType result = Serialize.DirectorySearch.ResultType.NotSet; | ||
877 | |||
878 | foreach (XAttribute attrib in element.Attributes()) | ||
879 | { | ||
880 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
881 | { | ||
882 | switch (attrib.Name.LocalName) | ||
883 | { | ||
884 | case "Id": | ||
885 | case "Variable": | ||
886 | case "Condition": | ||
887 | case "After": | ||
888 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | ||
889 | break; | ||
890 | case "Path": | ||
891 | path = this.ParseHelper.GetAttributeLongFilename(sourceLineNumbers, attrib, false, true); | ||
892 | break; | ||
893 | case "Result": | ||
894 | string resultValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
895 | if (!Serialize.DirectorySearch.TryParseResultType(resultValue, out result)) | ||
896 | { | ||
897 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Parent.Name.LocalName, attrib.Name.LocalName, | ||
898 | resultValue, Serialize.DirectorySearch.ResultType.exists.ToString())); | ||
899 | } | ||
900 | break; | ||
901 | default: | ||
902 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
903 | break; | ||
904 | } | ||
905 | } | ||
906 | else | ||
907 | { | ||
908 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
909 | } | ||
910 | } | ||
911 | |||
912 | if (null == variable) | ||
913 | { | ||
914 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Variable")); | ||
915 | } | ||
916 | |||
917 | if (null == path) | ||
918 | { | ||
919 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Path")); | ||
920 | } | ||
921 | |||
922 | if (null == id) | ||
923 | { | ||
924 | id = this.ParseHelper.CreateIdentifier("wds", variable, condition, after, path, result.ToString()); | ||
925 | } | ||
926 | |||
927 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
928 | |||
929 | if (!this.Messaging.EncounteredError) | ||
930 | { | ||
931 | this.CreateWixSearchRow(section, sourceLineNumbers, id, variable, condition); | ||
932 | if (after != null) | ||
933 | { | ||
934 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixSearch", after); | ||
935 | // TODO: We're currently defaulting to "always run after", which we will need to change... | ||
936 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); | ||
937 | } | ||
938 | |||
939 | WixFileSearchAttributes attributes = WixFileSearchAttributes.IsDirectory; | ||
940 | switch (result) | ||
941 | { | ||
942 | case Serialize.DirectorySearch.ResultType.exists: | ||
943 | attributes |= WixFileSearchAttributes.WantExists; | ||
944 | break; | ||
945 | } | ||
946 | |||
947 | this.CreateWixFileSearchRow(section, sourceLineNumbers, id, path, attributes); | ||
948 | } | ||
949 | } | ||
950 | |||
951 | /// <summary> | ||
952 | /// Parses a DirectorySearchRef, FileSearchRef, ProductSearchRef, and RegistrySearchRef elements | ||
953 | /// </summary> | ||
954 | /// <param name="node">Element to parse.</param> | ||
955 | private void ParseWixSearchRefElement(Intermediate intermediate, IntermediateSection section, XElement node) | ||
956 | { | ||
957 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
958 | string refId = null; | ||
959 | |||
960 | foreach (XAttribute attrib in node.Attributes()) | ||
961 | { | ||
962 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
963 | { | ||
964 | switch (attrib.Name.LocalName) | ||
965 | { | ||
966 | case "Id": | ||
967 | refId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
968 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixSearch", refId); | ||
969 | break; | ||
970 | default: | ||
971 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
972 | break; | ||
973 | } | ||
974 | } | ||
975 | else | ||
976 | { | ||
977 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
978 | } | ||
979 | } | ||
980 | |||
981 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | ||
982 | } | ||
983 | |||
984 | /// <summary> | ||
985 | /// Parses a FileSearch element. | ||
986 | /// </summary> | ||
987 | /// <param name="node">Element to parse.</param> | ||
988 | private void ParseFileSearchElement(Intermediate intermediate, IntermediateSection section, XElement node) | ||
989 | { | ||
990 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
991 | Identifier id = null; | ||
992 | string variable = null; | ||
993 | string condition = null; | ||
994 | string after = null; | ||
995 | string path = null; | ||
996 | Serialize.FileSearch.ResultType result = Serialize.FileSearch.ResultType.NotSet; | ||
997 | |||
998 | foreach (XAttribute attrib in node.Attributes()) | ||
999 | { | ||
1000 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1001 | { | ||
1002 | switch (attrib.Name.LocalName) | ||
1003 | { | ||
1004 | case "Id": | ||
1005 | case "Variable": | ||
1006 | case "Condition": | ||
1007 | case "After": | ||
1008 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | ||
1009 | break; | ||
1010 | case "Path": | ||
1011 | path = this.ParseHelper.GetAttributeLongFilename(sourceLineNumbers, attrib, false, true); | ||
1012 | break; | ||
1013 | case "Result": | ||
1014 | string resultValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1015 | if (!Serialize.FileSearch.TryParseResultType(resultValue, out result)) | ||
1016 | { | ||
1017 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Parent.Name.LocalName, attrib.Name.LocalName, | ||
1018 | resultValue, | ||
1019 | Serialize.FileSearch.ResultType.exists.ToString(), | ||
1020 | Serialize.FileSearch.ResultType.version.ToString())); | ||
1021 | } | ||
1022 | break; | ||
1023 | default: | ||
1024 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
1025 | break; | ||
1026 | } | ||
1027 | } | ||
1028 | else | ||
1029 | { | ||
1030 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
1031 | } | ||
1032 | } | ||
1033 | |||
1034 | if (null == variable) | ||
1035 | { | ||
1036 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Variable")); | ||
1037 | } | ||
1038 | |||
1039 | if (null == path) | ||
1040 | { | ||
1041 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path")); | ||
1042 | } | ||
1043 | |||
1044 | if (null == id) | ||
1045 | { | ||
1046 | id = this.ParseHelper.CreateIdentifier("wfs", variable, condition, after, path, result.ToString()); | ||
1047 | } | ||
1048 | |||
1049 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | ||
1050 | |||
1051 | if (!this.Messaging.EncounteredError) | ||
1052 | { | ||
1053 | this.CreateWixSearchRow(section, sourceLineNumbers, id, variable, condition); | ||
1054 | if (after != null) | ||
1055 | { | ||
1056 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixSearch", after); | ||
1057 | // TODO: We're currently defaulting to "always run after", which we will need to change... | ||
1058 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); | ||
1059 | } | ||
1060 | |||
1061 | WixFileSearchAttributes attributes = WixFileSearchAttributes.Default; | ||
1062 | switch (result) | ||
1063 | { | ||
1064 | case Serialize.FileSearch.ResultType.exists: | ||
1065 | attributes |= WixFileSearchAttributes.WantExists; | ||
1066 | break; | ||
1067 | case Serialize.FileSearch.ResultType.version: | ||
1068 | attributes |= WixFileSearchAttributes.WantVersion; | ||
1069 | break; | ||
1070 | } | ||
1071 | |||
1072 | this.CreateWixFileSearchRow(section, sourceLineNumbers, id, path, attributes); | ||
1073 | } | ||
1074 | } | ||
1075 | |||
1076 | /// <summary> | ||
1077 | /// Creates a row in the WixFileSearch table. | ||
1078 | /// </summary> | ||
1079 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
1080 | /// <param name="id">Identifier of the search (key into the WixSearch table)</param> | ||
1081 | /// <param name="path">File/directory path to search for.</param> | ||
1082 | /// <param name="attributes"></param> | ||
1083 | private void CreateWixFileSearchRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string path, WixFileSearchAttributes attributes) | ||
1084 | { | ||
1085 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixFileSearch", id); | ||
1086 | row.Set(1, path); | ||
1087 | //row.Set(2, minVersion; | ||
1088 | //row.Set(3, maxVersion; | ||
1089 | //row.Set(4, minSize; | ||
1090 | //row.Set(5, maxSize; | ||
1091 | //row.Set(6, minDate; | ||
1092 | //row.Set(7, maxDate; | ||
1093 | //row.Set(8, languages; | ||
1094 | row.Set(9, (int)attributes); | ||
1095 | } | ||
1096 | |||
1097 | /// <summary> | ||
1098 | /// Creates a row in the WixSearch table. | ||
1099 | /// </summary> | ||
1100 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
1101 | /// <param name="id">Identifier of the search.</param> | ||
1102 | /// <param name="variable">The Burn variable to store the result into.</param> | ||
1103 | /// <param name="condition">A condition to test before evaluating the search.</param> | ||
1104 | private void CreateWixSearchRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string variable, string condition) | ||
1105 | { | ||
1106 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixSearch", id); | ||
1107 | row.Set(1, variable); | ||
1108 | row.Set(2, condition); | ||
1109 | } | ||
1110 | |||
1111 | /// <summary> | ||
1112 | /// | ||
1113 | /// </summary> | ||
1114 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
1115 | /// <param name="id">Identifier of the search (key into the WixSearch table)</param> | ||
1116 | /// <param name="parentId">Identifier of the search that comes before (key into the WixSearch table)</param> | ||
1117 | /// <param name="attributes">Further details about the relation between id and parentId.</param> | ||
1118 | private void CreateWixSearchRelationRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes) | ||
1119 | { | ||
1120 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixSearchRelation", id); | ||
1121 | row.Set(1, parentId); | ||
1122 | row.Set(2, attributes); | ||
1123 | } | ||
1124 | |||
1125 | /// <summary> | ||
1126 | /// Parses a file share element. | ||
1127 | /// </summary> | ||
1128 | /// <param name="element">Element to parse.</param> | ||
1129 | /// <param name="componentId">Identifier of parent component.</param> | ||
1130 | /// <param name="directoryId">Identifier of referred to directory.</param> | ||
1131 | private void ParseFileShareElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string directoryId) | ||
1132 | { | ||
1133 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1134 | string description = null; | ||
1135 | string name = null; | ||
1136 | string id = null; | ||
1137 | |||
1138 | foreach (XAttribute attrib in element.Attributes()) | ||
1139 | { | ||
1140 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1141 | { | ||
1142 | switch (attrib.Name.LocalName) | ||
1143 | { | ||
1144 | case "Id": | ||
1145 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1146 | break; | ||
1147 | case "Name": | ||
1148 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1149 | break; | ||
1150 | case "Description": | ||
1151 | description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1152 | break; | ||
1153 | default: | ||
1154 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
1155 | break; | ||
1156 | } | ||
1157 | } | ||
1158 | else | ||
1159 | { | ||
1160 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
1161 | } | ||
1162 | } | ||
1163 | |||
1164 | if (null == id) | ||
1165 | { | ||
1166 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
1167 | } | ||
1168 | |||
1169 | if (null == name) | ||
1170 | { | ||
1171 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | ||
1172 | } | ||
1173 | |||
1174 | if (!element.Elements().Any()) | ||
1175 | { | ||
1176 | this.Messaging.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, element.Name.LocalName, "FileSharePermission")); | ||
1177 | } | ||
1178 | |||
1179 | foreach (XElement child in element.Elements()) | ||
1180 | { | ||
1181 | if (this.Namespace == child.Name.Namespace) | ||
1182 | { | ||
1183 | switch (child.Name.LocalName) | ||
1184 | { | ||
1185 | case "FileSharePermission": | ||
1186 | this.ParseFileSharePermissionElement(intermediate, section, child, id); | ||
1187 | break; | ||
1188 | default: | ||
1189 | this.ParseHelper.UnexpectedElement(element, child); | ||
1190 | break; | ||
1191 | } | ||
1192 | } | ||
1193 | else | ||
1194 | { | ||
1195 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); | ||
1196 | } | ||
1197 | } | ||
1198 | |||
1199 | // Reference ConfigureSmbInstall and ConfigureSmbUninstall since nothing will happen without it | ||
1200 | if (this.Context.Platform == Platform.ARM) | ||
1201 | { | ||
1202 | // Ensure ARM version of the CA is referenced | ||
1203 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureSmbInstall_ARM"); | ||
1204 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureSmbUninstall_ARM"); | ||
1205 | } | ||
1206 | else | ||
1207 | { | ||
1208 | // All other supported platforms use x86 | ||
1209 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureSmbInstall"); | ||
1210 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureSmbUninstall"); | ||
1211 | } | ||
1212 | |||
1213 | if (!this.Messaging.EncounteredError) | ||
1214 | { | ||
1215 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "FileShare"); | ||
1216 | row.Set(0, id); | ||
1217 | row.Set(1, name); | ||
1218 | row.Set(2, componentId); | ||
1219 | row.Set(3, description); | ||
1220 | row.Set(4, directoryId); | ||
1221 | } | ||
1222 | } | ||
1223 | |||
1224 | /// <summary> | ||
1225 | /// Parses a FileSharePermission element. | ||
1226 | /// </summary> | ||
1227 | /// <param name="element">Element to parse.</param> | ||
1228 | /// <param name="fileShareId">The identifier of the parent FileShare element.</param> | ||
1229 | private void ParseFileSharePermissionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileShareId) | ||
1230 | { | ||
1231 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1232 | BitArray bits = new BitArray(32); | ||
1233 | int permission = 0; | ||
1234 | string user = null; | ||
1235 | |||
1236 | foreach (XAttribute attrib in element.Attributes()) | ||
1237 | { | ||
1238 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1239 | { | ||
1240 | switch (attrib.Name.LocalName) | ||
1241 | { | ||
1242 | case "User": | ||
1243 | user = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1244 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); | ||
1245 | break; | ||
1246 | default: | ||
1247 | YesNoType attribValue = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
1248 | if (!this.TrySetBitFromName(UtilConstants.StandardPermissions, attrib.Name.LocalName, attribValue, bits, 16)) | ||
1249 | { | ||
1250 | if (!this.TrySetBitFromName(UtilConstants.GenericPermissions, attrib.Name.LocalName, attribValue, bits, 28)) | ||
1251 | { | ||
1252 | if (!this.TrySetBitFromName(UtilConstants.FolderPermissions, attrib.Name.LocalName, attribValue, bits, 0)) | ||
1253 | { | ||
1254 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
1255 | break; | ||
1256 | } | ||
1257 | } | ||
1258 | } | ||
1259 | break; | ||
1260 | } | ||
1261 | } | ||
1262 | else | ||
1263 | { | ||
1264 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
1265 | } | ||
1266 | } | ||
1267 | |||
1268 | permission = this.CreateIntegerFromBitArray(bits); | ||
1269 | |||
1270 | if (null == user) | ||
1271 | { | ||
1272 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User")); | ||
1273 | } | ||
1274 | |||
1275 | if (int.MinValue == permission) // just GENERIC_READ, which is MSI_NULL | ||
1276 | { | ||
1277 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); | ||
1278 | } | ||
1279 | |||
1280 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
1281 | |||
1282 | if (!this.Messaging.EncounteredError) | ||
1283 | { | ||
1284 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "FileSharePermissions"); | ||
1285 | row.Set(0, fileShareId); | ||
1286 | row.Set(1, user); | ||
1287 | row.Set(2, permission); | ||
1288 | } | ||
1289 | } | ||
1290 | |||
1291 | /// <summary> | ||
1292 | /// Parses a group element. | ||
1293 | /// </summary> | ||
1294 | /// <param name="element">Node to be parsed.</param> | ||
1295 | /// <param name="componentId">Component Id of the parent component of this element.</param> | ||
1296 | private void ParseGroupElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
1297 | { | ||
1298 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1299 | string id = null; | ||
1300 | string domain = null; | ||
1301 | string name = null; | ||
1302 | |||
1303 | foreach (XAttribute attrib in element.Attributes()) | ||
1304 | { | ||
1305 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1306 | { | ||
1307 | switch (attrib.Name.LocalName) | ||
1308 | { | ||
1309 | case "Id": | ||
1310 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1311 | break; | ||
1312 | case "Name": | ||
1313 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1314 | break; | ||
1315 | case "Domain": | ||
1316 | domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1317 | break; | ||
1318 | default: | ||
1319 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
1320 | break; | ||
1321 | } | ||
1322 | } | ||
1323 | else | ||
1324 | { | ||
1325 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
1326 | } | ||
1327 | } | ||
1328 | |||
1329 | if (null == id) | ||
1330 | { | ||
1331 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
1332 | } | ||
1333 | |||
1334 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
1335 | |||
1336 | if (!this.Messaging.EncounteredError) | ||
1337 | { | ||
1338 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Group"); | ||
1339 | row.Set(0, id); | ||
1340 | row.Set(1, componentId); | ||
1341 | row.Set(2, name); | ||
1342 | row.Set(3, domain); | ||
1343 | } | ||
1344 | } | ||
1345 | |||
1346 | /// <summary> | ||
1347 | /// Parses a GroupRef element | ||
1348 | /// </summary> | ||
1349 | /// <param name="element">Element to parse.</param> | ||
1350 | /// <param name="userId">Required user id to be joined to the group.</param> | ||
1351 | private void ParseGroupRefElement(Intermediate intermediate, IntermediateSection section, XElement element, string userId) | ||
1352 | { | ||
1353 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1354 | string groupId = null; | ||
1355 | |||
1356 | foreach (XAttribute attrib in element.Attributes()) | ||
1357 | { | ||
1358 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1359 | { | ||
1360 | switch (attrib.Name.LocalName) | ||
1361 | { | ||
1362 | case "Id": | ||
1363 | groupId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1364 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", groupId); | ||
1365 | break; | ||
1366 | default: | ||
1367 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
1368 | break; | ||
1369 | } | ||
1370 | } | ||
1371 | else | ||
1372 | { | ||
1373 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
1374 | } | ||
1375 | } | ||
1376 | |||
1377 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
1378 | |||
1379 | if (!this.Messaging.EncounteredError) | ||
1380 | { | ||
1381 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "UserGroup"); | ||
1382 | row.Set(0, userId); | ||
1383 | row.Set(1, groupId); | ||
1384 | } | ||
1385 | } | ||
1386 | |||
1387 | /// <summary> | ||
1388 | /// Parses an InternetShortcut element. | ||
1389 | /// </summary> | ||
1390 | /// <param name="element">Element to parse.</param> | ||
1391 | /// <param name="componentId">Identifier of parent component.</param> | ||
1392 | /// <param name="defaultTarget">Default directory if none is specified on the InternetShortcut element.</param> | ||
1393 | private void ParseInternetShortcutElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string defaultTarget) | ||
1394 | { | ||
1395 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1396 | string id = null; | ||
1397 | string name = null; | ||
1398 | string target = null; | ||
1399 | string directoryId = null; | ||
1400 | string type = null; | ||
1401 | string iconFile = null; | ||
1402 | int iconIndex = 0; | ||
1403 | |||
1404 | foreach (XAttribute attrib in element.Attributes()) | ||
1405 | { | ||
1406 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1407 | { | ||
1408 | switch (attrib.Name.LocalName) | ||
1409 | { | ||
1410 | case "Directory": | ||
1411 | directoryId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1412 | break; | ||
1413 | case "Id": | ||
1414 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1415 | break; | ||
1416 | case "Name": | ||
1417 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1418 | break; | ||
1419 | case "Target": | ||
1420 | target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1421 | break; | ||
1422 | case "Type": | ||
1423 | type = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1424 | break; | ||
1425 | case "IconFile": | ||
1426 | iconFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1427 | break; | ||
1428 | case "IconIndex": | ||
1429 | iconIndex = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
1430 | break; | ||
1431 | default: | ||
1432 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
1433 | break; | ||
1434 | } | ||
1435 | } | ||
1436 | else | ||
1437 | { | ||
1438 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
1439 | } | ||
1440 | } | ||
1441 | |||
1442 | // If there was no directoryId specified on the InternetShortcut element, default to the one on | ||
1443 | // the parent component. | ||
1444 | if (null == directoryId) | ||
1445 | { | ||
1446 | directoryId = defaultTarget; | ||
1447 | } | ||
1448 | |||
1449 | if (null == id) | ||
1450 | { | ||
1451 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
1452 | } | ||
1453 | |||
1454 | // In theory this can never be the case, since InternetShortcut can only be under | ||
1455 | // a component element, and if the Directory wasn't specified the default will come | ||
1456 | // from the component. However, better safe than sorry, so here's a check to make sure | ||
1457 | // it didn't wind up being null after setting it to the defaultTarget. | ||
1458 | if (null == directoryId) | ||
1459 | { | ||
1460 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Directory")); | ||
1461 | } | ||
1462 | |||
1463 | if (null == name) | ||
1464 | { | ||
1465 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | ||
1466 | } | ||
1467 | |||
1468 | if (null == target) | ||
1469 | { | ||
1470 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target")); | ||
1471 | } | ||
1472 | |||
1473 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
1474 | |||
1475 | InternetShortcutType shortcutType = InternetShortcutType.Link; | ||
1476 | if (0 == String.Compare(type, "url", StringComparison.OrdinalIgnoreCase)) | ||
1477 | { | ||
1478 | shortcutType = InternetShortcutType.Url; | ||
1479 | } | ||
1480 | |||
1481 | if (!this.Messaging.EncounteredError) | ||
1482 | { | ||
1483 | CreateWixInternetShortcut(intermediate, section, sourceLineNumbers, componentId, directoryId, id, name, target, shortcutType, iconFile, iconIndex); | ||
1484 | } | ||
1485 | } | ||
1486 | |||
1487 | /// <summary> | ||
1488 | /// Creates the rows needed for WixInternetShortcut to work. | ||
1489 | /// </summary> | ||
1490 | /// <param name="core">The CompilerCore object used to create rows.</param> | ||
1491 | /// <param name="sourceLineNumbers">Source line information about the owner element.</param> | ||
1492 | /// <param name="componentId">Identifier of parent component.</param> | ||
1493 | /// <param name="directoryId">Identifier of directory containing shortcut.</param> | ||
1494 | /// <param name="id">Identifier of shortcut.</param> | ||
1495 | /// <param name="name">Name of shortcut without extension.</param> | ||
1496 | /// <param name="target">Target URL of shortcut.</param> | ||
1497 | public void CreateWixInternetShortcut(Intermediate intermediate, IntermediateSection section, SourceLineNumber sourceLineNumbers, string componentId, string directoryId, string shortcutId, string name, string target, InternetShortcutType type, string iconFile, int iconIndex) | ||
1498 | { | ||
1499 | // add the appropriate extension based on type of shortcut | ||
1500 | name = String.Concat(name, InternetShortcutType.Url == type ? ".url" : ".lnk"); | ||
1501 | |||
1502 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixInternetShortcut"); | ||
1503 | row.Set(0, shortcutId); | ||
1504 | row.Set(1, componentId); | ||
1505 | row.Set(2, directoryId); | ||
1506 | row.Set(3, name); | ||
1507 | row.Set(4, target); | ||
1508 | row.Set(5, (int)type); | ||
1509 | row.Set(6, iconFile); | ||
1510 | row.Set(7, iconIndex); | ||
1511 | |||
1512 | // Reference custom action because nothing will happen without it | ||
1513 | if (this.Context.Platform == Platform.ARM) | ||
1514 | { | ||
1515 | // Ensure ARM version of the CA is referenced | ||
1516 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedInternetShortcuts_ARM"); | ||
1517 | } | ||
1518 | else | ||
1519 | { | ||
1520 | // All other supported platforms use x86 | ||
1521 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedInternetShortcuts"); | ||
1522 | } | ||
1523 | |||
1524 | // make sure we have a CreateFolder table so that the immediate CA can add temporary rows to handle installation and uninstallation | ||
1525 | this.ParseHelper.EnsureTable(section, sourceLineNumbers, "CreateFolder"); | ||
1526 | |||
1527 | // use built-in MSI functionality to remove the shortcuts rather than doing so via CA | ||
1528 | row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "RemoveFile"); | ||
1529 | row.Set(0, shortcutId); | ||
1530 | row.Set(1, componentId); | ||
1531 | row.Set(2, this.ParseHelper.IsValidShortFilename(name, false) ? name : String.Concat(this.ParseHelper.CreateShortName(name, true, false, directoryId, name), "|", name)); | ||
1532 | row.Set(3, directoryId); | ||
1533 | row.Set(4, 2); // msidbRemoveFileInstallModeOnRemove | ||
1534 | } | ||
1535 | |||
1536 | /// <summary> | ||
1537 | /// Parses a performance category element. | ||
1538 | /// </summary> | ||
1539 | /// <param name="element">Element to parse.</param> | ||
1540 | /// <param name="componentId">Identifier of parent component.</param> | ||
1541 | private void ParsePerformanceCategoryElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
1542 | { | ||
1543 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1544 | string id = null; | ||
1545 | string name = null; | ||
1546 | string help = null; | ||
1547 | YesNoType multiInstance = YesNoType.No; | ||
1548 | int defaultLanguage = 0x09; // default to "english" | ||
1549 | |||
1550 | ArrayList parsedPerformanceCounters = new ArrayList(); | ||
1551 | |||
1552 | // default to managed performance counter | ||
1553 | string library = "netfxperf.dll"; | ||
1554 | string openEntryPoint = "OpenPerformanceData"; | ||
1555 | string collectEntryPoint = "CollectPerformanceData"; | ||
1556 | string closeEntryPoint = "ClosePerformanceData"; | ||
1557 | |||
1558 | foreach (XAttribute attrib in element.Attributes()) | ||
1559 | { | ||
1560 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1561 | { | ||
1562 | switch (attrib.Name.LocalName) | ||
1563 | { | ||
1564 | case "Close": | ||
1565 | closeEntryPoint = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1566 | break; | ||
1567 | case "Collect": | ||
1568 | collectEntryPoint = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1569 | break; | ||
1570 | case "DefaultLanguage": | ||
1571 | defaultLanguage = this.GetPerformanceCounterLanguage(sourceLineNumbers, attrib); | ||
1572 | break; | ||
1573 | case "Help": | ||
1574 | help = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1575 | break; | ||
1576 | case "Id": | ||
1577 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
1578 | break; | ||
1579 | case "Library": | ||
1580 | library = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1581 | break; | ||
1582 | case "MultiInstance": | ||
1583 | multiInstance = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
1584 | break; | ||
1585 | case "Name": | ||
1586 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1587 | break; | ||
1588 | case "Open": | ||
1589 | openEntryPoint = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1590 | break; | ||
1591 | default: | ||
1592 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
1593 | break; | ||
1594 | } | ||
1595 | } | ||
1596 | else | ||
1597 | { | ||
1598 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
1599 | } | ||
1600 | } | ||
1601 | |||
1602 | if (null == id) | ||
1603 | { | ||
1604 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
1605 | } | ||
1606 | |||
1607 | if (null == name) | ||
1608 | { | ||
1609 | name = id; | ||
1610 | } | ||
1611 | |||
1612 | // Process the child counter elements. | ||
1613 | foreach (XElement child in element.Elements()) | ||
1614 | { | ||
1615 | if (this.Namespace == child.Name.Namespace) | ||
1616 | { | ||
1617 | switch (child.Name.LocalName) | ||
1618 | { | ||
1619 | case "PerformanceCounter": | ||
1620 | ParsedPerformanceCounter counter = this.ParsePerformanceCounterElement(intermediate, section, child, defaultLanguage); | ||
1621 | if (null != counter) | ||
1622 | { | ||
1623 | parsedPerformanceCounters.Add(counter); | ||
1624 | } | ||
1625 | break; | ||
1626 | default: | ||
1627 | this.ParseHelper.UnexpectedElement(element, child); | ||
1628 | break; | ||
1629 | } | ||
1630 | } | ||
1631 | else | ||
1632 | { | ||
1633 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); | ||
1634 | } | ||
1635 | } | ||
1636 | |||
1637 | |||
1638 | if (!this.Messaging.EncounteredError) | ||
1639 | { | ||
1640 | // Calculate the ini and h file content. | ||
1641 | string objectName = "OBJECT_1"; | ||
1642 | string objectLanguage = defaultLanguage.ToString("D3", CultureInfo.InvariantCulture); | ||
1643 | |||
1644 | StringBuilder sbIniData = new StringBuilder(); | ||
1645 | sbIniData.AppendFormat("[info]\r\ndrivername={0}\r\nsymbolfile=wixperf.h\r\n\r\n[objects]\r\n{1}_{2}_NAME=\r\n\r\n[languages]\r\n{2}=LANG{2}\r\n\r\n", name, objectName, objectLanguage); | ||
1646 | sbIniData.AppendFormat("[text]\r\n{0}_{1}_NAME={2}\r\n", objectName, objectLanguage, name); | ||
1647 | if (null != help) | ||
1648 | { | ||
1649 | sbIniData.AppendFormat("{0}_{1}_HELP={2}\r\n", objectName, objectLanguage, help); | ||
1650 | } | ||
1651 | |||
1652 | int symbolConstantsCounter = 0; | ||
1653 | StringBuilder sbSymbolicConstants = new StringBuilder(); | ||
1654 | sbSymbolicConstants.AppendFormat("#define {0} {1}\r\n", objectName, symbolConstantsCounter); | ||
1655 | |||
1656 | StringBuilder sbCounterNames = new StringBuilder("[~]"); | ||
1657 | StringBuilder sbCounterTypes = new StringBuilder("[~]"); | ||
1658 | for (int i = 0; i < parsedPerformanceCounters.Count; ++i) | ||
1659 | { | ||
1660 | ParsedPerformanceCounter counter = (ParsedPerformanceCounter)parsedPerformanceCounters[i]; | ||
1661 | string counterName = String.Concat("DEVICE_COUNTER_", i + 1); | ||
1662 | |||
1663 | sbIniData.AppendFormat("{0}_{1}_NAME={2}\r\n", counterName, counter.Language, counter.Name); | ||
1664 | if (null != counter.Help) | ||
1665 | { | ||
1666 | sbIniData.AppendFormat("{0}_{1}_HELP={2}\r\n", counterName, counter.Language, counter.Help); | ||
1667 | } | ||
1668 | |||
1669 | symbolConstantsCounter += 2; | ||
1670 | sbSymbolicConstants.AppendFormat("#define {0} {1}\r\n", counterName, symbolConstantsCounter); | ||
1671 | |||
1672 | sbCounterNames.Append(UtilCompiler.FindPropertyBrackets.Replace(counter.Name, this.EscapeProperties)); | ||
1673 | sbCounterNames.Append("[~]"); | ||
1674 | sbCounterTypes.Append(counter.Type); | ||
1675 | sbCounterTypes.Append("[~]"); | ||
1676 | } | ||
1677 | |||
1678 | sbSymbolicConstants.AppendFormat("#define LAST_{0}_COUNTER_OFFSET {1}\r\n", objectName, symbolConstantsCounter); | ||
1679 | |||
1680 | // Add the calculated INI and H strings to the PerformanceCategory table. | ||
1681 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "PerformanceCategory"); | ||
1682 | row.Set(0, id); | ||
1683 | row.Set(1, componentId); | ||
1684 | row.Set(2, name); | ||
1685 | row.Set(3, sbIniData.ToString()); | ||
1686 | row.Set(4, sbSymbolicConstants.ToString()); | ||
1687 | |||
1688 | // Set up the application's performance key. | ||
1689 | int registryRoot = 2; // HKLM | ||
1690 | string escapedName = UtilCompiler.FindPropertyBrackets.Replace(name, this.EscapeProperties); | ||
1691 | string linkageKey = String.Format(@"SYSTEM\CurrentControlSet\Services\{0}\Linkage", escapedName); | ||
1692 | string performanceKey = String.Format(@"SYSTEM\CurrentControlSet\Services\{0}\Performance", escapedName); | ||
1693 | |||
1694 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, linkageKey, "Export", escapedName, componentId, false); | ||
1695 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "-", null, componentId, false); | ||
1696 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Library", library, componentId, false); | ||
1697 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Open", openEntryPoint, componentId, false); | ||
1698 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Collect", collectEntryPoint, componentId, false); | ||
1699 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Close", closeEntryPoint, componentId, false); | ||
1700 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "IsMultiInstance", YesNoType.Yes == multiInstance ? "#1" : "#0", componentId, false); | ||
1701 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Counter Names", sbCounterNames.ToString(), componentId, false); | ||
1702 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Counter Types", sbCounterTypes.ToString(), componentId, false); | ||
1703 | } | ||
1704 | |||
1705 | // Reference InstallPerfCounterData and UninstallPerfCounterData since nothing will happen without them | ||
1706 | if (this.Context.Platform == Platform.ARM) | ||
1707 | { | ||
1708 | // Ensure ARM version of the CAs are referenced | ||
1709 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "InstallPerfCounterData_ARM"); | ||
1710 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "UninstallPerfCounterData_ARM"); | ||
1711 | } | ||
1712 | else | ||
1713 | { | ||
1714 | // All other supported platforms use x86 | ||
1715 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "InstallPerfCounterData"); | ||
1716 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "UninstallPerfCounterData"); | ||
1717 | } | ||
1718 | } | ||
1719 | |||
1720 | /// <summary> | ||
1721 | /// Gets the performance counter language as a decimal number. | ||
1722 | /// </summary> | ||
1723 | /// <param name="sourceLineNumbers">Source line information about the owner element.</param> | ||
1724 | /// <param name="attribute">The attribute containing the value to get.</param> | ||
1725 | /// <returns>Numeric representation of the language as per WinNT.h.</returns> | ||
1726 | private int GetPerformanceCounterLanguage(SourceLineNumber sourceLineNumbers, XAttribute attribute) | ||
1727 | { | ||
1728 | int language = 0; | ||
1729 | if (String.Empty == attribute.Value) | ||
1730 | { | ||
1731 | this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName)); | ||
1732 | } | ||
1733 | else | ||
1734 | { | ||
1735 | switch (attribute.Value) | ||
1736 | { | ||
1737 | case "afrikaans": | ||
1738 | language = 0x36; | ||
1739 | break; | ||
1740 | case "albanian": | ||
1741 | language = 0x1c; | ||
1742 | break; | ||
1743 | case "arabic": | ||
1744 | language = 0x01; | ||
1745 | break; | ||
1746 | case "armenian": | ||
1747 | language = 0x2b; | ||
1748 | break; | ||
1749 | case "assamese": | ||
1750 | language = 0x4d; | ||
1751 | break; | ||
1752 | case "azeri": | ||
1753 | language = 0x2c; | ||
1754 | break; | ||
1755 | case "basque": | ||
1756 | language = 0x2d; | ||
1757 | break; | ||
1758 | case "belarusian": | ||
1759 | language = 0x23; | ||
1760 | break; | ||
1761 | case "bengali": | ||
1762 | language = 0x45; | ||
1763 | break; | ||
1764 | case "bulgarian": | ||
1765 | language = 0x02; | ||
1766 | break; | ||
1767 | case "catalan": | ||
1768 | language = 0x03; | ||
1769 | break; | ||
1770 | case "chinese": | ||
1771 | language = 0x04; | ||
1772 | break; | ||
1773 | case "croatian": | ||
1774 | language = 0x1a; | ||
1775 | break; | ||
1776 | case "czech": | ||
1777 | language = 0x05; | ||
1778 | break; | ||
1779 | case "danish": | ||
1780 | language = 0x06; | ||
1781 | break; | ||
1782 | case "divehi": | ||
1783 | language = 0x65; | ||
1784 | break; | ||
1785 | case "dutch": | ||
1786 | language = 0x13; | ||
1787 | break; | ||
1788 | case "piglatin": | ||
1789 | case "english": | ||
1790 | language = 0x09; | ||
1791 | break; | ||
1792 | case "estonian": | ||
1793 | language = 0x25; | ||
1794 | break; | ||
1795 | case "faeroese": | ||
1796 | language = 0x38; | ||
1797 | break; | ||
1798 | case "farsi": | ||
1799 | language = 0x29; | ||
1800 | break; | ||
1801 | case "finnish": | ||
1802 | language = 0x0b; | ||
1803 | break; | ||
1804 | case "french": | ||
1805 | language = 0x0c; | ||
1806 | break; | ||
1807 | case "galician": | ||
1808 | language = 0x56; | ||
1809 | break; | ||
1810 | case "georgian": | ||
1811 | language = 0x37; | ||
1812 | break; | ||
1813 | case "german": | ||
1814 | language = 0x07; | ||
1815 | break; | ||
1816 | case "greek": | ||
1817 | language = 0x08; | ||
1818 | break; | ||
1819 | case "gujarati": | ||
1820 | language = 0x47; | ||
1821 | break; | ||
1822 | case "hebrew": | ||
1823 | language = 0x0d; | ||
1824 | break; | ||
1825 | case "hindi": | ||
1826 | language = 0x39; | ||
1827 | break; | ||
1828 | case "hungarian": | ||
1829 | language = 0x0e; | ||
1830 | break; | ||
1831 | case "icelandic": | ||
1832 | language = 0x0f; | ||
1833 | break; | ||
1834 | case "indonesian": | ||
1835 | language = 0x21; | ||
1836 | break; | ||
1837 | case "italian": | ||
1838 | language = 0x10; | ||
1839 | break; | ||
1840 | case "japanese": | ||
1841 | language = 0x11; | ||
1842 | break; | ||
1843 | case "kannada": | ||
1844 | language = 0x4b; | ||
1845 | break; | ||
1846 | case "kashmiri": | ||
1847 | language = 0x60; | ||
1848 | break; | ||
1849 | case "kazak": | ||
1850 | language = 0x3f; | ||
1851 | break; | ||
1852 | case "konkani": | ||
1853 | language = 0x57; | ||
1854 | break; | ||
1855 | case "korean": | ||
1856 | language = 0x12; | ||
1857 | break; | ||
1858 | case "kyrgyz": | ||
1859 | language = 0x40; | ||
1860 | break; | ||
1861 | case "latvian": | ||
1862 | language = 0x26; | ||
1863 | break; | ||
1864 | case "lithuanian": | ||
1865 | language = 0x27; | ||
1866 | break; | ||
1867 | case "macedonian": | ||
1868 | language = 0x2f; | ||
1869 | break; | ||
1870 | case "malay": | ||
1871 | language = 0x3e; | ||
1872 | break; | ||
1873 | case "malayalam": | ||
1874 | language = 0x4c; | ||
1875 | break; | ||
1876 | case "manipuri": | ||
1877 | language = 0x58; | ||
1878 | break; | ||
1879 | case "marathi": | ||
1880 | language = 0x4e; | ||
1881 | break; | ||
1882 | case "mongolian": | ||
1883 | language = 0x50; | ||
1884 | break; | ||
1885 | case "nepali": | ||
1886 | language = 0x61; | ||
1887 | break; | ||
1888 | case "norwegian": | ||
1889 | language = 0x14; | ||
1890 | break; | ||
1891 | case "oriya": | ||
1892 | language = 0x48; | ||
1893 | break; | ||
1894 | case "polish": | ||
1895 | language = 0x15; | ||
1896 | break; | ||
1897 | case "portuguese": | ||
1898 | language = 0x16; | ||
1899 | break; | ||
1900 | case "punjabi": | ||
1901 | language = 0x46; | ||
1902 | break; | ||
1903 | case "romanian": | ||
1904 | language = 0x18; | ||
1905 | break; | ||
1906 | case "russian": | ||
1907 | language = 0x19; | ||
1908 | break; | ||
1909 | case "sanskrit": | ||
1910 | language = 0x4f; | ||
1911 | break; | ||
1912 | case "serbian": | ||
1913 | language = 0x1a; | ||
1914 | break; | ||
1915 | case "sindhi": | ||
1916 | language = 0x59; | ||
1917 | break; | ||
1918 | case "slovak": | ||
1919 | language = 0x1b; | ||
1920 | break; | ||
1921 | case "slovenian": | ||
1922 | language = 0x24; | ||
1923 | break; | ||
1924 | case "spanish": | ||
1925 | language = 0x0a; | ||
1926 | break; | ||
1927 | case "swahili": | ||
1928 | language = 0x41; | ||
1929 | break; | ||
1930 | case "swedish": | ||
1931 | language = 0x1d; | ||
1932 | break; | ||
1933 | case "syriac": | ||
1934 | language = 0x5a; | ||
1935 | break; | ||
1936 | case "tamil": | ||
1937 | language = 0x49; | ||
1938 | break; | ||
1939 | case "tatar": | ||
1940 | language = 0x44; | ||
1941 | break; | ||
1942 | case "telugu": | ||
1943 | language = 0x4a; | ||
1944 | break; | ||
1945 | case "thai": | ||
1946 | language = 0x1e; | ||
1947 | break; | ||
1948 | case "turkish": | ||
1949 | language = 0x1f; | ||
1950 | break; | ||
1951 | case "ukrainian": | ||
1952 | language = 0x22; | ||
1953 | break; | ||
1954 | case "urdu": | ||
1955 | language = 0x20; | ||
1956 | break; | ||
1957 | case "uzbek": | ||
1958 | language = 0x43; | ||
1959 | break; | ||
1960 | case "vietnamese": | ||
1961 | language = 0x2a; | ||
1962 | break; | ||
1963 | default: | ||
1964 | this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName)); | ||
1965 | break; | ||
1966 | } | ||
1967 | } | ||
1968 | |||
1969 | return language; | ||
1970 | } | ||
1971 | |||
1972 | /// <summary> | ||
1973 | /// Parses a performance counter element. | ||
1974 | /// </summary> | ||
1975 | /// <param name="element">Element to parse.</param> | ||
1976 | /// <param name="defaultLanguage">Default language for the performance counter.</param> | ||
1977 | private ParsedPerformanceCounter ParsePerformanceCounterElement(Intermediate intermediate, IntermediateSection section, XElement element, int defaultLanguage) | ||
1978 | { | ||
1979 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
1980 | ParsedPerformanceCounter parsedPerformanceCounter = null; | ||
1981 | string name = null; | ||
1982 | string help = null; | ||
1983 | System.Diagnostics.PerformanceCounterType type = System.Diagnostics.PerformanceCounterType.NumberOfItems32; | ||
1984 | int language = defaultLanguage; | ||
1985 | |||
1986 | foreach (XAttribute attrib in element.Attributes()) | ||
1987 | { | ||
1988 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
1989 | { | ||
1990 | switch (attrib.Name.LocalName) | ||
1991 | { | ||
1992 | case "Help": | ||
1993 | help = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1994 | break; | ||
1995 | case "Name": | ||
1996 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
1997 | break; | ||
1998 | case "Type": | ||
1999 | type = this.GetPerformanceCounterType(sourceLineNumbers, attrib); | ||
2000 | break; | ||
2001 | case "Language": | ||
2002 | language = this.GetPerformanceCounterLanguage(sourceLineNumbers, attrib); | ||
2003 | break; | ||
2004 | default: | ||
2005 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2006 | break; | ||
2007 | } | ||
2008 | } | ||
2009 | else | ||
2010 | { | ||
2011 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2012 | } | ||
2013 | } | ||
2014 | |||
2015 | if (null == name) | ||
2016 | { | ||
2017 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | ||
2018 | } | ||
2019 | |||
2020 | if (null == help) | ||
2021 | { | ||
2022 | this.Messaging.Write(UtilWarnings.RequiredAttributeForWindowsXP(sourceLineNumbers, element.Name.LocalName, "Help")); | ||
2023 | } | ||
2024 | |||
2025 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2026 | |||
2027 | if (!this.Messaging.EncounteredError) | ||
2028 | { | ||
2029 | parsedPerformanceCounter = new ParsedPerformanceCounter(name, help, type, language); | ||
2030 | } | ||
2031 | |||
2032 | return parsedPerformanceCounter; | ||
2033 | } | ||
2034 | |||
2035 | /// <summary> | ||
2036 | /// Gets the performance counter type. | ||
2037 | /// </summary> | ||
2038 | /// <param name="sourceLineNumbers">Source line information about the owner element.</param> | ||
2039 | /// <param name="attribute">The attribute containing the value to get.</param> | ||
2040 | /// <returns>Numeric representation of the language as per WinNT.h.</returns> | ||
2041 | private System.Diagnostics.PerformanceCounterType GetPerformanceCounterType(SourceLineNumber sourceLineNumbers, XAttribute attribute) | ||
2042 | { | ||
2043 | System.Diagnostics.PerformanceCounterType type = System.Diagnostics.PerformanceCounterType.NumberOfItems32; | ||
2044 | if (String.Empty == attribute.Value) | ||
2045 | { | ||
2046 | this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName)); | ||
2047 | } | ||
2048 | else | ||
2049 | { | ||
2050 | switch (attribute.Value) | ||
2051 | { | ||
2052 | case "averageBase": | ||
2053 | type = System.Diagnostics.PerformanceCounterType.AverageBase; | ||
2054 | break; | ||
2055 | case "averageCount64": | ||
2056 | type = System.Diagnostics.PerformanceCounterType.AverageCount64; | ||
2057 | break; | ||
2058 | case "averageTimer32": | ||
2059 | type = System.Diagnostics.PerformanceCounterType.AverageTimer32; | ||
2060 | break; | ||
2061 | case "counterDelta32": | ||
2062 | type = System.Diagnostics.PerformanceCounterType.CounterDelta32; | ||
2063 | break; | ||
2064 | case "counterTimerInverse": | ||
2065 | type = System.Diagnostics.PerformanceCounterType.CounterTimerInverse; | ||
2066 | break; | ||
2067 | case "sampleFraction": | ||
2068 | type = System.Diagnostics.PerformanceCounterType.SampleFraction; | ||
2069 | break; | ||
2070 | case "timer100Ns": | ||
2071 | type = System.Diagnostics.PerformanceCounterType.Timer100Ns; | ||
2072 | break; | ||
2073 | case "counterTimer": | ||
2074 | type = System.Diagnostics.PerformanceCounterType.CounterTimer; | ||
2075 | break; | ||
2076 | case "rawFraction": | ||
2077 | type = System.Diagnostics.PerformanceCounterType.RawFraction; | ||
2078 | break; | ||
2079 | case "timer100NsInverse": | ||
2080 | type = System.Diagnostics.PerformanceCounterType.Timer100NsInverse; | ||
2081 | break; | ||
2082 | case "counterMultiTimer": | ||
2083 | type = System.Diagnostics.PerformanceCounterType.CounterMultiTimer; | ||
2084 | break; | ||
2085 | case "counterMultiTimer100Ns": | ||
2086 | type = System.Diagnostics.PerformanceCounterType.CounterMultiTimer100Ns; | ||
2087 | break; | ||
2088 | case "counterMultiTimerInverse": | ||
2089 | type = System.Diagnostics.PerformanceCounterType.CounterMultiTimerInverse; | ||
2090 | break; | ||
2091 | case "counterMultiTimer100NsInverse": | ||
2092 | type = System.Diagnostics.PerformanceCounterType.CounterMultiTimer100NsInverse; | ||
2093 | break; | ||
2094 | case "elapsedTime": | ||
2095 | type = System.Diagnostics.PerformanceCounterType.ElapsedTime; | ||
2096 | break; | ||
2097 | case "sampleBase": | ||
2098 | type = System.Diagnostics.PerformanceCounterType.SampleBase; | ||
2099 | break; | ||
2100 | case "rawBase": | ||
2101 | type = System.Diagnostics.PerformanceCounterType.RawBase; | ||
2102 | break; | ||
2103 | case "counterMultiBase": | ||
2104 | type = System.Diagnostics.PerformanceCounterType.CounterMultiBase; | ||
2105 | break; | ||
2106 | case "rateOfCountsPerSecond64": | ||
2107 | type = System.Diagnostics.PerformanceCounterType.RateOfCountsPerSecond64; | ||
2108 | break; | ||
2109 | case "rateOfCountsPerSecond32": | ||
2110 | type = System.Diagnostics.PerformanceCounterType.RateOfCountsPerSecond32; | ||
2111 | break; | ||
2112 | case "countPerTimeInterval64": | ||
2113 | type = System.Diagnostics.PerformanceCounterType.CountPerTimeInterval64; | ||
2114 | break; | ||
2115 | case "countPerTimeInterval32": | ||
2116 | type = System.Diagnostics.PerformanceCounterType.CountPerTimeInterval32; | ||
2117 | break; | ||
2118 | case "sampleCounter": | ||
2119 | type = System.Diagnostics.PerformanceCounterType.SampleCounter; | ||
2120 | break; | ||
2121 | case "counterDelta64": | ||
2122 | type = System.Diagnostics.PerformanceCounterType.CounterDelta64; | ||
2123 | break; | ||
2124 | case "numberOfItems64": | ||
2125 | type = System.Diagnostics.PerformanceCounterType.NumberOfItems64; | ||
2126 | break; | ||
2127 | case "numberOfItems32": | ||
2128 | type = System.Diagnostics.PerformanceCounterType.NumberOfItems32; | ||
2129 | break; | ||
2130 | case "numberOfItemsHEX64": | ||
2131 | type = System.Diagnostics.PerformanceCounterType.NumberOfItemsHEX64; | ||
2132 | break; | ||
2133 | case "numberOfItemsHEX32": | ||
2134 | type = System.Diagnostics.PerformanceCounterType.NumberOfItemsHEX32; | ||
2135 | break; | ||
2136 | default: | ||
2137 | this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName)); | ||
2138 | break; | ||
2139 | } | ||
2140 | } | ||
2141 | |||
2142 | return type; | ||
2143 | } | ||
2144 | |||
2145 | /// <summary> | ||
2146 | /// Parses a perf counter element. | ||
2147 | /// </summary> | ||
2148 | /// <param name="element">Element to parse.</param> | ||
2149 | /// <param name="componentId">Identifier of parent component.</param> | ||
2150 | /// <param name="fileId">Identifier of referenced file.</param> | ||
2151 | private void ParsePerfCounterElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) | ||
2152 | { | ||
2153 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2154 | string name = null; | ||
2155 | |||
2156 | this.Messaging.Write(UtilWarnings.DeprecatedPerfCounterElement(sourceLineNumbers)); | ||
2157 | |||
2158 | foreach (XAttribute attrib in element.Attributes()) | ||
2159 | { | ||
2160 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2161 | { | ||
2162 | switch (attrib.Name.LocalName) | ||
2163 | { | ||
2164 | case "Name": | ||
2165 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2166 | break; | ||
2167 | default: | ||
2168 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2169 | break; | ||
2170 | } | ||
2171 | } | ||
2172 | else | ||
2173 | { | ||
2174 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2175 | } | ||
2176 | } | ||
2177 | |||
2178 | if (null == name) | ||
2179 | { | ||
2180 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | ||
2181 | } | ||
2182 | |||
2183 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2184 | |||
2185 | if (!this.Messaging.EncounteredError) | ||
2186 | { | ||
2187 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Perfmon"); | ||
2188 | row.Set(0, componentId); | ||
2189 | row.Set(1, $"[#{fileId}]"); | ||
2190 | row.Set(2, name); | ||
2191 | } | ||
2192 | |||
2193 | // Reference ConfigurePerfmonInstall and ConfigurePerfmonUninstall since nothing will happen without them | ||
2194 | if (this.Context.Platform == Platform.ARM) | ||
2195 | { | ||
2196 | // Ensure ARM version of the CAs are referenced | ||
2197 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonInstall_ARM"); | ||
2198 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonUninstall_ARM"); | ||
2199 | } | ||
2200 | else | ||
2201 | { | ||
2202 | // All other supported platforms use x86 | ||
2203 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonInstall"); | ||
2204 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonUninstall"); | ||
2205 | } | ||
2206 | } | ||
2207 | |||
2208 | |||
2209 | /// <summary> | ||
2210 | /// Parses a perf manifest element. | ||
2211 | /// </summary> | ||
2212 | /// <param name="element">Element to parse.</param> | ||
2213 | /// <param name="componentId">Identifier of parent component.</param> | ||
2214 | /// <param name="fileId">Identifier of referenced file.</param> | ||
2215 | private void ParsePerfCounterManifestElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) | ||
2216 | { | ||
2217 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2218 | string resourceFileDirectory = null; | ||
2219 | |||
2220 | foreach (XAttribute attrib in element.Attributes()) | ||
2221 | { | ||
2222 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2223 | { | ||
2224 | switch (attrib.Name.LocalName) | ||
2225 | { | ||
2226 | case "ResourceFileDirectory": | ||
2227 | resourceFileDirectory = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2228 | break; | ||
2229 | default: | ||
2230 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2231 | break; | ||
2232 | } | ||
2233 | } | ||
2234 | else | ||
2235 | { | ||
2236 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2237 | } | ||
2238 | } | ||
2239 | |||
2240 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2241 | |||
2242 | if (!this.Messaging.EncounteredError) | ||
2243 | { | ||
2244 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "PerfmonManifest"); | ||
2245 | row.Set(0, componentId); | ||
2246 | row.Set(1, $"[#{fileId}]"); | ||
2247 | row.Set(2, resourceFileDirectory); | ||
2248 | } | ||
2249 | |||
2250 | if (this.Context.Platform == Platform.ARM) | ||
2251 | { | ||
2252 | // Ensure ARM version of the CAs are referenced | ||
2253 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonManifestRegister_ARM"); | ||
2254 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonManifestUnregister_ARM"); | ||
2255 | } | ||
2256 | else | ||
2257 | { | ||
2258 | // All other supported platforms use x86 | ||
2259 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonManifestRegister"); | ||
2260 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigurePerfmonManifestUnregister"); | ||
2261 | } | ||
2262 | } | ||
2263 | |||
2264 | /// <summary> | ||
2265 | /// Parses a format files element. | ||
2266 | /// </summary> | ||
2267 | /// <param name="element">Element to parse.</param> | ||
2268 | /// <param name="fileId">Identifier of referenced file.</param> | ||
2269 | /// <param name="win64">Flag to determine whether the component is 64-bit.</param> | ||
2270 | private void ParseFormatFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId, bool win64) | ||
2271 | { | ||
2272 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2273 | string binaryId = null; | ||
2274 | |||
2275 | foreach (XAttribute attrib in element.Attributes()) | ||
2276 | { | ||
2277 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2278 | { | ||
2279 | switch (attrib.Name.LocalName) | ||
2280 | { | ||
2281 | case "BinaryKey": | ||
2282 | binaryId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2283 | break; | ||
2284 | default: | ||
2285 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2286 | break; | ||
2287 | } | ||
2288 | } | ||
2289 | else | ||
2290 | { | ||
2291 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2292 | } | ||
2293 | } | ||
2294 | |||
2295 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2296 | |||
2297 | if (null == binaryId) | ||
2298 | { | ||
2299 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "BinaryKey")); | ||
2300 | } | ||
2301 | |||
2302 | if (!this.Messaging.EncounteredError) | ||
2303 | { | ||
2304 | switch (this.Context.Platform) | ||
2305 | { | ||
2306 | case Platform.X86: | ||
2307 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedFormatFiles"); | ||
2308 | break; | ||
2309 | case Platform.X64: | ||
2310 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedFormatFiles_x64"); | ||
2311 | break; | ||
2312 | case Platform.IA64: | ||
2313 | case Platform.ARM: | ||
2314 | this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), element.Name.LocalName)); | ||
2315 | break; | ||
2316 | } | ||
2317 | |||
2318 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixFormatFiles"); | ||
2319 | row.Set(0, binaryId); | ||
2320 | row.Set(1, fileId); | ||
2321 | |||
2322 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Binary", binaryId); | ||
2323 | } | ||
2324 | } | ||
2325 | |||
2326 | /// <summary> | ||
2327 | /// Parses a event manifest element. | ||
2328 | /// </summary> | ||
2329 | /// <param name="element">Element to parse.</param> | ||
2330 | /// <param name="componentId">Identifier of parent component.</param> | ||
2331 | /// <param name="fileId">Identifier of referenced file.</param> | ||
2332 | private void ParseEventManifestElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) | ||
2333 | { | ||
2334 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2335 | string messageFile = null; | ||
2336 | string resourceFile = null; | ||
2337 | string parameterFile = null; | ||
2338 | |||
2339 | foreach (XAttribute attrib in element.Attributes()) | ||
2340 | { | ||
2341 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2342 | { | ||
2343 | switch (attrib.Name.LocalName) | ||
2344 | { | ||
2345 | case "MessageFile": | ||
2346 | messageFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2347 | break; | ||
2348 | case "ResourceFile": | ||
2349 | resourceFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2350 | break; | ||
2351 | case "ParameterFile": | ||
2352 | parameterFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2353 | break; | ||
2354 | default: | ||
2355 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2356 | break; | ||
2357 | } | ||
2358 | } | ||
2359 | else | ||
2360 | { | ||
2361 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2362 | } | ||
2363 | } | ||
2364 | |||
2365 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2366 | |||
2367 | if (!this.Messaging.EncounteredError) | ||
2368 | { | ||
2369 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "EventManifest"); | ||
2370 | row.Set(0, componentId); | ||
2371 | row.Set(1, $"[#{fileId}]"); | ||
2372 | |||
2373 | if (null != messageFile) | ||
2374 | { | ||
2375 | var messageRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "XmlFile"); | ||
2376 | messageRow.Set(0, String.Concat("Config_", fileId, "MessageFile")); | ||
2377 | messageRow.Set(1, $"[#{fileId}]"); | ||
2378 | messageRow.Set(2, "/*/*/*/*[\\[]@messageFileName[\\]]"); | ||
2379 | messageRow.Set(3, "messageFileName"); | ||
2380 | messageRow.Set(4, messageFile); | ||
2381 | messageRow.Set(5, 4 | 0x00001000); //bulk write | preserve modified date | ||
2382 | messageRow.Set(6, componentId); | ||
2383 | } | ||
2384 | if (null != parameterFile) | ||
2385 | { | ||
2386 | var resourceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "XmlFile"); | ||
2387 | resourceRow.Set(0, String.Concat("Config_", fileId, "ParameterFile")); | ||
2388 | resourceRow.Set(1, $"[#{fileId}]"); | ||
2389 | resourceRow.Set(2, "/*/*/*/*[\\[]@parameterFileName[\\]]"); | ||
2390 | resourceRow.Set(3, "parameterFileName"); | ||
2391 | resourceRow.Set(4, parameterFile); | ||
2392 | resourceRow.Set(5, 4 | 0x00001000); //bulk write | preserve modified date | ||
2393 | resourceRow.Set(6, componentId); | ||
2394 | } | ||
2395 | if (null != resourceFile) | ||
2396 | { | ||
2397 | var resourceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "XmlFile"); | ||
2398 | resourceRow.Set(0, String.Concat("Config_", fileId, "ResourceFile")); | ||
2399 | resourceRow.Set(1, $"[#{fileId}]"); | ||
2400 | resourceRow.Set(2, "/*/*/*/*[\\[]@resourceFileName[\\]]"); | ||
2401 | resourceRow.Set(3, "resourceFileName"); | ||
2402 | resourceRow.Set(4, resourceFile); | ||
2403 | resourceRow.Set(5, 4 | 0x00001000); //bulk write | preserve modified date | ||
2404 | resourceRow.Set(6, componentId); | ||
2405 | } | ||
2406 | |||
2407 | } | ||
2408 | |||
2409 | if (this.Context.Platform == Platform.ARM) | ||
2410 | { | ||
2411 | // Ensure ARM version of the CA is referenced | ||
2412 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureEventManifestRegister_ARM"); | ||
2413 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureEventManifestUnregister_ARM"); | ||
2414 | } | ||
2415 | else | ||
2416 | { | ||
2417 | // All other supported platforms use x86 | ||
2418 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureEventManifestRegister"); | ||
2419 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureEventManifestUnregister"); | ||
2420 | } | ||
2421 | |||
2422 | if (null != messageFile || null != parameterFile || null != resourceFile) | ||
2423 | { | ||
2424 | if (this.Context.Platform == Platform.ARM) | ||
2425 | { | ||
2426 | // Ensure ARM version of the CA is referenced | ||
2427 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedXmlFile_ARM"); | ||
2428 | } | ||
2429 | else | ||
2430 | { | ||
2431 | // All other supported platforms use x86 | ||
2432 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedXmlFile"); | ||
2433 | } | ||
2434 | } | ||
2435 | } | ||
2436 | |||
2437 | /// <summary> | ||
2438 | /// Parses a PermissionEx element. | ||
2439 | /// </summary> | ||
2440 | /// <param name="element">Element to parse.</param> | ||
2441 | /// <param name="objectId">Identifier of object to be secured.</param> | ||
2442 | /// <param name="componentId">Identifier of component, used to determine install state.</param> | ||
2443 | /// <param name="win64">Flag to determine whether the component is 64-bit.</param> | ||
2444 | /// <param name="tableName">Name of table that contains objectId.</param> | ||
2445 | private void ParsePermissionExElement(Intermediate intermediate, IntermediateSection section, XElement element, string objectId, string componentId, bool win64, string tableName) | ||
2446 | { | ||
2447 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2448 | BitArray bits = new BitArray(32); | ||
2449 | string domain = null; | ||
2450 | int permission = 0; | ||
2451 | string[] specialPermissions = null; | ||
2452 | string user = null; | ||
2453 | |||
2454 | PermissionType permissionType = PermissionType.SecureObjects; | ||
2455 | |||
2456 | switch (tableName) | ||
2457 | { | ||
2458 | case "CreateFolder": | ||
2459 | specialPermissions = UtilConstants.FolderPermissions; | ||
2460 | break; | ||
2461 | case "File": | ||
2462 | specialPermissions = UtilConstants.FilePermissions; | ||
2463 | break; | ||
2464 | case "Registry": | ||
2465 | specialPermissions = UtilConstants.RegistryPermissions; | ||
2466 | if (String.IsNullOrEmpty(objectId)) | ||
2467 | { | ||
2468 | this.Messaging.Write(UtilErrors.InvalidRegistryObject(sourceLineNumbers, element.Parent.Name.LocalName)); | ||
2469 | } | ||
2470 | break; | ||
2471 | case "ServiceInstall": | ||
2472 | specialPermissions = UtilConstants.ServicePermissions; | ||
2473 | permissionType = PermissionType.SecureObjects; | ||
2474 | break; | ||
2475 | default: | ||
2476 | this.ParseHelper.UnexpectedElement(element.Parent, element); | ||
2477 | break; | ||
2478 | } | ||
2479 | |||
2480 | foreach (XAttribute attrib in element.Attributes()) | ||
2481 | { | ||
2482 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2483 | { | ||
2484 | switch (attrib.Name.LocalName) | ||
2485 | { | ||
2486 | case "Domain": | ||
2487 | if (PermissionType.FileSharePermissions == permissionType) | ||
2488 | { | ||
2489 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, element.Parent.Name.LocalName)); | ||
2490 | } | ||
2491 | domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2492 | break; | ||
2493 | case "User": | ||
2494 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2495 | break; | ||
2496 | default: | ||
2497 | YesNoType attribValue = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
2498 | if (!this.TrySetBitFromName(UtilConstants.StandardPermissions, attrib.Name.LocalName, attribValue, bits, 16)) | ||
2499 | { | ||
2500 | if (!this.TrySetBitFromName(UtilConstants.GenericPermissions, attrib.Name.LocalName, attribValue, bits, 28)) | ||
2501 | { | ||
2502 | if (!this.TrySetBitFromName(specialPermissions, attrib.Name.LocalName, attribValue, bits, 0)) | ||
2503 | { | ||
2504 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2505 | break; | ||
2506 | } | ||
2507 | } | ||
2508 | } | ||
2509 | break; | ||
2510 | } | ||
2511 | } | ||
2512 | else | ||
2513 | { | ||
2514 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2515 | } | ||
2516 | } | ||
2517 | |||
2518 | permission = this.CreateIntegerFromBitArray(bits); | ||
2519 | |||
2520 | if (null == user) | ||
2521 | { | ||
2522 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User")); | ||
2523 | } | ||
2524 | |||
2525 | if (int.MinValue == permission) // just GENERIC_READ, which is MSI_NULL | ||
2526 | { | ||
2527 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); | ||
2528 | } | ||
2529 | |||
2530 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2531 | |||
2532 | if (!this.Messaging.EncounteredError) | ||
2533 | { | ||
2534 | if (win64) | ||
2535 | { | ||
2536 | if (this.Context.Platform == Platform.IA64) | ||
2537 | { | ||
2538 | this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", element.Name.LocalName)); | ||
2539 | } | ||
2540 | else | ||
2541 | { | ||
2542 | // Ensure SchedSecureObjects (x64) is referenced | ||
2543 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedSecureObjects_x64"); | ||
2544 | } | ||
2545 | } | ||
2546 | else if (this.Context.Platform == Platform.ARM) | ||
2547 | { | ||
2548 | // Ensure SchedSecureObjects (arm) is referenced | ||
2549 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedSecureObjects_ARM"); | ||
2550 | } | ||
2551 | else | ||
2552 | { | ||
2553 | // Ensure SchedSecureObjects (x86) is referenced, to handle this x86 component member | ||
2554 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedSecureObjects"); | ||
2555 | } | ||
2556 | |||
2557 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "SecureObjects"); | ||
2558 | row.Set(0, objectId); | ||
2559 | row.Set(1, tableName); | ||
2560 | row.Set(2, domain); | ||
2561 | row.Set(3, user); | ||
2562 | row.Set(4, permission); | ||
2563 | row.Set(5, componentId); | ||
2564 | } | ||
2565 | } | ||
2566 | |||
2567 | /// <summary> | ||
2568 | /// Parses a ProductSearch element. | ||
2569 | /// </summary> | ||
2570 | /// <param name="element">Element to parse.</param> | ||
2571 | private void ParseProductSearchElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
2572 | { | ||
2573 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2574 | Identifier id = null; | ||
2575 | string variable = null; | ||
2576 | string condition = null; | ||
2577 | string after = null; | ||
2578 | string productCode = null; | ||
2579 | string upgradeCode = null; | ||
2580 | |||
2581 | Serialize.ProductSearch.ResultType result = Serialize.ProductSearch.ResultType.NotSet; | ||
2582 | |||
2583 | foreach (XAttribute attrib in element.Attributes()) | ||
2584 | { | ||
2585 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2586 | { | ||
2587 | switch (attrib.Name.LocalName) | ||
2588 | { | ||
2589 | case "Id": | ||
2590 | case "Variable": | ||
2591 | case "Condition": | ||
2592 | case "After": | ||
2593 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | ||
2594 | break; | ||
2595 | case "ProductCode": | ||
2596 | productCode = this.ParseHelper.GetAttributeGuidValue(sourceLineNumbers, attrib, false); | ||
2597 | break; | ||
2598 | case "UpgradeCode": | ||
2599 | upgradeCode = this.ParseHelper.GetAttributeGuidValue(sourceLineNumbers, attrib, false); | ||
2600 | break; | ||
2601 | case "Result": | ||
2602 | string resultValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2603 | if (!Serialize.ProductSearch.TryParseResultType(resultValue, out result)) | ||
2604 | { | ||
2605 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Parent.Name.LocalName, attrib.Name.LocalName, | ||
2606 | resultValue, | ||
2607 | Serialize.ProductSearch.ResultType.version.ToString(), | ||
2608 | Serialize.ProductSearch.ResultType.language.ToString(), | ||
2609 | Serialize.ProductSearch.ResultType.state.ToString(), | ||
2610 | Serialize.ProductSearch.ResultType.assignment.ToString())); | ||
2611 | } | ||
2612 | break; | ||
2613 | default: | ||
2614 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2615 | break; | ||
2616 | } | ||
2617 | } | ||
2618 | else | ||
2619 | { | ||
2620 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2621 | } | ||
2622 | } | ||
2623 | |||
2624 | if (null == variable) | ||
2625 | { | ||
2626 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Variable")); | ||
2627 | } | ||
2628 | |||
2629 | if (null == upgradeCode && null == productCode) | ||
2630 | { | ||
2631 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "ProductCode", "UpgradeCode", true)); | ||
2632 | } | ||
2633 | |||
2634 | if (null != upgradeCode && null != productCode) | ||
2635 | { | ||
2636 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "UpgradeCode", "ProductCode")); | ||
2637 | } | ||
2638 | |||
2639 | if (null == id) | ||
2640 | { | ||
2641 | id = this.ParseHelper.CreateIdentifier("wps", variable, condition, after, (productCode == null ? upgradeCode : productCode), result.ToString()); | ||
2642 | } | ||
2643 | |||
2644 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2645 | |||
2646 | if (!this.Messaging.EncounteredError) | ||
2647 | { | ||
2648 | this.CreateWixSearchRow(section, sourceLineNumbers, id, variable, condition); | ||
2649 | if (after != null) | ||
2650 | { | ||
2651 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixSearch", after); | ||
2652 | // TODO: We're currently defaulting to "always run after", which we will need to change... | ||
2653 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); | ||
2654 | } | ||
2655 | |||
2656 | WixProductSearchAttributes attributes = WixProductSearchAttributes.Version; | ||
2657 | switch (result) | ||
2658 | { | ||
2659 | case Serialize.ProductSearch.ResultType.version: | ||
2660 | attributes = WixProductSearchAttributes.Version; | ||
2661 | break; | ||
2662 | case Serialize.ProductSearch.ResultType.language: | ||
2663 | attributes = WixProductSearchAttributes.Language; | ||
2664 | break; | ||
2665 | case Serialize.ProductSearch.ResultType.state: | ||
2666 | attributes = WixProductSearchAttributes.State; | ||
2667 | break; | ||
2668 | case Serialize.ProductSearch.ResultType.assignment: | ||
2669 | attributes = WixProductSearchAttributes.Assignment; | ||
2670 | break; | ||
2671 | } | ||
2672 | |||
2673 | // set an additional flag if this is an upgrade code | ||
2674 | if (null != upgradeCode) | ||
2675 | { | ||
2676 | attributes |= WixProductSearchAttributes.UpgradeCode; | ||
2677 | } | ||
2678 | |||
2679 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixProductSearch"); | ||
2680 | row.Set(0, id); | ||
2681 | row.Set(1, productCode ?? upgradeCode); | ||
2682 | row.Set(2, (int)attributes); | ||
2683 | } | ||
2684 | } | ||
2685 | |||
2686 | /// <summary> | ||
2687 | /// Parses a RegistrySearch element. | ||
2688 | /// </summary> | ||
2689 | /// <param name="element">Element to parse.</param> | ||
2690 | private void ParseRegistrySearchElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
2691 | { | ||
2692 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2693 | Identifier id = null; | ||
2694 | string variable = null; | ||
2695 | string condition = null; | ||
2696 | string after = null; | ||
2697 | int root = CompilerConstants.IntegerNotSet; | ||
2698 | string key = null; | ||
2699 | string value = null; | ||
2700 | YesNoType expand = YesNoType.NotSet; | ||
2701 | YesNoType win64 = YesNoType.NotSet; | ||
2702 | Serialize.RegistrySearch.ResultType result = Serialize.RegistrySearch.ResultType.NotSet; | ||
2703 | Serialize.RegistrySearch.FormatType format = Serialize.RegistrySearch.FormatType.raw; | ||
2704 | |||
2705 | foreach (XAttribute attrib in element.Attributes()) | ||
2706 | { | ||
2707 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2708 | { | ||
2709 | switch (attrib.Name.LocalName) | ||
2710 | { | ||
2711 | case "Id": | ||
2712 | case "Variable": | ||
2713 | case "Condition": | ||
2714 | case "After": | ||
2715 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | ||
2716 | break; | ||
2717 | case "Root": | ||
2718 | root = this.ParseHelper.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, false); | ||
2719 | break; | ||
2720 | case "Key": | ||
2721 | key = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2722 | break; | ||
2723 | case "Value": | ||
2724 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2725 | break; | ||
2726 | case "ExpandEnvironmentVariables": | ||
2727 | expand = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
2728 | break; | ||
2729 | case "Format": | ||
2730 | string formatValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2731 | if (!String.IsNullOrEmpty(formatValue)) | ||
2732 | { | ||
2733 | if (!Serialize.RegistrySearch.TryParseFormatType(formatValue, out format)) | ||
2734 | { | ||
2735 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Parent.Name.LocalName, attrib.Name.LocalName, | ||
2736 | formatValue, Serialize.RegistrySearch.FormatType.raw.ToString(), Serialize.RegistrySearch.FormatType.compatible.ToString())); | ||
2737 | } | ||
2738 | } | ||
2739 | break; | ||
2740 | case "Result": | ||
2741 | string resultValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2742 | if (!Serialize.RegistrySearch.TryParseResultType(resultValue, out result)) | ||
2743 | { | ||
2744 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Parent.Name.LocalName, attrib.Name.LocalName, | ||
2745 | resultValue, Serialize.RegistrySearch.ResultType.exists.ToString(), Serialize.RegistrySearch.ResultType.value.ToString())); | ||
2746 | } | ||
2747 | break; | ||
2748 | case "Win64": | ||
2749 | win64 = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
2750 | break; | ||
2751 | default: | ||
2752 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2753 | break; | ||
2754 | } | ||
2755 | } | ||
2756 | else | ||
2757 | { | ||
2758 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2759 | } | ||
2760 | } | ||
2761 | |||
2762 | if (null == variable) | ||
2763 | { | ||
2764 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Variable")); | ||
2765 | } | ||
2766 | |||
2767 | if (CompilerConstants.IntegerNotSet == root) | ||
2768 | { | ||
2769 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Root")); | ||
2770 | } | ||
2771 | |||
2772 | if (null == key) | ||
2773 | { | ||
2774 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Key")); | ||
2775 | } | ||
2776 | |||
2777 | if (Serialize.RegistrySearch.ResultType.NotSet == result) | ||
2778 | { | ||
2779 | result = Serialize.RegistrySearch.ResultType.value; | ||
2780 | } | ||
2781 | |||
2782 | if (null == id) | ||
2783 | { | ||
2784 | id = this.ParseHelper.CreateIdentifier("wrs", variable, condition, after, root.ToString(), key, value, result.ToString()); | ||
2785 | } | ||
2786 | |||
2787 | WixRegistrySearchAttributes attributes = WixRegistrySearchAttributes.Raw; | ||
2788 | switch (format) | ||
2789 | { | ||
2790 | case Serialize.RegistrySearch.FormatType.raw: | ||
2791 | attributes = WixRegistrySearchAttributes.Raw; | ||
2792 | break; | ||
2793 | case Serialize.RegistrySearch.FormatType.compatible: | ||
2794 | attributes = WixRegistrySearchAttributes.Compatible; | ||
2795 | break; | ||
2796 | } | ||
2797 | |||
2798 | switch (result) | ||
2799 | { | ||
2800 | case Serialize.RegistrySearch.ResultType.exists: | ||
2801 | attributes |= WixRegistrySearchAttributes.WantExists; | ||
2802 | break; | ||
2803 | case Serialize.RegistrySearch.ResultType.value: | ||
2804 | attributes |= WixRegistrySearchAttributes.WantValue; | ||
2805 | break; | ||
2806 | } | ||
2807 | |||
2808 | if (expand == YesNoType.Yes) | ||
2809 | { | ||
2810 | if (0 != (attributes & WixRegistrySearchAttributes.WantExists)) | ||
2811 | { | ||
2812 | this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, | ||
2813 | "ExpandEnvironmentVariables", expand.ToString(), "Result", result.ToString())); | ||
2814 | } | ||
2815 | |||
2816 | attributes |= WixRegistrySearchAttributes.ExpandEnvironmentVariables; | ||
2817 | } | ||
2818 | |||
2819 | if (win64 == YesNoType.Yes) | ||
2820 | { | ||
2821 | attributes |= WixRegistrySearchAttributes.Win64; | ||
2822 | } | ||
2823 | |||
2824 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2825 | |||
2826 | if (!this.Messaging.EncounteredError) | ||
2827 | { | ||
2828 | this.CreateWixSearchRow(section, sourceLineNumbers, id, variable, condition); | ||
2829 | if (after != null) | ||
2830 | { | ||
2831 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixSearch", after); | ||
2832 | // TODO: We're currently defaulting to "always run after", which we will need to change... | ||
2833 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); | ||
2834 | } | ||
2835 | |||
2836 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixRegistrySearch", id); | ||
2837 | row.Set(1, root); | ||
2838 | row.Set(2, key); | ||
2839 | row.Set(3, value); | ||
2840 | row.Set(4, (int)attributes); | ||
2841 | } | ||
2842 | } | ||
2843 | |||
2844 | /// <summary> | ||
2845 | /// Parses a RemoveFolderEx element. | ||
2846 | /// </summary> | ||
2847 | /// <param name="element">Element to parse.</param> | ||
2848 | /// <param name="componentId">Identifier of parent component.</param> | ||
2849 | private void ParseRemoveFolderExElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
2850 | { | ||
2851 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2852 | Identifier id = null; | ||
2853 | int on = (int)WixRemoveFolderExOn.Uninstall; | ||
2854 | string property = null; | ||
2855 | |||
2856 | foreach (XAttribute attrib in element.Attributes()) | ||
2857 | { | ||
2858 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2859 | { | ||
2860 | switch (attrib.Name.LocalName) | ||
2861 | { | ||
2862 | case "Id": | ||
2863 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
2864 | break; | ||
2865 | case "On": | ||
2866 | string onValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2867 | if (onValue.Length == 0) | ||
2868 | { | ||
2869 | on = CompilerConstants.IllegalInteger; | ||
2870 | } | ||
2871 | else | ||
2872 | { | ||
2873 | switch (onValue) | ||
2874 | { | ||
2875 | case "install": | ||
2876 | on = (int)WixRemoveFolderExOn.Install; | ||
2877 | break; | ||
2878 | case "uninstall": | ||
2879 | on = (int)WixRemoveFolderExOn.Uninstall; | ||
2880 | break; | ||
2881 | case "both": | ||
2882 | on = (int)WixRemoveFolderExOn.Both; | ||
2883 | break; | ||
2884 | default: | ||
2885 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "On", onValue, "install", "uninstall", "both")); | ||
2886 | on = CompilerConstants.IllegalInteger; | ||
2887 | break; | ||
2888 | } | ||
2889 | } | ||
2890 | break; | ||
2891 | case "Property": | ||
2892 | property = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2893 | break; | ||
2894 | default: | ||
2895 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2896 | break; | ||
2897 | } | ||
2898 | } | ||
2899 | else | ||
2900 | { | ||
2901 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2902 | } | ||
2903 | } | ||
2904 | |||
2905 | if (String.IsNullOrEmpty(property)) | ||
2906 | { | ||
2907 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Property")); | ||
2908 | } | ||
2909 | |||
2910 | if (null == id) | ||
2911 | { | ||
2912 | id = this.ParseHelper.CreateIdentifier("wrf", componentId, property, on.ToString(CultureInfo.InvariantCulture.NumberFormat)); | ||
2913 | } | ||
2914 | |||
2915 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2916 | |||
2917 | if (!this.Messaging.EncounteredError) | ||
2918 | { | ||
2919 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixRemoveFolderEx", id); | ||
2920 | row.Set(1, componentId); | ||
2921 | row.Set(2, property); | ||
2922 | row.Set(3, on); | ||
2923 | |||
2924 | this.ParseHelper.EnsureTable(section, sourceLineNumbers, "RemoveFile"); | ||
2925 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixRemoveFoldersEx"); | ||
2926 | } | ||
2927 | } | ||
2928 | |||
2929 | /// <summary> | ||
2930 | /// Parses a RestartResource element. | ||
2931 | /// </summary> | ||
2932 | /// <param name="element">The element to parse.</param> | ||
2933 | /// <param name="componentId">The identity of the parent component.</param> | ||
2934 | private void ParseRestartResourceElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
2935 | { | ||
2936 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
2937 | Identifier id = null; | ||
2938 | string resource = null; | ||
2939 | int attributes = CompilerConstants.IntegerNotSet; | ||
2940 | |||
2941 | foreach (XAttribute attrib in element.Attributes()) | ||
2942 | { | ||
2943 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
2944 | { | ||
2945 | switch (attrib.Name.LocalName) | ||
2946 | { | ||
2947 | case "Id": | ||
2948 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
2949 | break; | ||
2950 | |||
2951 | case "Path": | ||
2952 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2953 | attributes = (int)WixRestartResourceAttributes.Filename; | ||
2954 | break; | ||
2955 | |||
2956 | case "ProcessName": | ||
2957 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2958 | attributes = (int)WixRestartResourceAttributes.ProcessName; | ||
2959 | break; | ||
2960 | |||
2961 | case "ServiceName": | ||
2962 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2963 | attributes = (int)WixRestartResourceAttributes.ServiceName; | ||
2964 | break; | ||
2965 | |||
2966 | default: | ||
2967 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
2968 | break; | ||
2969 | } | ||
2970 | } | ||
2971 | else | ||
2972 | { | ||
2973 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
2974 | } | ||
2975 | } | ||
2976 | |||
2977 | // Validate the attribute. | ||
2978 | if (null == id) | ||
2979 | { | ||
2980 | id = this.ParseHelper.CreateIdentifier("wrr", componentId, resource, attributes.ToString()); | ||
2981 | } | ||
2982 | |||
2983 | if (String.IsNullOrEmpty(resource) || CompilerConstants.IntegerNotSet == attributes) | ||
2984 | { | ||
2985 | this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, element.Name.LocalName, "Path", "ServiceName")); | ||
2986 | } | ||
2987 | |||
2988 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
2989 | |||
2990 | if (!this.Messaging.EncounteredError) | ||
2991 | { | ||
2992 | // Add a reference to the WixRegisterRestartResources custom action since nothing will happen without it. | ||
2993 | if (this.Context.Platform == Platform.ARM) | ||
2994 | { | ||
2995 | // Ensure ARM version of the CA is referenced | ||
2996 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixRegisterRestartResources_ARM"); | ||
2997 | } | ||
2998 | else | ||
2999 | { | ||
3000 | // All other supported platforms use x86 | ||
3001 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixRegisterRestartResources"); | ||
3002 | } | ||
3003 | |||
3004 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixRestartResource", id); | ||
3005 | row.Set(1, componentId); | ||
3006 | row.Set(2, resource); | ||
3007 | row.Set(3, attributes); | ||
3008 | } | ||
3009 | } | ||
3010 | |||
3011 | /// <summary> | ||
3012 | /// Parses a service configuration element. | ||
3013 | /// </summary> | ||
3014 | /// <param name="element">Element to parse.</param> | ||
3015 | /// <param name="componentId">Identifier of parent component.</param> | ||
3016 | /// <param name="parentTableName">Name of parent element.</param> | ||
3017 | /// <param name="parentTableServiceName">Optional name of service </param> | ||
3018 | private void ParseServiceConfigElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentTableName, string parentTableServiceName) | ||
3019 | { | ||
3020 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
3021 | string firstFailureActionType = null; | ||
3022 | bool newService = false; | ||
3023 | string programCommandLine = null; | ||
3024 | string rebootMessage = null; | ||
3025 | int resetPeriod = CompilerConstants.IntegerNotSet; | ||
3026 | int restartServiceDelay = CompilerConstants.IntegerNotSet; | ||
3027 | string secondFailureActionType = null; | ||
3028 | string serviceName = null; | ||
3029 | string thirdFailureActionType = null; | ||
3030 | |||
3031 | foreach (XAttribute attrib in element.Attributes()) | ||
3032 | { | ||
3033 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
3034 | { | ||
3035 | switch (attrib.Name.LocalName) | ||
3036 | { | ||
3037 | case "FirstFailureActionType": | ||
3038 | firstFailureActionType = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3039 | break; | ||
3040 | case "ProgramCommandLine": | ||
3041 | programCommandLine = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3042 | break; | ||
3043 | case "RebootMessage": | ||
3044 | rebootMessage = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3045 | break; | ||
3046 | case "ResetPeriodInDays": | ||
3047 | resetPeriod = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
3048 | break; | ||
3049 | case "RestartServiceDelayInSeconds": | ||
3050 | restartServiceDelay = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
3051 | break; | ||
3052 | case "SecondFailureActionType": | ||
3053 | secondFailureActionType = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3054 | break; | ||
3055 | case "ServiceName": | ||
3056 | serviceName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3057 | break; | ||
3058 | case "ThirdFailureActionType": | ||
3059 | thirdFailureActionType = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3060 | break; | ||
3061 | default: | ||
3062 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
3063 | break; | ||
3064 | } | ||
3065 | } | ||
3066 | else | ||
3067 | { | ||
3068 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
3069 | } | ||
3070 | } | ||
3071 | |||
3072 | // if this element is a child of ServiceInstall then ignore the service name provided. | ||
3073 | if ("ServiceInstall" == parentTableName) | ||
3074 | { | ||
3075 | // TODO: the ServiceName attribute should not be allowed in this case (the overwriting behavior may confuse users) | ||
3076 | serviceName = parentTableServiceName; | ||
3077 | newService = true; | ||
3078 | } | ||
3079 | else | ||
3080 | { | ||
3081 | // not a child of ServiceInstall, so ServiceName must have been provided | ||
3082 | if (null == serviceName) | ||
3083 | { | ||
3084 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "ServiceName")); | ||
3085 | } | ||
3086 | } | ||
3087 | |||
3088 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
3089 | |||
3090 | // Reference SchedServiceConfig since nothing will happen without it | ||
3091 | if (this.Context.Platform == Platform.ARM) | ||
3092 | { | ||
3093 | // Ensure ARM version of the CA is referenced | ||
3094 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedServiceConfig_ARM"); | ||
3095 | } | ||
3096 | else | ||
3097 | { | ||
3098 | // All other supported platforms use x86 | ||
3099 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedServiceConfig"); | ||
3100 | } | ||
3101 | |||
3102 | if (!this.Messaging.EncounteredError) | ||
3103 | { | ||
3104 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ServiceConfig"); | ||
3105 | row.Set(0, serviceName); | ||
3106 | row.Set(1, componentId); | ||
3107 | row.Set(2, (newService ? 1 : 0)); | ||
3108 | row.Set(3, firstFailureActionType); | ||
3109 | row.Set(4, secondFailureActionType); | ||
3110 | row.Set(5, thirdFailureActionType); | ||
3111 | if (CompilerConstants.IntegerNotSet != resetPeriod) | ||
3112 | { | ||
3113 | row.Set(6, resetPeriod); | ||
3114 | } | ||
3115 | |||
3116 | if (CompilerConstants.IntegerNotSet != restartServiceDelay) | ||
3117 | { | ||
3118 | row.Set(7, restartServiceDelay); | ||
3119 | } | ||
3120 | row.Set(8, programCommandLine); | ||
3121 | row.Set(9, rebootMessage); | ||
3122 | } | ||
3123 | } | ||
3124 | |||
3125 | /// <summary> | ||
3126 | /// Parses a touch file element. | ||
3127 | /// </summary> | ||
3128 | /// <param name="element">Element to parse.</param> | ||
3129 | /// <param name="componentId">Identifier of parent component.</param> | ||
3130 | /// <param name="win64">Indicates whether the path is a 64-bit path.</param> | ||
3131 | private void ParseTouchFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, bool win64) | ||
3132 | { | ||
3133 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
3134 | Identifier id = null; | ||
3135 | string path = null; | ||
3136 | YesNoType onInstall = YesNoType.NotSet; | ||
3137 | YesNoType onReinstall = YesNoType.NotSet; | ||
3138 | YesNoType onUninstall = YesNoType.NotSet; | ||
3139 | YesNoType nonvital = YesNoType.NotSet; | ||
3140 | int attributes = 0; | ||
3141 | |||
3142 | foreach (XAttribute attrib in element.Attributes()) | ||
3143 | { | ||
3144 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
3145 | { | ||
3146 | switch (attrib.Name.LocalName) | ||
3147 | { | ||
3148 | case "Id": | ||
3149 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
3150 | break; | ||
3151 | case "Path": | ||
3152 | path = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3153 | break; | ||
3154 | case "OnInstall": | ||
3155 | onInstall = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
3156 | break; | ||
3157 | case "OnReinstall": | ||
3158 | onReinstall = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
3159 | break; | ||
3160 | case "OnUninstall": | ||
3161 | onUninstall = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
3162 | break; | ||
3163 | case "Nonvital": | ||
3164 | nonvital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
3165 | break; | ||
3166 | default: | ||
3167 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
3168 | break; | ||
3169 | } | ||
3170 | } | ||
3171 | else | ||
3172 | { | ||
3173 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
3174 | } | ||
3175 | } | ||
3176 | |||
3177 | if (null == path) | ||
3178 | { | ||
3179 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Path")); | ||
3180 | } | ||
3181 | |||
3182 | // If none of the scheduling actions are set, default to touching on install and reinstall. | ||
3183 | if (YesNoType.NotSet == onInstall && YesNoType.NotSet == onReinstall && YesNoType.NotSet == onUninstall) | ||
3184 | { | ||
3185 | onInstall = YesNoType.Yes; | ||
3186 | onReinstall = YesNoType.Yes; | ||
3187 | } | ||
3188 | |||
3189 | attributes |= YesNoType.Yes == onInstall ? 0x1 : 0; | ||
3190 | attributes |= YesNoType.Yes == onReinstall ? 0x2 : 0; | ||
3191 | attributes |= YesNoType.Yes == onUninstall ? 0x4 : 0; | ||
3192 | attributes |= win64 ? 0x10 : 0; | ||
3193 | attributes |= YesNoType.Yes == nonvital ? 0 : 0x20; | ||
3194 | |||
3195 | if (null == id) | ||
3196 | { | ||
3197 | id = this.ParseHelper.CreateIdentifier("tf", path, attributes.ToString()); | ||
3198 | } | ||
3199 | |||
3200 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
3201 | |||
3202 | if (!this.Messaging.EncounteredError) | ||
3203 | { | ||
3204 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixTouchFile", id); | ||
3205 | row.Set(1, componentId); | ||
3206 | row.Set(2, path); | ||
3207 | row.Set(3, attributes); | ||
3208 | |||
3209 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixTouchFileDuringInstall"); | ||
3210 | } | ||
3211 | } | ||
3212 | |||
3213 | /// <summary> | ||
3214 | /// Parses an user element. | ||
3215 | /// </summary> | ||
3216 | /// <param name="element">Element to parse.</param> | ||
3217 | /// <param name="componentId">Optional identifier of parent component.</param> | ||
3218 | private void ParseUserElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
3219 | { | ||
3220 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
3221 | Identifier id = null; | ||
3222 | int attributes = 0; | ||
3223 | string domain = null; | ||
3224 | string name = null; | ||
3225 | string password = null; | ||
3226 | |||
3227 | foreach (XAttribute attrib in element.Attributes()) | ||
3228 | { | ||
3229 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
3230 | { | ||
3231 | switch (attrib.Name.LocalName) | ||
3232 | { | ||
3233 | case "Id": | ||
3234 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
3235 | break; | ||
3236 | case "CanNotChangePassword": | ||
3237 | if (null == componentId) | ||
3238 | { | ||
3239 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3240 | } | ||
3241 | |||
3242 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3243 | { | ||
3244 | attributes |= UserPasswdCantChange; | ||
3245 | } | ||
3246 | break; | ||
3247 | case "CreateUser": | ||
3248 | if (null == componentId) | ||
3249 | { | ||
3250 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3251 | } | ||
3252 | |||
3253 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3254 | { | ||
3255 | attributes |= UserDontCreateUser; | ||
3256 | } | ||
3257 | break; | ||
3258 | case "Disabled": | ||
3259 | if (null == componentId) | ||
3260 | { | ||
3261 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3262 | } | ||
3263 | |||
3264 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3265 | { | ||
3266 | attributes |= UserDisableAccount; | ||
3267 | } | ||
3268 | break; | ||
3269 | case "Domain": | ||
3270 | domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3271 | break; | ||
3272 | case "FailIfExists": | ||
3273 | if (null == componentId) | ||
3274 | { | ||
3275 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3276 | } | ||
3277 | |||
3278 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3279 | { | ||
3280 | attributes |= UserFailIfExists; | ||
3281 | } | ||
3282 | break; | ||
3283 | case "LogonAsService": | ||
3284 | if (null == componentId) | ||
3285 | { | ||
3286 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3287 | } | ||
3288 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3289 | { | ||
3290 | attributes |= UserLogonAsService; | ||
3291 | } | ||
3292 | break; | ||
3293 | case "LogonAsBatchJob": | ||
3294 | if (null == componentId) | ||
3295 | { | ||
3296 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3297 | } | ||
3298 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3299 | { | ||
3300 | attributes |= UserLogonAsBatchJob; | ||
3301 | } | ||
3302 | break; | ||
3303 | case "Name": | ||
3304 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3305 | break; | ||
3306 | case "Password": | ||
3307 | password = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3308 | break; | ||
3309 | case "PasswordExpired": | ||
3310 | if (null == componentId) | ||
3311 | { | ||
3312 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3313 | } | ||
3314 | |||
3315 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3316 | { | ||
3317 | attributes |= UserPasswdChangeReqdOnLogin; | ||
3318 | } | ||
3319 | break; | ||
3320 | case "PasswordNeverExpires": | ||
3321 | if (null == componentId) | ||
3322 | { | ||
3323 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3324 | } | ||
3325 | |||
3326 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3327 | { | ||
3328 | attributes |= UserDontExpirePasswrd; | ||
3329 | } | ||
3330 | break; | ||
3331 | case "RemoveOnUninstall": | ||
3332 | if (null == componentId) | ||
3333 | { | ||
3334 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3335 | } | ||
3336 | |||
3337 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3338 | { | ||
3339 | attributes |= UserDontRemoveOnUninstall; | ||
3340 | } | ||
3341 | break; | ||
3342 | case "UpdateIfExists": | ||
3343 | if (null == componentId) | ||
3344 | { | ||
3345 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3346 | } | ||
3347 | |||
3348 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3349 | { | ||
3350 | attributes |= UserUpdateIfExists; | ||
3351 | } | ||
3352 | break; | ||
3353 | case "Vital": | ||
3354 | if (null == componentId) | ||
3355 | { | ||
3356 | this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); | ||
3357 | } | ||
3358 | |||
3359 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3360 | { | ||
3361 | attributes |= UserNonVital; | ||
3362 | } | ||
3363 | break; | ||
3364 | default: | ||
3365 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
3366 | break; | ||
3367 | } | ||
3368 | } | ||
3369 | else | ||
3370 | { | ||
3371 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
3372 | } | ||
3373 | } | ||
3374 | |||
3375 | if (null == id) | ||
3376 | { | ||
3377 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
3378 | } | ||
3379 | |||
3380 | if (null == name) | ||
3381 | { | ||
3382 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | ||
3383 | } | ||
3384 | |||
3385 | foreach (XElement child in element.Elements()) | ||
3386 | { | ||
3387 | if (this.Namespace == child.Name.Namespace) | ||
3388 | { | ||
3389 | switch (child.Name.LocalName) | ||
3390 | { | ||
3391 | case "GroupRef": | ||
3392 | if (null == componentId) | ||
3393 | { | ||
3394 | SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); | ||
3395 | this.Messaging.Write(UtilErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); | ||
3396 | } | ||
3397 | |||
3398 | this.ParseGroupRefElement(intermediate, section, child, id.Id); | ||
3399 | break; | ||
3400 | default: | ||
3401 | this.ParseHelper.UnexpectedElement(element, child); | ||
3402 | break; | ||
3403 | } | ||
3404 | } | ||
3405 | else | ||
3406 | { | ||
3407 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); | ||
3408 | } | ||
3409 | } | ||
3410 | |||
3411 | if (null != componentId) | ||
3412 | { | ||
3413 | // Reference ConfigureIIs since nothing will happen without it | ||
3414 | if (this.Context.Platform == Platform.ARM) | ||
3415 | { | ||
3416 | // Ensure ARM version of the CA is referenced | ||
3417 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureUsers_ARM"); | ||
3418 | } | ||
3419 | else | ||
3420 | { | ||
3421 | // All other supported platforms use x86 | ||
3422 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureUsers"); | ||
3423 | } | ||
3424 | } | ||
3425 | |||
3426 | if (!this.Messaging.EncounteredError) | ||
3427 | { | ||
3428 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "User", id); | ||
3429 | row.Set(1, componentId); | ||
3430 | row.Set(2, name); | ||
3431 | row.Set(3, domain); | ||
3432 | row.Set(4, password); | ||
3433 | row.Set(5, attributes); | ||
3434 | } | ||
3435 | } | ||
3436 | |||
3437 | /// <summary> | ||
3438 | /// Parses a XmlFile element. | ||
3439 | /// </summary> | ||
3440 | /// <param name="element">Element to parse.</param> | ||
3441 | /// <param name="componentId">Identifier of parent component.</param> | ||
3442 | private void ParseXmlFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | ||
3443 | { | ||
3444 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
3445 | string id = null; | ||
3446 | string file = null; | ||
3447 | string elementPath = null; | ||
3448 | string name = null; | ||
3449 | string value = null; | ||
3450 | int sequence = -1; | ||
3451 | int flags = 0; | ||
3452 | |||
3453 | foreach (XAttribute attrib in element.Attributes()) | ||
3454 | { | ||
3455 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
3456 | { | ||
3457 | switch (attrib.Name.LocalName) | ||
3458 | { | ||
3459 | case "Action": | ||
3460 | string actionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3461 | switch (actionValue) | ||
3462 | { | ||
3463 | case "createElement": | ||
3464 | flags |= 0x00000001; // XMLFILE_CREATE_ELEMENT | ||
3465 | break; | ||
3466 | case "deleteValue": | ||
3467 | flags |= 0x00000002; // XMLFILE_DELETE_VALUE | ||
3468 | break; | ||
3469 | case "bulkSetValue": | ||
3470 | flags |= 0x00000004; // XMLFILE_BULKWRITE_VALUE | ||
3471 | break; | ||
3472 | case "setValue": | ||
3473 | // no flag for set value since it's the default | ||
3474 | break; | ||
3475 | default: | ||
3476 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Action", actionValue, "createElement", "deleteValue", "setValue", "bulkSetValue")); | ||
3477 | break; | ||
3478 | } | ||
3479 | break; | ||
3480 | case "SelectionLanguage": | ||
3481 | string selectionLanguage = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3482 | switch (selectionLanguage) | ||
3483 | { | ||
3484 | case "XPath": | ||
3485 | flags |= 0x00000100; // XMLFILE_USE_XPATH | ||
3486 | break; | ||
3487 | case "XSLPattern": | ||
3488 | // no flag for since it's the default | ||
3489 | break; | ||
3490 | default: | ||
3491 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "SelectionLanguage", selectionLanguage, "XPath", "XSLPattern")); | ||
3492 | break; | ||
3493 | } | ||
3494 | break; | ||
3495 | case "Id": | ||
3496 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
3497 | break; | ||
3498 | case "File": | ||
3499 | file = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3500 | break; | ||
3501 | case "ElementPath": | ||
3502 | elementPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3503 | break; | ||
3504 | case "Name": | ||
3505 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3506 | break; | ||
3507 | case "Permanent": | ||
3508 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3509 | { | ||
3510 | flags |= 0x00010000; // XMLFILE_DONT_UNINSTALL | ||
3511 | } | ||
3512 | break; | ||
3513 | case "Sequence": | ||
3514 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue); | ||
3515 | break; | ||
3516 | case "Value": | ||
3517 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3518 | break; | ||
3519 | case "PreserveModifiedDate": | ||
3520 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3521 | { | ||
3522 | flags |= 0x00001000; // XMLFILE_PRESERVE_MODIFIED | ||
3523 | } | ||
3524 | break; | ||
3525 | default: | ||
3526 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
3527 | break; | ||
3528 | } | ||
3529 | } | ||
3530 | else | ||
3531 | { | ||
3532 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
3533 | } | ||
3534 | } | ||
3535 | |||
3536 | if (null == id) | ||
3537 | { | ||
3538 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
3539 | } | ||
3540 | |||
3541 | if (null == file) | ||
3542 | { | ||
3543 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); | ||
3544 | } | ||
3545 | |||
3546 | if (null == elementPath) | ||
3547 | { | ||
3548 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "ElementPath")); | ||
3549 | } | ||
3550 | |||
3551 | if ((0x00000001 /*XMLFILE_CREATE_ELEMENT*/ & flags) != 0 && null == name) | ||
3552 | { | ||
3553 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, element.Name.LocalName, "Action", "Name")); | ||
3554 | } | ||
3555 | |||
3556 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
3557 | |||
3558 | if (!this.Messaging.EncounteredError) | ||
3559 | { | ||
3560 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "XmlFile"); | ||
3561 | row.Set(0, id); | ||
3562 | row.Set(1, file); | ||
3563 | row.Set(2, elementPath); | ||
3564 | row.Set(3, name); | ||
3565 | row.Set(4, value); | ||
3566 | row.Set(5, flags); | ||
3567 | row.Set(6, componentId); | ||
3568 | if (-1 != sequence) | ||
3569 | { | ||
3570 | row.Set(7, sequence); | ||
3571 | } | ||
3572 | } | ||
3573 | |||
3574 | // Reference SchedXmlFile since nothing will happen without it | ||
3575 | if (this.Context.Platform == Platform.ARM) | ||
3576 | { | ||
3577 | // Ensure ARM version of the CA is referenced | ||
3578 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedXmlFile_ARM"); | ||
3579 | } | ||
3580 | else | ||
3581 | { | ||
3582 | // All other supported platforms use x86 | ||
3583 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedXmlFile"); | ||
3584 | } | ||
3585 | } | ||
3586 | |||
3587 | /// <summary> | ||
3588 | /// Parses a XmlConfig element. | ||
3589 | /// </summary> | ||
3590 | /// <param name="element">Element to parse.</param> | ||
3591 | /// <param name="componentId">Identifier of parent component.</param> | ||
3592 | /// <param name="nested">Whether or not the element is nested.</param> | ||
3593 | private void ParseXmlConfigElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, bool nested) | ||
3594 | { | ||
3595 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
3596 | string id = null; | ||
3597 | string elementId = null; | ||
3598 | string elementPath = null; | ||
3599 | int flags = 0; | ||
3600 | string file = null; | ||
3601 | string name = null; | ||
3602 | int sequence = CompilerConstants.IntegerNotSet; | ||
3603 | string value = null; | ||
3604 | string verifyPath = null; | ||
3605 | |||
3606 | foreach (XAttribute attrib in element.Attributes()) | ||
3607 | { | ||
3608 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
3609 | { | ||
3610 | switch (attrib.Name.LocalName) | ||
3611 | { | ||
3612 | case "Id": | ||
3613 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
3614 | break; | ||
3615 | case "Action": | ||
3616 | if (nested) | ||
3617 | { | ||
3618 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, element.Parent.Name.LocalName)); | ||
3619 | } | ||
3620 | else | ||
3621 | { | ||
3622 | string actionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3623 | switch (actionValue) | ||
3624 | { | ||
3625 | case "create": | ||
3626 | flags |= 0x10; // XMLCONFIG_CREATE | ||
3627 | break; | ||
3628 | case "delete": | ||
3629 | flags |= 0x20; // XMLCONFIG_DELETE | ||
3630 | break; | ||
3631 | default: | ||
3632 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, actionValue, "create", "delete")); | ||
3633 | break; | ||
3634 | } | ||
3635 | } | ||
3636 | break; | ||
3637 | case "ElementId": | ||
3638 | elementId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3639 | break; | ||
3640 | case "ElementPath": | ||
3641 | elementPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3642 | break; | ||
3643 | case "File": | ||
3644 | file = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3645 | break; | ||
3646 | case "Name": | ||
3647 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3648 | break; | ||
3649 | case "Node": | ||
3650 | if (nested) | ||
3651 | { | ||
3652 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, element.Parent.Name.LocalName)); | ||
3653 | } | ||
3654 | else | ||
3655 | { | ||
3656 | string nodeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3657 | switch (nodeValue) | ||
3658 | { | ||
3659 | case "element": | ||
3660 | flags |= 0x1; // XMLCONFIG_ELEMENT | ||
3661 | break; | ||
3662 | case "value": | ||
3663 | flags |= 0x2; // XMLCONFIG_VALUE | ||
3664 | break; | ||
3665 | case "document": | ||
3666 | flags |= 0x4; // XMLCONFIG_DOCUMENT | ||
3667 | break; | ||
3668 | default: | ||
3669 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, nodeValue, "element", "value", "document")); | ||
3670 | break; | ||
3671 | } | ||
3672 | } | ||
3673 | break; | ||
3674 | case "On": | ||
3675 | if (nested) | ||
3676 | { | ||
3677 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, element.Parent.Name.LocalName)); | ||
3678 | } | ||
3679 | else | ||
3680 | { | ||
3681 | string onValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3682 | switch (onValue) | ||
3683 | { | ||
3684 | case "install": | ||
3685 | flags |= 0x100; // XMLCONFIG_INSTALL | ||
3686 | break; | ||
3687 | case "uninstall": | ||
3688 | flags |= 0x200; // XMLCONFIG_UNINSTALL | ||
3689 | break; | ||
3690 | default: | ||
3691 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, onValue, "install", "uninstall")); | ||
3692 | break; | ||
3693 | } | ||
3694 | } | ||
3695 | break; | ||
3696 | case "PreserveModifiedDate": | ||
3697 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
3698 | { | ||
3699 | flags |= 0x00001000; // XMLCONFIG_PRESERVE_MODIFIED | ||
3700 | } | ||
3701 | break; | ||
3702 | case "Sequence": | ||
3703 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue); | ||
3704 | break; | ||
3705 | case "Value": | ||
3706 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3707 | break; | ||
3708 | case "VerifyPath": | ||
3709 | verifyPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
3710 | break; | ||
3711 | default: | ||
3712 | this.ParseHelper.UnexpectedAttribute(element, attrib); | ||
3713 | break; | ||
3714 | } | ||
3715 | } | ||
3716 | else | ||
3717 | { | ||
3718 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
3719 | } | ||
3720 | } | ||
3721 | |||
3722 | if (null == id) | ||
3723 | { | ||
3724 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | ||
3725 | } | ||
3726 | |||
3727 | if (null == file) | ||
3728 | { | ||
3729 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); | ||
3730 | } | ||
3731 | |||
3732 | if (null == elementId && null == elementPath) | ||
3733 | { | ||
3734 | this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, element.Name.LocalName, "ElementId", "ElementPath")); | ||
3735 | } | ||
3736 | else if (null != elementId) | ||
3737 | { | ||
3738 | if (null != elementPath) | ||
3739 | { | ||
3740 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "ElementId", "ElementPath")); | ||
3741 | } | ||
3742 | |||
3743 | if (0 != flags) | ||
3744 | { | ||
3745 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, element.Name.LocalName, "ElementId", "Action", "Node", "On")); | ||
3746 | } | ||
3747 | |||
3748 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "XmlConfig", elementId); | ||
3749 | } | ||
3750 | |||
3751 | string innerText = this.ParseHelper.GetTrimmedInnerText(element); | ||
3752 | if (null != value) | ||
3753 | { | ||
3754 | // cannot specify both the value attribute and inner text | ||
3755 | if (!String.IsNullOrEmpty(innerText)) | ||
3756 | { | ||
3757 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithInnerText(sourceLineNumbers, element.Name.LocalName, "Value")); | ||
3758 | } | ||
3759 | } | ||
3760 | else // value attribute not specified | ||
3761 | { | ||
3762 | if (!String.IsNullOrEmpty(innerText)) | ||
3763 | { | ||
3764 | value = innerText; | ||
3765 | } | ||
3766 | } | ||
3767 | |||
3768 | // find unexpected child elements | ||
3769 | foreach (XElement child in element.Elements()) | ||
3770 | { | ||
3771 | if (this.Namespace == child.Name.Namespace) | ||
3772 | { | ||
3773 | switch (child.Name.LocalName) | ||
3774 | { | ||
3775 | case "XmlConfig": | ||
3776 | if (nested) | ||
3777 | { | ||
3778 | this.Messaging.Write(ErrorMessages.UnexpectedElement(sourceLineNumbers, element.Name.LocalName, child.Name.LocalName)); | ||
3779 | } | ||
3780 | else | ||
3781 | { | ||
3782 | this.ParseXmlConfigElement(intermediate, section, child, componentId, true); | ||
3783 | } | ||
3784 | break; | ||
3785 | default: | ||
3786 | this.ParseHelper.UnexpectedElement(element, child); | ||
3787 | break; | ||
3788 | } | ||
3789 | } | ||
3790 | else | ||
3791 | { | ||
3792 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); | ||
3793 | } | ||
3794 | } | ||
3795 | |||
3796 | if (!this.Messaging.EncounteredError) | ||
3797 | { | ||
3798 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "XmlConfig"); | ||
3799 | row.Set(0, id); | ||
3800 | row.Set(1, file); | ||
3801 | row.Set(2, elementId ?? elementPath); | ||
3802 | row.Set(3, verifyPath); | ||
3803 | row.Set(4, name); | ||
3804 | row.Set(5, value); | ||
3805 | row.Set(6, flags); | ||
3806 | row.Set(7, componentId); | ||
3807 | if (CompilerConstants.IntegerNotSet != sequence) | ||
3808 | { | ||
3809 | row.Set(8, sequence); | ||
3810 | } | ||
3811 | } | ||
3812 | |||
3813 | // Reference SchedXmlConfig since nothing will happen without it | ||
3814 | if (this.Context.Platform == Platform.ARM) | ||
3815 | { | ||
3816 | // Ensure ARM version of the CA is referenced | ||
3817 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedXmlConfig_ARM"); | ||
3818 | } | ||
3819 | else | ||
3820 | { | ||
3821 | // All other supported platforms use x86 | ||
3822 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "SchedXmlConfig"); | ||
3823 | } | ||
3824 | } | ||
3825 | |||
3826 | /// <summary> | ||
3827 | /// Match evaluator to escape properties in a string. | ||
3828 | /// </summary> | ||
3829 | private string EscapeProperties(Match match) | ||
3830 | { | ||
3831 | string escape = null; | ||
3832 | switch (match.Value) | ||
3833 | { | ||
3834 | case "[": | ||
3835 | escape = @"[\[]"; | ||
3836 | break; | ||
3837 | case "]": | ||
3838 | escape = @"[\]]"; | ||
3839 | break; | ||
3840 | } | ||
3841 | |||
3842 | return escape; | ||
3843 | } | ||
3844 | |||
3845 | private int CreateIntegerFromBitArray(BitArray bits) | ||
3846 | { | ||
3847 | if (32 != bits.Length) | ||
3848 | { | ||
3849 | throw new ArgumentException(String.Format("Can only convert a bit array with 32-bits to integer. Actual number of bits in array: {0}", bits.Length), "bits"); | ||
3850 | } | ||
3851 | |||
3852 | int[] intArray = new int[1]; | ||
3853 | bits.CopyTo(intArray, 0); | ||
3854 | |||
3855 | return intArray[0]; | ||
3856 | } | ||
3857 | |||
3858 | private bool TrySetBitFromName(string[] attributeNames, string attributeName, YesNoType attributeValue, BitArray bits, int offset) | ||
3859 | { | ||
3860 | for (int i = 0; i < attributeNames.Length; i++) | ||
3861 | { | ||
3862 | if (attributeName.Equals(attributeNames[i], StringComparison.Ordinal)) | ||
3863 | { | ||
3864 | bits.Set(i + offset, YesNoType.Yes == attributeValue); | ||
3865 | return true; | ||
3866 | } | ||
3867 | } | ||
3868 | |||
3869 | return false; | ||
3870 | } | ||
3871 | |||
3872 | /// <summary> | ||
3873 | /// Private class that stores the data from a parsed PerformanceCounter element. | ||
3874 | /// </summary> | ||
3875 | private class ParsedPerformanceCounter | ||
3876 | { | ||
3877 | string name; | ||
3878 | string help; | ||
3879 | int type; | ||
3880 | string language; | ||
3881 | |||
3882 | internal ParsedPerformanceCounter(string name, string help, System.Diagnostics.PerformanceCounterType type, int language) | ||
3883 | { | ||
3884 | this.name = name; | ||
3885 | this.help = help; | ||
3886 | this.type = (int)type; | ||
3887 | this.language = language.ToString("D3", CultureInfo.InvariantCulture); | ||
3888 | } | ||
3889 | |||
3890 | internal string Name | ||
3891 | { | ||
3892 | get { return this.name; } | ||
3893 | } | ||
3894 | |||
3895 | internal string Help | ||
3896 | { | ||
3897 | get { return this.help; } | ||
3898 | } | ||
3899 | |||
3900 | internal int Type | ||
3901 | { | ||
3902 | get { return this.type; } | ||
3903 | } | ||
3904 | |||
3905 | internal string Language | ||
3906 | { | ||
3907 | get { return this.language; } | ||
3908 | } | ||
3909 | } | ||
3910 | } | ||
3911 | } | ||
diff --git a/src/wixext/UtilConstants.cs b/src/wixext/UtilConstants.cs new file mode 100644 index 00000000..28ff368f --- /dev/null +++ b/src/wixext/UtilConstants.cs | |||
@@ -0,0 +1,17 @@ | |||
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 | /// <summary> | ||
6 | /// Constants used by Utility Extension. | ||
7 | /// </summary> | ||
8 | internal static class UtilConstants | ||
9 | { | ||
10 | internal static readonly string[] FilePermissions = { "Read", "Write", "Append", "ReadExtendedAttributes", "WriteExtendedAttributes", "Execute", null, "ReadAttributes", "WriteAttributes" }; | ||
11 | internal static readonly string[] FolderPermissions = { "Read", "CreateFile", "CreateChild", "ReadExtendedAttributes", "WriteExtendedAttributes", "Traverse", "DeleteChild", "ReadAttributes", "WriteAttributes" }; | ||
12 | internal static readonly string[] GenericPermissions = { "GenericAll", "GenericExecute", "GenericWrite", "GenericRead" }; | ||
13 | internal static readonly string[] RegistryPermissions = { "Read", "Write", "CreateSubkeys", "EnumerateSubkeys", "Notify", "CreateLink" }; | ||
14 | internal static readonly string[] ServicePermissions = { "ServiceQueryConfig", "ServiceChangeConfig", "ServiceQueryStatus", "ServiceEnumerateDependents", "ServiceStart", "ServiceStop", "ServicePauseContinue", "ServiceInterrogate", "ServiceUserDefinedControl" }; | ||
15 | internal static readonly string[] StandardPermissions = { "Delete", "ReadPermission", "ChangePermission", "TakeOwnership", "Synchronize" }; | ||
16 | } | ||
17 | } | ||
diff --git a/src/wixext/UtilDecompiler.cs b/src/wixext/UtilDecompiler.cs new file mode 100644 index 00000000..9ef3390f --- /dev/null +++ b/src/wixext/UtilDecompiler.cs | |||
@@ -0,0 +1,1543 @@ | |||
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.Extensions | ||
4 | { | ||
5 | #if TODO_CONSIDER_DECOMPILER | ||
6 | using System; | ||
7 | using System.IO; | ||
8 | using System.Text; | ||
9 | using System.Collections; | ||
10 | using System.Diagnostics; | ||
11 | using System.Globalization; | ||
12 | |||
13 | using Util = WixToolset.Extensions.Serialize.Util; | ||
14 | using WixToolset.Data; | ||
15 | using WixToolset.Extensibility; | ||
16 | using Wix = WixToolset.Data.Serialize; | ||
17 | |||
18 | /// <summary> | ||
19 | /// The decompiler for the WiX Toolset Utility Extension. | ||
20 | /// </summary> | ||
21 | public sealed class UtilDecompiler : DecompilerExtension | ||
22 | { | ||
23 | /// <summary> | ||
24 | /// Creates a decompiler for Utility Extension. | ||
25 | /// </summary> | ||
26 | public UtilDecompiler() | ||
27 | { | ||
28 | this.TableDefinitions = UtilExtensionData.GetExtensionTableDefinitions(); | ||
29 | } | ||
30 | |||
31 | /// <summary> | ||
32 | /// Get the extensions library to be removed. | ||
33 | /// </summary> | ||
34 | /// <param name="tableDefinitions">Table definitions for library.</param> | ||
35 | /// <returns>Library to remove from decompiled output.</returns> | ||
36 | public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) | ||
37 | { | ||
38 | return UtilExtensionData.GetExtensionLibrary(tableDefinitions); | ||
39 | } | ||
40 | |||
41 | /// <summary> | ||
42 | /// Called at the beginning of the decompilation of a database. | ||
43 | /// </summary> | ||
44 | /// <param name="tables">The collection of all tables.</param> | ||
45 | public override void Initialize(TableIndexedCollection tables) | ||
46 | { | ||
47 | this.CleanupSecureCustomProperties(tables); | ||
48 | this.CleanupInternetShortcutRemoveFileTables(tables); | ||
49 | } | ||
50 | |||
51 | /// <summary> | ||
52 | /// Decompile the SecureCustomProperties field to PropertyRefs for known extension properties. | ||
53 | /// </summary> | ||
54 | /// <remarks> | ||
55 | /// If we've referenced any of the suite or directory properties, add | ||
56 | /// a PropertyRef to refer to the Property (and associated custom action) | ||
57 | /// from the extension's library. Then remove the property from | ||
58 | /// SecureCustomExtensions property so later decompilation won't create | ||
59 | /// new Property elements. | ||
60 | /// </remarks> | ||
61 | /// <param name="tables">The collection of all tables.</param> | ||
62 | private void CleanupSecureCustomProperties(TableIndexedCollection tables) | ||
63 | { | ||
64 | Table propertyTable = tables["Property"]; | ||
65 | |||
66 | if (null != propertyTable) | ||
67 | { | ||
68 | foreach (Row row in propertyTable.Rows) | ||
69 | { | ||
70 | if ("SecureCustomProperties" == row[0].ToString()) | ||
71 | { | ||
72 | StringBuilder remainingProperties = new StringBuilder(); | ||
73 | string[] secureCustomProperties = row[1].ToString().Split(';'); | ||
74 | foreach (string property in secureCustomProperties) | ||
75 | { | ||
76 | if (property.StartsWith("WIX_SUITE_", StringComparison.Ordinal) || property.StartsWith("WIX_DIR_", StringComparison.Ordinal) | ||
77 | || property.StartsWith("WIX_ACCOUNT_", StringComparison.Ordinal)) | ||
78 | { | ||
79 | Wix.PropertyRef propertyRef = new Wix.PropertyRef(); | ||
80 | propertyRef.Id = property; | ||
81 | this.Core.RootElement.AddChild(propertyRef); | ||
82 | } | ||
83 | else | ||
84 | { | ||
85 | if (0 < remainingProperties.Length) | ||
86 | { | ||
87 | remainingProperties.Append(";"); | ||
88 | } | ||
89 | remainingProperties.Append(property); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | row[1] = remainingProperties.ToString(); | ||
94 | break; | ||
95 | } | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | |||
100 | /// <summary> | ||
101 | /// Remove RemoveFile rows that the InternetShortcut compiler extension adds for us. | ||
102 | /// </summary> | ||
103 | /// <param name="tables">The collection of all tables.</param> | ||
104 | private void CleanupInternetShortcutRemoveFileTables(TableIndexedCollection tables) | ||
105 | { | ||
106 | // index the WixInternetShortcut table | ||
107 | Table wixInternetShortcutTable = tables["WixInternetShortcut"]; | ||
108 | Hashtable wixInternetShortcuts = new Hashtable(); | ||
109 | if (null != wixInternetShortcutTable) | ||
110 | { | ||
111 | foreach (Row row in wixInternetShortcutTable.Rows) | ||
112 | { | ||
113 | wixInternetShortcuts.Add(row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), row); | ||
114 | } | ||
115 | } | ||
116 | |||
117 | // remove the RemoveFile rows with primary keys that match the WixInternetShortcut table's | ||
118 | Table removeFileTable = tables["RemoveFile"]; | ||
119 | if (null != removeFileTable) | ||
120 | { | ||
121 | for (int i = removeFileTable.Rows.Count - 1; 0 <= i; i--) | ||
122 | { | ||
123 | if (null != wixInternetShortcuts[removeFileTable.Rows[i][0]]) | ||
124 | { | ||
125 | removeFileTable.Rows.RemoveAt(i); | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | } | ||
130 | |||
131 | /// <summary> | ||
132 | /// Decompiles an extension table. | ||
133 | /// </summary> | ||
134 | /// <param name="table">The table to decompile.</param> | ||
135 | public override void DecompileTable(Table table) | ||
136 | { | ||
137 | switch (table.Name) | ||
138 | { | ||
139 | case "WixCloseApplication": | ||
140 | this.DecompileWixCloseApplicationTable(table); | ||
141 | break; | ||
142 | case "WixRemoveFolderEx": | ||
143 | this.DecompileWixRemoveFolderExTable(table); | ||
144 | break; | ||
145 | case "WixRestartResource": | ||
146 | this.DecompileWixRestartResourceTable(table); | ||
147 | break; | ||
148 | case "FileShare": | ||
149 | this.DecompileFileShareTable(table); | ||
150 | break; | ||
151 | case "FileSharePermissions": | ||
152 | this.DecompileFileSharePermissionsTable(table); | ||
153 | break; | ||
154 | case "WixInternetShortcut": | ||
155 | this.DecompileWixInternetShortcutTable(table); | ||
156 | break; | ||
157 | case "Group": | ||
158 | this.DecompileGroupTable(table); | ||
159 | break; | ||
160 | case "Perfmon": | ||
161 | this.DecompilePerfmonTable(table); | ||
162 | break; | ||
163 | case "PerfmonManifest": | ||
164 | this.DecompilePerfmonManifestTable(table); | ||
165 | break; | ||
166 | case "EventManifest": | ||
167 | this.DecompileEventManifestTable(table); | ||
168 | break; | ||
169 | case "SecureObjects": | ||
170 | this.DecompileSecureObjectsTable(table); | ||
171 | break; | ||
172 | case "ServiceConfig": | ||
173 | this.DecompileServiceConfigTable(table); | ||
174 | break; | ||
175 | case "User": | ||
176 | this.DecompileUserTable(table); | ||
177 | break; | ||
178 | case "UserGroup": | ||
179 | this.DecompileUserGroupTable(table); | ||
180 | break; | ||
181 | case "XmlConfig": | ||
182 | this.DecompileXmlConfigTable(table); | ||
183 | break; | ||
184 | case "XmlFile": | ||
185 | // XmlFile decompilation has been moved to FinalizeXmlFileTable function | ||
186 | break; | ||
187 | default: | ||
188 | base.DecompileTable(table); | ||
189 | break; | ||
190 | } | ||
191 | } | ||
192 | |||
193 | /// <summary> | ||
194 | /// Finalize decompilation. | ||
195 | /// </summary> | ||
196 | /// <param name="tables">The collection of all tables.</param> | ||
197 | public override void Finish(TableIndexedCollection tables) | ||
198 | { | ||
199 | this.FinalizePerfmonTable(tables); | ||
200 | this.FinalizePerfmonManifestTable(tables); | ||
201 | this.FinalizeSecureObjectsTable(tables); | ||
202 | this.FinalizeServiceConfigTable(tables); | ||
203 | this.FinalizeXmlConfigTable(tables); | ||
204 | this.FinalizeXmlFileTable(tables); | ||
205 | this.FinalizeEventManifestTable(tables); | ||
206 | } | ||
207 | |||
208 | /// <summary> | ||
209 | /// Decompile the WixCloseApplication table. | ||
210 | /// </summary> | ||
211 | /// <param name="table">The table to decompile.</param> | ||
212 | private void DecompileWixCloseApplicationTable(Table table) | ||
213 | { | ||
214 | foreach (Row row in table.Rows) | ||
215 | { | ||
216 | Util.CloseApplication closeApplication = new Util.CloseApplication(); | ||
217 | |||
218 | closeApplication.Id = (string)row[0]; | ||
219 | |||
220 | closeApplication.Target = (string)row[1]; | ||
221 | |||
222 | if (null != row[2]) | ||
223 | { | ||
224 | closeApplication.Description = (string)row[2]; | ||
225 | } | ||
226 | |||
227 | if (null != row[3]) | ||
228 | { | ||
229 | closeApplication.Content = (string)row[3]; | ||
230 | } | ||
231 | |||
232 | // set defaults | ||
233 | closeApplication.CloseMessage = Util.YesNoType.no; | ||
234 | closeApplication.RebootPrompt = Util.YesNoType.yes; | ||
235 | closeApplication.ElevatedCloseMessage = Util.YesNoType.no; | ||
236 | |||
237 | if (null != row[4]) | ||
238 | { | ||
239 | int attribute = (int)row[4]; | ||
240 | |||
241 | closeApplication.CloseMessage = (0x1 == (attribute & 0x1)) ? Util.YesNoType.yes : Util.YesNoType.no; | ||
242 | closeApplication.RebootPrompt = (0x2 == (attribute & 0x2)) ? Util.YesNoType.yes : Util.YesNoType.no; | ||
243 | closeApplication.ElevatedCloseMessage = (0x4 == (attribute & 0x4)) ? Util.YesNoType.yes : Util.YesNoType.no; | ||
244 | } | ||
245 | |||
246 | if (null != row[5]) | ||
247 | { | ||
248 | closeApplication.Sequence = (int)row[5]; | ||
249 | } | ||
250 | |||
251 | if (null != row[6]) | ||
252 | { | ||
253 | closeApplication.Property = (string)row[6]; | ||
254 | } | ||
255 | |||
256 | this.Core.RootElement.AddChild(closeApplication); | ||
257 | } | ||
258 | } | ||
259 | |||
260 | /// <summary> | ||
261 | /// Decompile the WixRemoveFolderEx table. | ||
262 | /// </summary> | ||
263 | /// <param name="table">The table to decompile.</param> | ||
264 | private void DecompileWixRemoveFolderExTable(Table table) | ||
265 | { | ||
266 | foreach (Row row in table.Rows) | ||
267 | { | ||
268 | // Set the Id even if auto-generated previously. | ||
269 | Util.RemoveFolderEx removeFolder = new Util.RemoveFolderEx(); | ||
270 | removeFolder.Id = (string)row[0]; | ||
271 | removeFolder.Property = (string)row[2]; | ||
272 | |||
273 | int installMode = (int)row[3]; | ||
274 | switch ((UtilCompiler.WixRemoveFolderExOn)installMode) | ||
275 | { | ||
276 | case UtilCompiler.WixRemoveFolderExOn.Install: | ||
277 | removeFolder.On = Util.RemoveFolderEx.OnType.install; | ||
278 | break; | ||
279 | |||
280 | case UtilCompiler.WixRemoveFolderExOn.Uninstall: | ||
281 | removeFolder.On = Util.RemoveFolderEx.OnType.uninstall; | ||
282 | break; | ||
283 | |||
284 | case UtilCompiler.WixRemoveFolderExOn.Both: | ||
285 | removeFolder.On = Util.RemoveFolderEx.OnType.both; | ||
286 | break; | ||
287 | |||
288 | default: | ||
289 | this.Core.OnMessage(WixWarnings.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "InstallMode", installMode)); | ||
290 | break; | ||
291 | } | ||
292 | |||
293 | // Add to the appropriate Component or section element. | ||
294 | string componentId = (string)row[1]; | ||
295 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", componentId); | ||
296 | if (null != component) | ||
297 | { | ||
298 | component.AddChild(removeFolder); | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", componentId, "Component")); | ||
303 | } | ||
304 | } | ||
305 | } | ||
306 | |||
307 | /// <summary> | ||
308 | /// Decompile the WixRestartResource table. | ||
309 | /// </summary> | ||
310 | /// <param name="table">The table to decompile.</param> | ||
311 | private void DecompileWixRestartResourceTable(Table table) | ||
312 | { | ||
313 | foreach (Row row in table.Rows) | ||
314 | { | ||
315 | // Set the Id even if auto-generated previously. | ||
316 | Util.RestartResource restartResource = new Util.RestartResource(); | ||
317 | restartResource.Id = (string)row[0]; | ||
318 | |||
319 | // Determine the resource type and set accordingly. | ||
320 | string resource = (string)row[2]; | ||
321 | int attributes = (int)row[3]; | ||
322 | UtilCompiler.WixRestartResourceAttributes type = (UtilCompiler.WixRestartResourceAttributes)(attributes & (int)UtilCompiler.WixRestartResourceAttributes.TypeMask); | ||
323 | |||
324 | switch (type) | ||
325 | { | ||
326 | case UtilCompiler.WixRestartResourceAttributes.Filename: | ||
327 | restartResource.Path = resource; | ||
328 | break; | ||
329 | |||
330 | case UtilCompiler.WixRestartResourceAttributes.ProcessName: | ||
331 | restartResource.ProcessName = resource; | ||
332 | break; | ||
333 | |||
334 | case UtilCompiler.WixRestartResourceAttributes.ServiceName: | ||
335 | restartResource.ServiceName = resource; | ||
336 | break; | ||
337 | |||
338 | default: | ||
339 | this.Core.OnMessage(WixWarnings.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "Attributes", attributes)); | ||
340 | break; | ||
341 | } | ||
342 | |||
343 | // Add to the appropriate Component or section element. | ||
344 | string componentId = (string)row[1]; | ||
345 | if (!String.IsNullOrEmpty(componentId)) | ||
346 | { | ||
347 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", componentId); | ||
348 | if (null != component) | ||
349 | { | ||
350 | component.AddChild(restartResource); | ||
351 | } | ||
352 | else | ||
353 | { | ||
354 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", componentId, "Component")); | ||
355 | } | ||
356 | } | ||
357 | else | ||
358 | { | ||
359 | this.Core.RootElement.AddChild(restartResource); | ||
360 | } | ||
361 | } | ||
362 | } | ||
363 | |||
364 | /// <summary> | ||
365 | /// Decompile the FileShare table. | ||
366 | /// </summary> | ||
367 | /// <param name="table">The table to decompile.</param> | ||
368 | private void DecompileFileShareTable(Table table) | ||
369 | { | ||
370 | foreach (Row row in table.Rows) | ||
371 | { | ||
372 | Util.FileShare fileShare = new Util.FileShare(); | ||
373 | |||
374 | fileShare.Id = (string)row[0]; | ||
375 | |||
376 | fileShare.Name = (string)row[1]; | ||
377 | |||
378 | if (null != row[3]) | ||
379 | { | ||
380 | fileShare.Description = (string)row[3]; | ||
381 | } | ||
382 | |||
383 | // the Directory_ column is set by the parent Component | ||
384 | |||
385 | // the User_ and Permissions columns are deprecated | ||
386 | |||
387 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
388 | if (null != component) | ||
389 | { | ||
390 | component.AddChild(fileShare); | ||
391 | } | ||
392 | else | ||
393 | { | ||
394 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
395 | } | ||
396 | this.Core.IndexElement(row, fileShare); | ||
397 | } | ||
398 | } | ||
399 | |||
400 | /// <summary> | ||
401 | /// Decompile the FileSharePermissions table. | ||
402 | /// </summary> | ||
403 | /// <param name="table">The table to decompile.</param> | ||
404 | private void DecompileFileSharePermissionsTable(Table table) | ||
405 | { | ||
406 | foreach (Row row in table.Rows) | ||
407 | { | ||
408 | Util.FileSharePermission fileSharePermission = new Util.FileSharePermission(); | ||
409 | |||
410 | fileSharePermission.User = (string)row[1]; | ||
411 | |||
412 | string[] specialPermissions = UtilConstants.FolderPermissions; | ||
413 | int permissions = (int)row[2]; | ||
414 | for (int i = 0; i < 32; i++) | ||
415 | { | ||
416 | if (0 != ((permissions >> i) & 1)) | ||
417 | { | ||
418 | string name = null; | ||
419 | |||
420 | if (16 > i && specialPermissions.Length > i) | ||
421 | { | ||
422 | name = specialPermissions[i]; | ||
423 | } | ||
424 | else if (28 > i && UtilConstants.StandardPermissions.Length > (i - 16)) | ||
425 | { | ||
426 | name = UtilConstants.StandardPermissions[i - 16]; | ||
427 | } | ||
428 | else if (0 <= (i - 28) && UtilConstants.GenericPermissions.Length > (i - 28)) | ||
429 | { | ||
430 | name = UtilConstants.GenericPermissions[i - 28]; | ||
431 | } | ||
432 | |||
433 | if (null == name) | ||
434 | { | ||
435 | this.Core.OnMessage(WixWarnings.UnknownPermission(row.SourceLineNumbers, row.Table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), i)); | ||
436 | } | ||
437 | else | ||
438 | { | ||
439 | switch (name) | ||
440 | { | ||
441 | case "ChangePermission": | ||
442 | fileSharePermission.ChangePermission = Util.YesNoType.yes; | ||
443 | break; | ||
444 | case "CreateChild": | ||
445 | fileSharePermission.CreateChild = Util.YesNoType.yes; | ||
446 | break; | ||
447 | case "CreateFile": | ||
448 | fileSharePermission.CreateFile = Util.YesNoType.yes; | ||
449 | break; | ||
450 | case "Delete": | ||
451 | fileSharePermission.Delete = Util.YesNoType.yes; | ||
452 | break; | ||
453 | case "DeleteChild": | ||
454 | fileSharePermission.DeleteChild = Util.YesNoType.yes; | ||
455 | break; | ||
456 | case "GenericAll": | ||
457 | fileSharePermission.GenericAll = Util.YesNoType.yes; | ||
458 | break; | ||
459 | case "GenericExecute": | ||
460 | fileSharePermission.GenericExecute = Util.YesNoType.yes; | ||
461 | break; | ||
462 | case "GenericRead": | ||
463 | fileSharePermission.GenericRead = Util.YesNoType.yes; | ||
464 | break; | ||
465 | case "GenericWrite": | ||
466 | fileSharePermission.GenericWrite = Util.YesNoType.yes; | ||
467 | break; | ||
468 | case "Read": | ||
469 | fileSharePermission.Read = Util.YesNoType.yes; | ||
470 | break; | ||
471 | case "ReadAttributes": | ||
472 | fileSharePermission.ReadAttributes = Util.YesNoType.yes; | ||
473 | break; | ||
474 | case "ReadExtendedAttributes": | ||
475 | fileSharePermission.ReadExtendedAttributes = Util.YesNoType.yes; | ||
476 | break; | ||
477 | case "ReadPermission": | ||
478 | fileSharePermission.ReadPermission = Util.YesNoType.yes; | ||
479 | break; | ||
480 | case "Synchronize": | ||
481 | fileSharePermission.Synchronize = Util.YesNoType.yes; | ||
482 | break; | ||
483 | case "TakeOwnership": | ||
484 | fileSharePermission.TakeOwnership = Util.YesNoType.yes; | ||
485 | break; | ||
486 | case "Traverse": | ||
487 | fileSharePermission.Traverse = Util.YesNoType.yes; | ||
488 | break; | ||
489 | case "WriteAttributes": | ||
490 | fileSharePermission.WriteAttributes = Util.YesNoType.yes; | ||
491 | break; | ||
492 | case "WriteExtendedAttributes": | ||
493 | fileSharePermission.WriteExtendedAttributes = Util.YesNoType.yes; | ||
494 | break; | ||
495 | default: | ||
496 | Debug.Fail(String.Format("Unknown permission '{0}'.", name)); | ||
497 | break; | ||
498 | } | ||
499 | } | ||
500 | } | ||
501 | } | ||
502 | |||
503 | Util.FileShare fileShare = (Util.FileShare)this.Core.GetIndexedElement("FileShare", (string)row[0]); | ||
504 | if (null != fileShare) | ||
505 | { | ||
506 | fileShare.AddChild(fileSharePermission); | ||
507 | } | ||
508 | else | ||
509 | { | ||
510 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "FileShare_", (string)row[0], "FileShare")); | ||
511 | } | ||
512 | } | ||
513 | } | ||
514 | |||
515 | /// <summary> | ||
516 | /// Decompile the Group table. | ||
517 | /// </summary> | ||
518 | /// <param name="table">The table to decompile.</param> | ||
519 | private void DecompileGroupTable(Table table) | ||
520 | { | ||
521 | foreach (Row row in table.Rows) | ||
522 | { | ||
523 | Util.Group group = new Util.Group(); | ||
524 | |||
525 | group.Id = (string)row[0]; | ||
526 | |||
527 | if (null != row[1]) | ||
528 | { | ||
529 | this.Core.OnMessage(WixWarnings.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "Component_", (string)row[1])); | ||
530 | } | ||
531 | |||
532 | group.Name = (string)row[2]; | ||
533 | |||
534 | if (null != row[3]) | ||
535 | { | ||
536 | group.Domain = (string)row[3]; | ||
537 | } | ||
538 | |||
539 | this.Core.RootElement.AddChild(group); | ||
540 | } | ||
541 | } | ||
542 | |||
543 | /// <summary> | ||
544 | /// Decompile the WixInternetShortcut table. | ||
545 | /// </summary> | ||
546 | /// <param name="table">The table to decompile.</param> | ||
547 | private void DecompileWixInternetShortcutTable(Table table) | ||
548 | { | ||
549 | foreach (Row row in table.Rows) | ||
550 | { | ||
551 | Util.InternetShortcut internetShortcut = new Util.InternetShortcut(); | ||
552 | internetShortcut.Id = (string)row[0]; | ||
553 | internetShortcut.Directory = (string)row[2]; | ||
554 | // remove .lnk/.url extension because compiler extension adds it back for us | ||
555 | internetShortcut.Name = Path.ChangeExtension((string)row[3], null); | ||
556 | internetShortcut.Target = (string)row[4]; | ||
557 | internetShortcut.IconFile = (string)row[6]; | ||
558 | internetShortcut.IconIndex = (int)row[7]; | ||
559 | |||
560 | UtilCompiler.InternetShortcutType shortcutType = (UtilCompiler.InternetShortcutType)row[5]; | ||
561 | switch (shortcutType) | ||
562 | { | ||
563 | case UtilCompiler.InternetShortcutType.Link: | ||
564 | internetShortcut.Type = Util.InternetShortcut.TypeType.link; | ||
565 | break; | ||
566 | case UtilCompiler.InternetShortcutType.Url: | ||
567 | internetShortcut.Type = Util.InternetShortcut.TypeType.url; | ||
568 | break; | ||
569 | } | ||
570 | |||
571 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
572 | if (null != component) | ||
573 | { | ||
574 | component.AddChild(internetShortcut); | ||
575 | } | ||
576 | else | ||
577 | { | ||
578 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component")); | ||
579 | } | ||
580 | |||
581 | this.Core.IndexElement(row, internetShortcut); | ||
582 | } | ||
583 | } | ||
584 | |||
585 | /// <summary> | ||
586 | /// Decompile the Perfmon table. | ||
587 | /// </summary> | ||
588 | /// <param name="table">The table to decompile.</param> | ||
589 | private void DecompilePerfmonTable(Table table) | ||
590 | { | ||
591 | foreach (Row row in table.Rows) | ||
592 | { | ||
593 | Util.PerfCounter perfCounter = new Util.PerfCounter(); | ||
594 | |||
595 | perfCounter.Name = (string)row[2]; | ||
596 | |||
597 | this.Core.IndexElement(row, perfCounter); | ||
598 | } | ||
599 | } | ||
600 | |||
601 | /// <summary> | ||
602 | /// Decompile the PerfmonManifest table. | ||
603 | /// </summary> | ||
604 | /// <param name="table">The table to decompile.</param> | ||
605 | private void DecompilePerfmonManifestTable(Table table) | ||
606 | { | ||
607 | foreach (Row row in table.Rows) | ||
608 | { | ||
609 | Util.PerfCounterManifest perfCounterManifest = new Util.PerfCounterManifest(); | ||
610 | |||
611 | perfCounterManifest.ResourceFileDirectory = (string)row[2]; | ||
612 | |||
613 | this.Core.IndexElement(row, perfCounterManifest); | ||
614 | } | ||
615 | } | ||
616 | |||
617 | /// <summary> | ||
618 | /// Decompile the EventManifest table. | ||
619 | /// </summary> | ||
620 | /// <param name="table">The table to decompile.</param> | ||
621 | private void DecompileEventManifestTable(Table table) | ||
622 | { | ||
623 | foreach (Row row in table.Rows) | ||
624 | { | ||
625 | Util.EventManifest eventManifest = new Util.EventManifest(); | ||
626 | this.Core.IndexElement(row, eventManifest); | ||
627 | } | ||
628 | } | ||
629 | |||
630 | /// <summary> | ||
631 | /// Decompile the SecureObjects table. | ||
632 | /// </summary> | ||
633 | /// <param name="table">The table to decompile.</param> | ||
634 | private void DecompileSecureObjectsTable(Table table) | ||
635 | { | ||
636 | foreach (Row row in table.Rows) | ||
637 | { | ||
638 | Util.PermissionEx permissionEx = new Util.PermissionEx(); | ||
639 | |||
640 | string[] specialPermissions; | ||
641 | switch ((string)row[1]) | ||
642 | { | ||
643 | case "CreateFolder": | ||
644 | specialPermissions = UtilConstants.FolderPermissions; | ||
645 | break; | ||
646 | case "File": | ||
647 | specialPermissions = UtilConstants.FilePermissions; | ||
648 | break; | ||
649 | case "Registry": | ||
650 | specialPermissions = UtilConstants.RegistryPermissions; | ||
651 | break; | ||
652 | case "ServiceInstall": | ||
653 | specialPermissions = UtilConstants.ServicePermissions; | ||
654 | break; | ||
655 | default: | ||
656 | this.Core.OnMessage(WixWarnings.IllegalColumnValue(row.SourceLineNumbers, row.Table.Name, row.Fields[1].Column.Name, row[1])); | ||
657 | return; | ||
658 | } | ||
659 | |||
660 | int permissionBits = (int)row[4]; | ||
661 | for (int i = 0; i < 32; i++) | ||
662 | { | ||
663 | if (0 != ((permissionBits >> i) & 1)) | ||
664 | { | ||
665 | string name = null; | ||
666 | |||
667 | if (16 > i && specialPermissions.Length > i) | ||
668 | { | ||
669 | name = specialPermissions[i]; | ||
670 | } | ||
671 | else if (28 > i && UtilConstants.StandardPermissions.Length > (i - 16)) | ||
672 | { | ||
673 | name = UtilConstants.StandardPermissions[i - 16]; | ||
674 | } | ||
675 | else if (0 <= (i - 28) && UtilConstants.GenericPermissions.Length > (i - 28)) | ||
676 | { | ||
677 | name = UtilConstants.GenericPermissions[i - 28]; | ||
678 | } | ||
679 | |||
680 | if (null == name) | ||
681 | { | ||
682 | this.Core.OnMessage(WixWarnings.UnknownPermission(row.SourceLineNumbers, row.Table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), i)); | ||
683 | } | ||
684 | else | ||
685 | { | ||
686 | switch (name) | ||
687 | { | ||
688 | case "Append": | ||
689 | permissionEx.Append = Util.YesNoType.yes; | ||
690 | break; | ||
691 | case "ChangePermission": | ||
692 | permissionEx.ChangePermission = Util.YesNoType.yes; | ||
693 | break; | ||
694 | case "CreateChild": | ||
695 | permissionEx.CreateChild = Util.YesNoType.yes; | ||
696 | break; | ||
697 | case "CreateFile": | ||
698 | permissionEx.CreateFile = Util.YesNoType.yes; | ||
699 | break; | ||
700 | case "CreateLink": | ||
701 | permissionEx.CreateLink = Util.YesNoType.yes; | ||
702 | break; | ||
703 | case "CreateSubkeys": | ||
704 | permissionEx.CreateSubkeys = Util.YesNoType.yes; | ||
705 | break; | ||
706 | case "Delete": | ||
707 | permissionEx.Delete = Util.YesNoType.yes; | ||
708 | break; | ||
709 | case "DeleteChild": | ||
710 | permissionEx.DeleteChild = Util.YesNoType.yes; | ||
711 | break; | ||
712 | case "EnumerateSubkeys": | ||
713 | permissionEx.EnumerateSubkeys = Util.YesNoType.yes; | ||
714 | break; | ||
715 | case "Execute": | ||
716 | permissionEx.Execute = Util.YesNoType.yes; | ||
717 | break; | ||
718 | case "GenericAll": | ||
719 | permissionEx.GenericAll = Util.YesNoType.yes; | ||
720 | break; | ||
721 | case "GenericExecute": | ||
722 | permissionEx.GenericExecute = Util.YesNoType.yes; | ||
723 | break; | ||
724 | case "GenericRead": | ||
725 | permissionEx.GenericRead = Util.YesNoType.yes; | ||
726 | break; | ||
727 | case "GenericWrite": | ||
728 | permissionEx.GenericWrite = Util.YesNoType.yes; | ||
729 | break; | ||
730 | case "Notify": | ||
731 | permissionEx.Notify = Util.YesNoType.yes; | ||
732 | break; | ||
733 | case "Read": | ||
734 | permissionEx.Read = Util.YesNoType.yes; | ||
735 | break; | ||
736 | case "ReadAttributes": | ||
737 | permissionEx.ReadAttributes = Util.YesNoType.yes; | ||
738 | break; | ||
739 | case "ReadExtendedAttributes": | ||
740 | permissionEx.ReadExtendedAttributes = Util.YesNoType.yes; | ||
741 | break; | ||
742 | case "ReadPermission": | ||
743 | permissionEx.ReadPermission = Util.YesNoType.yes; | ||
744 | break; | ||
745 | case "ServiceChangeConfig": | ||
746 | permissionEx.ServiceChangeConfig = Util.YesNoType.yes; | ||
747 | break; | ||
748 | case "ServiceEnumerateDependents": | ||
749 | permissionEx.ServiceEnumerateDependents = Util.YesNoType.yes; | ||
750 | break; | ||
751 | case "ServiceInterrogate": | ||
752 | permissionEx.ServiceInterrogate = Util.YesNoType.yes; | ||
753 | break; | ||
754 | case "ServicePauseContinue": | ||
755 | permissionEx.ServicePauseContinue = Util.YesNoType.yes; | ||
756 | break; | ||
757 | case "ServiceQueryConfig": | ||
758 | permissionEx.ServiceQueryConfig = Util.YesNoType.yes; | ||
759 | break; | ||
760 | case "ServiceQueryStatus": | ||
761 | permissionEx.ServiceQueryStatus = Util.YesNoType.yes; | ||
762 | break; | ||
763 | case "ServiceStart": | ||
764 | permissionEx.ServiceStart = Util.YesNoType.yes; | ||
765 | break; | ||
766 | case "ServiceStop": | ||
767 | permissionEx.ServiceStop = Util.YesNoType.yes; | ||
768 | break; | ||
769 | case "ServiceUserDefinedControl": | ||
770 | permissionEx.ServiceUserDefinedControl = Util.YesNoType.yes; | ||
771 | break; | ||
772 | case "Synchronize": | ||
773 | permissionEx.Synchronize = Util.YesNoType.yes; | ||
774 | break; | ||
775 | case "TakeOwnership": | ||
776 | permissionEx.TakeOwnership = Util.YesNoType.yes; | ||
777 | break; | ||
778 | case "Traverse": | ||
779 | permissionEx.Traverse = Util.YesNoType.yes; | ||
780 | break; | ||
781 | case "Write": | ||
782 | permissionEx.Write = Util.YesNoType.yes; | ||
783 | break; | ||
784 | case "WriteAttributes": | ||
785 | permissionEx.WriteAttributes = Util.YesNoType.yes; | ||
786 | break; | ||
787 | case "WriteExtendedAttributes": | ||
788 | permissionEx.WriteExtendedAttributes = Util.YesNoType.yes; | ||
789 | break; | ||
790 | default: | ||
791 | throw new InvalidOperationException(String.Format("Unknown permission attribute '{0}'.", name)); | ||
792 | } | ||
793 | } | ||
794 | } | ||
795 | } | ||
796 | |||
797 | if (null != row[2]) | ||
798 | { | ||
799 | permissionEx.Domain = (string)row[2]; | ||
800 | } | ||
801 | |||
802 | permissionEx.User = (string)row[3]; | ||
803 | |||
804 | this.Core.IndexElement(row, permissionEx); | ||
805 | } | ||
806 | } | ||
807 | |||
808 | /// <summary> | ||
809 | /// Decompile the ServiceConfig table. | ||
810 | /// </summary> | ||
811 | /// <param name="table">The table to decompile.</param> | ||
812 | private void DecompileServiceConfigTable(Table table) | ||
813 | { | ||
814 | foreach (Row row in table.Rows) | ||
815 | { | ||
816 | Util.ServiceConfig serviceConfig = new Util.ServiceConfig(); | ||
817 | |||
818 | serviceConfig.ServiceName = (string)row[0]; | ||
819 | |||
820 | switch ((string)row[3]) | ||
821 | { | ||
822 | case "none": | ||
823 | serviceConfig.FirstFailureActionType = Util.ServiceConfig.FirstFailureActionTypeType.none; | ||
824 | break; | ||
825 | case "reboot": | ||
826 | serviceConfig.FirstFailureActionType = Util.ServiceConfig.FirstFailureActionTypeType.reboot; | ||
827 | break; | ||
828 | case "restart": | ||
829 | serviceConfig.FirstFailureActionType = Util.ServiceConfig.FirstFailureActionTypeType.restart; | ||
830 | break; | ||
831 | case "runCommand": | ||
832 | serviceConfig.FirstFailureActionType = Util.ServiceConfig.FirstFailureActionTypeType.runCommand; | ||
833 | break; | ||
834 | default: | ||
835 | this.Core.OnMessage(WixWarnings.IllegalColumnValue(row.SourceLineNumbers, table.Name, row.Fields[3].Column.Name, row[3])); | ||
836 | break; | ||
837 | } | ||
838 | |||
839 | switch ((string)row[4]) | ||
840 | { | ||
841 | case "none": | ||
842 | serviceConfig.SecondFailureActionType = Util.ServiceConfig.SecondFailureActionTypeType.none; | ||
843 | break; | ||
844 | case "reboot": | ||
845 | serviceConfig.SecondFailureActionType = Util.ServiceConfig.SecondFailureActionTypeType.reboot; | ||
846 | break; | ||
847 | case "restart": | ||
848 | serviceConfig.SecondFailureActionType = Util.ServiceConfig.SecondFailureActionTypeType.restart; | ||
849 | break; | ||
850 | case "runCommand": | ||
851 | serviceConfig.SecondFailureActionType = Util.ServiceConfig.SecondFailureActionTypeType.runCommand; | ||
852 | break; | ||
853 | default: | ||
854 | this.Core.OnMessage(WixWarnings.IllegalColumnValue(row.SourceLineNumbers, table.Name, row.Fields[4].Column.Name, row[4])); | ||
855 | break; | ||
856 | } | ||
857 | |||
858 | switch ((string)row[5]) | ||
859 | { | ||
860 | case "none": | ||
861 | serviceConfig.ThirdFailureActionType = Util.ServiceConfig.ThirdFailureActionTypeType.none; | ||
862 | break; | ||
863 | case "reboot": | ||
864 | serviceConfig.ThirdFailureActionType = Util.ServiceConfig.ThirdFailureActionTypeType.reboot; | ||
865 | break; | ||
866 | case "restart": | ||
867 | serviceConfig.ThirdFailureActionType = Util.ServiceConfig.ThirdFailureActionTypeType.restart; | ||
868 | break; | ||
869 | case "runCommand": | ||
870 | serviceConfig.ThirdFailureActionType = Util.ServiceConfig.ThirdFailureActionTypeType.runCommand; | ||
871 | break; | ||
872 | default: | ||
873 | this.Core.OnMessage(WixWarnings.IllegalColumnValue(row.SourceLineNumbers, table.Name, row.Fields[5].Column.Name, row[5])); | ||
874 | break; | ||
875 | } | ||
876 | |||
877 | if (null != row[6]) | ||
878 | { | ||
879 | serviceConfig.ResetPeriodInDays = (int)row[6]; | ||
880 | } | ||
881 | |||
882 | if (null != row[7]) | ||
883 | { | ||
884 | serviceConfig.RestartServiceDelayInSeconds = (int)row[7]; | ||
885 | } | ||
886 | |||
887 | if (null != row[8]) | ||
888 | { | ||
889 | serviceConfig.ProgramCommandLine = (string)row[8]; | ||
890 | } | ||
891 | |||
892 | if (null != row[9]) | ||
893 | { | ||
894 | serviceConfig.RebootMessage = (string)row[9]; | ||
895 | } | ||
896 | |||
897 | this.Core.IndexElement(row, serviceConfig); | ||
898 | } | ||
899 | } | ||
900 | |||
901 | /// <summary> | ||
902 | /// Decompile the User table. | ||
903 | /// </summary> | ||
904 | /// <param name="table">The table to decompile.</param> | ||
905 | private void DecompileUserTable(Table table) | ||
906 | { | ||
907 | foreach (Row row in table.Rows) | ||
908 | { | ||
909 | Util.User user = new Util.User(); | ||
910 | |||
911 | user.Id = (string)row[0]; | ||
912 | |||
913 | user.Name = (string)row[2]; | ||
914 | |||
915 | if (null != row[3]) | ||
916 | { | ||
917 | user.Domain = (string)row[3]; | ||
918 | } | ||
919 | |||
920 | if (null != row[4]) | ||
921 | { | ||
922 | user.Password = (string)row[4]; | ||
923 | } | ||
924 | |||
925 | if (null != row[5]) | ||
926 | { | ||
927 | int attributes = (int)row[5]; | ||
928 | |||
929 | if (UtilCompiler.UserDontExpirePasswrd == (attributes & UtilCompiler.UserDontExpirePasswrd)) | ||
930 | { | ||
931 | user.PasswordNeverExpires = Util.YesNoType.yes; | ||
932 | } | ||
933 | |||
934 | if (UtilCompiler.UserPasswdCantChange == (attributes & UtilCompiler.UserPasswdCantChange)) | ||
935 | { | ||
936 | user.CanNotChangePassword = Util.YesNoType.yes; | ||
937 | } | ||
938 | |||
939 | if (UtilCompiler.UserPasswdChangeReqdOnLogin == (attributes & UtilCompiler.UserPasswdChangeReqdOnLogin)) | ||
940 | { | ||
941 | user.PasswordExpired = Util.YesNoType.yes; | ||
942 | } | ||
943 | |||
944 | if (UtilCompiler.UserDisableAccount == (attributes & UtilCompiler.UserDisableAccount)) | ||
945 | { | ||
946 | user.Disabled = Util.YesNoType.yes; | ||
947 | } | ||
948 | |||
949 | if (UtilCompiler.UserFailIfExists == (attributes & UtilCompiler.UserFailIfExists)) | ||
950 | { | ||
951 | user.FailIfExists = Util.YesNoType.yes; | ||
952 | } | ||
953 | |||
954 | if (UtilCompiler.UserUpdateIfExists == (attributes & UtilCompiler.UserUpdateIfExists)) | ||
955 | { | ||
956 | user.UpdateIfExists = Util.YesNoType.yes; | ||
957 | } | ||
958 | |||
959 | if (UtilCompiler.UserLogonAsService == (attributes & UtilCompiler.UserLogonAsService)) | ||
960 | { | ||
961 | user.LogonAsService = Util.YesNoType.yes; | ||
962 | } | ||
963 | |||
964 | if (UtilCompiler.UserDontRemoveOnUninstall == (attributes & UtilCompiler.UserDontRemoveOnUninstall)) | ||
965 | { | ||
966 | user.RemoveOnUninstall = Util.YesNoType.no; | ||
967 | } | ||
968 | |||
969 | if (UtilCompiler.UserDontCreateUser == (attributes & UtilCompiler.UserDontCreateUser)) | ||
970 | { | ||
971 | user.CreateUser = Util.YesNoType.no; | ||
972 | } | ||
973 | |||
974 | if (UtilCompiler.UserNonVital == (attributes & UtilCompiler.UserNonVital)) | ||
975 | { | ||
976 | user.Vital = Util.YesNoType.no; | ||
977 | } | ||
978 | } | ||
979 | |||
980 | if (null != row[1]) | ||
981 | { | ||
982 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
983 | |||
984 | if (null != component) | ||
985 | { | ||
986 | component.AddChild(user); | ||
987 | } | ||
988 | else | ||
989 | { | ||
990 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component")); | ||
991 | } | ||
992 | } | ||
993 | else | ||
994 | { | ||
995 | this.Core.RootElement.AddChild(user); | ||
996 | } | ||
997 | this.Core.IndexElement(row, user); | ||
998 | } | ||
999 | } | ||
1000 | |||
1001 | /// <summary> | ||
1002 | /// Decompile the UserGroup table. | ||
1003 | /// </summary> | ||
1004 | /// <param name="table">The table to decompile.</param> | ||
1005 | private void DecompileUserGroupTable(Table table) | ||
1006 | { | ||
1007 | foreach (Row row in table.Rows) | ||
1008 | { | ||
1009 | Util.User user = (Util.User)this.Core.GetIndexedElement("User", (string)row[0]); | ||
1010 | |||
1011 | if (null != user) | ||
1012 | { | ||
1013 | Util.GroupRef groupRef = new Util.GroupRef(); | ||
1014 | |||
1015 | groupRef.Id = (string)row[1]; | ||
1016 | |||
1017 | user.AddChild(groupRef); | ||
1018 | } | ||
1019 | else | ||
1020 | { | ||
1021 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Group_", (string)row[0], "Group")); | ||
1022 | } | ||
1023 | } | ||
1024 | } | ||
1025 | |||
1026 | /// <summary> | ||
1027 | /// Decompile the XmlConfig table. | ||
1028 | /// </summary> | ||
1029 | /// <param name="table">The table to decompile.</param> | ||
1030 | private void DecompileXmlConfigTable(Table table) | ||
1031 | { | ||
1032 | foreach (Row row in table.Rows) | ||
1033 | { | ||
1034 | Util.XmlConfig xmlConfig = new Util.XmlConfig(); | ||
1035 | |||
1036 | xmlConfig.Id = (string)row[0]; | ||
1037 | |||
1038 | xmlConfig.File = (string)row[1]; | ||
1039 | |||
1040 | xmlConfig.ElementPath = (string)row[2]; | ||
1041 | |||
1042 | if (null != row[3]) | ||
1043 | { | ||
1044 | xmlConfig.VerifyPath = (string)row[3]; | ||
1045 | } | ||
1046 | |||
1047 | if (null != row[4]) | ||
1048 | { | ||
1049 | xmlConfig.Name = (string)row[4]; | ||
1050 | } | ||
1051 | |||
1052 | if (null != row[5]) | ||
1053 | { | ||
1054 | xmlConfig.Value = (string)row[5]; | ||
1055 | } | ||
1056 | |||
1057 | int flags = (int)row[6]; | ||
1058 | |||
1059 | if (0x1 == (flags & 0x1)) | ||
1060 | { | ||
1061 | xmlConfig.Node = Util.XmlConfig.NodeType.element; | ||
1062 | } | ||
1063 | else if (0x2 == (flags & 0x2)) | ||
1064 | { | ||
1065 | xmlConfig.Node = Util.XmlConfig.NodeType.value; | ||
1066 | } | ||
1067 | else if (0x4 == (flags & 0x4)) | ||
1068 | { | ||
1069 | xmlConfig.Node = Util.XmlConfig.NodeType.document; | ||
1070 | } | ||
1071 | |||
1072 | if (0x10 == (flags & 0x10)) | ||
1073 | { | ||
1074 | xmlConfig.Action = Util.XmlConfig.ActionType.create; | ||
1075 | } | ||
1076 | else if (0x20 == (flags & 0x20)) | ||
1077 | { | ||
1078 | xmlConfig.Action = Util.XmlConfig.ActionType.delete; | ||
1079 | } | ||
1080 | |||
1081 | if (0x100 == (flags & 0x100)) | ||
1082 | { | ||
1083 | xmlConfig.On = Util.XmlConfig.OnType.install; | ||
1084 | } | ||
1085 | else if (0x200 == (flags & 0x200)) | ||
1086 | { | ||
1087 | xmlConfig.On = Util.XmlConfig.OnType.uninstall; | ||
1088 | } | ||
1089 | |||
1090 | if (0x00001000 == (flags & 0x00001000)) | ||
1091 | { | ||
1092 | xmlConfig.PreserveModifiedDate = Util.YesNoType.yes; | ||
1093 | } | ||
1094 | |||
1095 | if (null != row[8]) | ||
1096 | { | ||
1097 | xmlConfig.Sequence = (int)row[8]; | ||
1098 | } | ||
1099 | |||
1100 | this.Core.IndexElement(row, xmlConfig); | ||
1101 | } | ||
1102 | } | ||
1103 | |||
1104 | /// <summary> | ||
1105 | /// Finalize the Perfmon table. | ||
1106 | /// </summary> | ||
1107 | /// <param name="tables">The collection of all tables.</param> | ||
1108 | /// <remarks> | ||
1109 | /// Since the PerfCounter element nests under a File element, but | ||
1110 | /// the Perfmon table does not have a foreign key relationship with | ||
1111 | /// the File table (instead it has a formatted string that usually | ||
1112 | /// refers to a file row - but doesn't have to), the nesting must | ||
1113 | /// be inferred during finalization. | ||
1114 | /// </remarks> | ||
1115 | private void FinalizePerfmonTable(TableIndexedCollection tables) | ||
1116 | { | ||
1117 | Table perfmonTable = tables["Perfmon"]; | ||
1118 | |||
1119 | if (null != perfmonTable) | ||
1120 | { | ||
1121 | foreach (Row row in perfmonTable.Rows) | ||
1122 | { | ||
1123 | string formattedFile = (string)row[1]; | ||
1124 | Util.PerfCounter perfCounter = (Util.PerfCounter)this.Core.GetIndexedElement(row); | ||
1125 | |||
1126 | // try to "de-format" the File column's value to determine the proper parent File element | ||
1127 | if ((formattedFile.StartsWith("[#", StringComparison.Ordinal) || formattedFile.StartsWith("[!", StringComparison.Ordinal)) | ||
1128 | && formattedFile.EndsWith("]", StringComparison.Ordinal)) | ||
1129 | { | ||
1130 | string fileId = formattedFile.Substring(2, formattedFile.Length - 3); | ||
1131 | |||
1132 | Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", fileId); | ||
1133 | if (null != file) | ||
1134 | { | ||
1135 | file.AddChild(perfCounter); | ||
1136 | } | ||
1137 | else | ||
1138 | { | ||
1139 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, perfmonTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File", formattedFile, "File")); | ||
1140 | } | ||
1141 | } | ||
1142 | else | ||
1143 | { | ||
1144 | this.Core.OnMessage(UtilErrors.IllegalFileValueInPerfmonOrManifest(formattedFile, "Perfmon")); | ||
1145 | } | ||
1146 | } | ||
1147 | } | ||
1148 | } | ||
1149 | |||
1150 | /// <summary> | ||
1151 | /// Finalize the PerfmonManifest table. | ||
1152 | /// </summary> | ||
1153 | /// <param name="tables">The collection of all tables.</param> | ||
1154 | private void FinalizePerfmonManifestTable(TableIndexedCollection tables) | ||
1155 | { | ||
1156 | Table perfmonManifestTable = tables["PerfmonManifest"]; | ||
1157 | |||
1158 | if (null != perfmonManifestTable) | ||
1159 | { | ||
1160 | foreach (Row row in perfmonManifestTable.Rows) | ||
1161 | { | ||
1162 | string formattedFile = (string)row[1]; | ||
1163 | Util.PerfCounterManifest perfCounterManifest = (Util.PerfCounterManifest)this.Core.GetIndexedElement(row); | ||
1164 | |||
1165 | // try to "de-format" the File column's value to determine the proper parent File element | ||
1166 | if ((formattedFile.StartsWith("[#", StringComparison.Ordinal) || formattedFile.StartsWith("[!", StringComparison.Ordinal)) | ||
1167 | && formattedFile.EndsWith("]", StringComparison.Ordinal)) | ||
1168 | { | ||
1169 | string fileId = formattedFile.Substring(2, formattedFile.Length - 3); | ||
1170 | |||
1171 | Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", fileId); | ||
1172 | if (null != file) | ||
1173 | { | ||
1174 | file.AddChild(perfCounterManifest); | ||
1175 | } | ||
1176 | else | ||
1177 | { | ||
1178 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, perfCounterManifest.ResourceFileDirectory, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File", formattedFile, "File")); | ||
1179 | } | ||
1180 | } | ||
1181 | else | ||
1182 | { | ||
1183 | this.Core.OnMessage(UtilErrors.IllegalFileValueInPerfmonOrManifest(formattedFile, "PerfmonManifest")); | ||
1184 | } | ||
1185 | } | ||
1186 | } | ||
1187 | } | ||
1188 | |||
1189 | /// <summary> | ||
1190 | /// Finalize the SecureObjects table. | ||
1191 | /// </summary> | ||
1192 | /// <param name="tables">The collection of all tables.</param> | ||
1193 | /// <remarks> | ||
1194 | /// Nests the PermissionEx elements below their parent elements. There are no declared foreign | ||
1195 | /// keys for the parents of the SecureObjects table. | ||
1196 | /// </remarks> | ||
1197 | private void FinalizeSecureObjectsTable(TableIndexedCollection tables) | ||
1198 | { | ||
1199 | Table createFolderTable = tables["CreateFolder"]; | ||
1200 | Table secureObjectsTable = tables["SecureObjects"]; | ||
1201 | |||
1202 | Hashtable createFolders = new Hashtable(); | ||
1203 | |||
1204 | // index the CreateFolder table because the foreign key to this table from the | ||
1205 | // LockPermissions table is only part of the primary key of this table | ||
1206 | if (null != createFolderTable) | ||
1207 | { | ||
1208 | foreach (Row row in createFolderTable.Rows) | ||
1209 | { | ||
1210 | Wix.CreateFolder createFolder = (Wix.CreateFolder)this.Core.GetIndexedElement(row); | ||
1211 | string directoryId = (string)row[0]; | ||
1212 | |||
1213 | if (!createFolders.Contains(directoryId)) | ||
1214 | { | ||
1215 | createFolders.Add(directoryId, new ArrayList()); | ||
1216 | } | ||
1217 | ((ArrayList)createFolders[directoryId]).Add(createFolder); | ||
1218 | } | ||
1219 | } | ||
1220 | |||
1221 | if (null != secureObjectsTable) | ||
1222 | { | ||
1223 | foreach (Row row in secureObjectsTable.Rows) | ||
1224 | { | ||
1225 | string id = (string)row[0]; | ||
1226 | string table = (string)row[1]; | ||
1227 | |||
1228 | Util.PermissionEx permissionEx = (Util.PermissionEx)this.Core.GetIndexedElement(row); | ||
1229 | |||
1230 | if ("CreateFolder" == table) | ||
1231 | { | ||
1232 | ArrayList createFolderElements = (ArrayList)createFolders[id]; | ||
1233 | |||
1234 | if (null != createFolderElements) | ||
1235 | { | ||
1236 | foreach (Wix.CreateFolder createFolder in createFolderElements) | ||
1237 | { | ||
1238 | createFolder.AddChild(permissionEx); | ||
1239 | } | ||
1240 | } | ||
1241 | else | ||
1242 | { | ||
1243 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, "SecureObjects", row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "LockObject", id, table)); | ||
1244 | } | ||
1245 | } | ||
1246 | else | ||
1247 | { | ||
1248 | Wix.IParentElement parentElement = (Wix.IParentElement)this.Core.GetIndexedElement(table, id); | ||
1249 | |||
1250 | if (null != parentElement) | ||
1251 | { | ||
1252 | parentElement.AddChild(permissionEx); | ||
1253 | } | ||
1254 | else | ||
1255 | { | ||
1256 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, "SecureObjects", row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "LockObject", id, table)); | ||
1257 | } | ||
1258 | } | ||
1259 | } | ||
1260 | } | ||
1261 | } | ||
1262 | |||
1263 | /// <summary> | ||
1264 | /// Finalize the ServiceConfig table. | ||
1265 | /// </summary> | ||
1266 | /// <param name="tables">The collection of all tables.</param> | ||
1267 | /// <remarks> | ||
1268 | /// Since there is no foreign key from the ServiceName column to the | ||
1269 | /// ServiceInstall table, this relationship must be handled late. | ||
1270 | /// </remarks> | ||
1271 | private void FinalizeServiceConfigTable(TableIndexedCollection tables) | ||
1272 | { | ||
1273 | Table serviceConfigTable = tables["ServiceConfig"]; | ||
1274 | Table serviceInstallTable = tables["ServiceInstall"]; | ||
1275 | |||
1276 | Hashtable serviceInstalls = new Hashtable(); | ||
1277 | |||
1278 | // index the ServiceInstall table because the foreign key used by the ServiceConfig | ||
1279 | // table is actually the ServiceInstall.Name, not the ServiceInstall.ServiceInstall | ||
1280 | // this is unfortunate because the service Name is not guaranteed to be unique, so | ||
1281 | // decompiler must assume there could be multiple matches and add the ServiceConfig to each | ||
1282 | // TODO: the Component column information should be taken into acount to accurately identify | ||
1283 | // the correct column to use | ||
1284 | if (null != serviceInstallTable) | ||
1285 | { | ||
1286 | foreach (Row row in serviceInstallTable.Rows) | ||
1287 | { | ||
1288 | string name = (string)row[1]; | ||
1289 | Wix.ServiceInstall serviceInstall = (Wix.ServiceInstall)this.Core.GetIndexedElement(row); | ||
1290 | |||
1291 | if (!serviceInstalls.Contains(name)) | ||
1292 | { | ||
1293 | serviceInstalls.Add(name, new ArrayList()); | ||
1294 | } | ||
1295 | |||
1296 | ((ArrayList)serviceInstalls[name]).Add(serviceInstall); | ||
1297 | } | ||
1298 | } | ||
1299 | |||
1300 | if (null != serviceConfigTable) | ||
1301 | { | ||
1302 | foreach (Row row in serviceConfigTable.Rows) | ||
1303 | { | ||
1304 | Util.ServiceConfig serviceConfig = (Util.ServiceConfig)this.Core.GetIndexedElement(row); | ||
1305 | |||
1306 | if (0 == (int)row[2]) | ||
1307 | { | ||
1308 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
1309 | |||
1310 | if (null != component) | ||
1311 | { | ||
1312 | component.AddChild(serviceConfig); | ||
1313 | } | ||
1314 | else | ||
1315 | { | ||
1316 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, serviceConfigTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component")); | ||
1317 | } | ||
1318 | } | ||
1319 | else | ||
1320 | { | ||
1321 | ArrayList serviceInstallElements = (ArrayList)serviceInstalls[row[0]]; | ||
1322 | |||
1323 | if (null != serviceInstallElements) | ||
1324 | { | ||
1325 | foreach (Wix.ServiceInstall serviceInstall in serviceInstallElements) | ||
1326 | { | ||
1327 | serviceInstall.AddChild(serviceConfig); | ||
1328 | } | ||
1329 | } | ||
1330 | else | ||
1331 | { | ||
1332 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, serviceConfigTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ServiceName", (string)row[0], "ServiceInstall")); | ||
1333 | } | ||
1334 | } | ||
1335 | } | ||
1336 | } | ||
1337 | } | ||
1338 | |||
1339 | /// <summary> | ||
1340 | /// Finalize the XmlConfig table. | ||
1341 | /// </summary> | ||
1342 | /// <param name="tables">Collection of all tables.</param> | ||
1343 | private void FinalizeXmlConfigTable(TableIndexedCollection tables) | ||
1344 | { | ||
1345 | Table xmlConfigTable = tables["XmlConfig"]; | ||
1346 | |||
1347 | if (null != xmlConfigTable) | ||
1348 | { | ||
1349 | foreach (Row row in xmlConfigTable.Rows) | ||
1350 | { | ||
1351 | Util.XmlConfig xmlConfig = (Util.XmlConfig)this.Core.GetIndexedElement(row); | ||
1352 | |||
1353 | if (null == row[6] || 0 == (int)row[6]) | ||
1354 | { | ||
1355 | Util.XmlConfig parentXmlConfig = (Util.XmlConfig)this.Core.GetIndexedElement("XmlConfig", (string)row[2]); | ||
1356 | |||
1357 | if (null != parentXmlConfig) | ||
1358 | { | ||
1359 | parentXmlConfig.AddChild(xmlConfig); | ||
1360 | } | ||
1361 | else | ||
1362 | { | ||
1363 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, xmlConfigTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ElementPath", (string)row[2], "XmlConfig")); | ||
1364 | } | ||
1365 | } | ||
1366 | else | ||
1367 | { | ||
1368 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[7]); | ||
1369 | |||
1370 | if (null != component) | ||
1371 | { | ||
1372 | component.AddChild(xmlConfig); | ||
1373 | } | ||
1374 | else | ||
1375 | { | ||
1376 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, xmlConfigTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[7], "Component")); | ||
1377 | } | ||
1378 | } | ||
1379 | } | ||
1380 | } | ||
1381 | } | ||
1382 | |||
1383 | |||
1384 | /// <summary> | ||
1385 | /// Finalize the XmlFile table. | ||
1386 | /// </summary> | ||
1387 | /// <param name="tables">The collection of all tables.</param> | ||
1388 | /// <remarks> | ||
1389 | /// Some of the XmlFile table rows are compiler generated from util:EventManifest node | ||
1390 | /// These rows should not be appended to component. | ||
1391 | /// </remarks> | ||
1392 | private void FinalizeXmlFileTable(TableIndexedCollection tables) | ||
1393 | { | ||
1394 | Table xmlFileTable = tables["XmlFile"]; | ||
1395 | Table eventManifestTable = tables["EventManifest"]; | ||
1396 | |||
1397 | if (null != xmlFileTable) | ||
1398 | { | ||
1399 | foreach (Row row in xmlFileTable.Rows) | ||
1400 | { | ||
1401 | bool bManifestGenerated = false; | ||
1402 | string xmlFileConfigId = (string)row[0]; | ||
1403 | if (null != eventManifestTable) | ||
1404 | { | ||
1405 | foreach (Row emrow in eventManifestTable.Rows) | ||
1406 | { | ||
1407 | string formattedFile = (string)emrow[1]; | ||
1408 | if ((formattedFile.StartsWith("[#", StringComparison.Ordinal) || formattedFile.StartsWith("[!", StringComparison.Ordinal)) | ||
1409 | && formattedFile.EndsWith("]", StringComparison.Ordinal)) | ||
1410 | { | ||
1411 | string fileId = formattedFile.Substring(2, formattedFile.Length - 3); | ||
1412 | if (String.Equals(String.Concat("Config_", fileId, "ResourceFile"), xmlFileConfigId)) | ||
1413 | { | ||
1414 | Util.EventManifest eventManifest = (Util.EventManifest)this.Core.GetIndexedElement(emrow); | ||
1415 | if (null != eventManifest) | ||
1416 | { | ||
1417 | eventManifest.ResourceFile = (string)row[4]; | ||
1418 | } | ||
1419 | bManifestGenerated = true; | ||
1420 | } | ||
1421 | |||
1422 | else if (String.Equals(String.Concat("Config_", fileId, "MessageFile"), xmlFileConfigId)) | ||
1423 | { | ||
1424 | Util.EventManifest eventManifest = (Util.EventManifest)this.Core.GetIndexedElement(emrow); | ||
1425 | if (null != eventManifest) | ||
1426 | { | ||
1427 | eventManifest.MessageFile = (string)row[4]; | ||
1428 | } | ||
1429 | bManifestGenerated = true; | ||
1430 | } | ||
1431 | } | ||
1432 | } | ||
1433 | } | ||
1434 | |||
1435 | if (true == bManifestGenerated) | ||
1436 | continue; | ||
1437 | |||
1438 | Util.XmlFile xmlFile = new Util.XmlFile(); | ||
1439 | |||
1440 | xmlFile.Id = (string)row[0]; | ||
1441 | xmlFile.File = (string)row[1]; | ||
1442 | xmlFile.ElementPath = (string)row[2]; | ||
1443 | |||
1444 | if (null != row[3]) | ||
1445 | { | ||
1446 | xmlFile.Name = (string)row[3]; | ||
1447 | } | ||
1448 | |||
1449 | if (null != row[4]) | ||
1450 | { | ||
1451 | xmlFile.Value = (string)row[4]; | ||
1452 | } | ||
1453 | |||
1454 | int flags = (int)row[5]; | ||
1455 | if (0x1 == (flags & 0x1) && 0x2 == (flags & 0x2)) | ||
1456 | { | ||
1457 | this.Core.OnMessage(WixWarnings.IllegalColumnValue(row.SourceLineNumbers, xmlFileTable.Name, row.Fields[5].Column.Name, row[5])); | ||
1458 | } | ||
1459 | else if (0x1 == (flags & 0x1)) | ||
1460 | { | ||
1461 | xmlFile.Action = Util.XmlFile.ActionType.createElement; | ||
1462 | } | ||
1463 | else if (0x2 == (flags & 0x2)) | ||
1464 | { | ||
1465 | xmlFile.Action = Util.XmlFile.ActionType.deleteValue; | ||
1466 | } | ||
1467 | else | ||
1468 | { | ||
1469 | xmlFile.Action = Util.XmlFile.ActionType.setValue; | ||
1470 | } | ||
1471 | |||
1472 | if (0x100 == (flags & 0x100)) | ||
1473 | { | ||
1474 | xmlFile.SelectionLanguage = Util.XmlFile.SelectionLanguageType.XPath; | ||
1475 | } | ||
1476 | |||
1477 | if (0x00001000 == (flags & 0x00001000)) | ||
1478 | { | ||
1479 | xmlFile.PreserveModifiedDate = Util.YesNoType.yes; | ||
1480 | } | ||
1481 | |||
1482 | if (0x00010000 == (flags & 0x00010000)) | ||
1483 | { | ||
1484 | xmlFile.Permanent = Util.YesNoType.yes; | ||
1485 | } | ||
1486 | |||
1487 | if (null != row[7]) | ||
1488 | { | ||
1489 | xmlFile.Sequence = (int)row[7]; | ||
1490 | } | ||
1491 | |||
1492 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[6]); | ||
1493 | |||
1494 | if (null != component) | ||
1495 | { | ||
1496 | component.AddChild(xmlFile); | ||
1497 | } | ||
1498 | else | ||
1499 | { | ||
1500 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, xmlFileTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[6], "Component")); | ||
1501 | } | ||
1502 | } | ||
1503 | } | ||
1504 | } | ||
1505 | |||
1506 | /// <summary> | ||
1507 | /// Finalize the eventManifest table. | ||
1508 | /// This function must be called after FinalizeXmlFileTable | ||
1509 | /// </summary> | ||
1510 | /// <param name="tables">The collection of all tables.</param> | ||
1511 | private void FinalizeEventManifestTable(TableIndexedCollection tables) | ||
1512 | { | ||
1513 | Table eventManifestTable = tables["EventManifest"]; | ||
1514 | |||
1515 | if (null != eventManifestTable) | ||
1516 | { | ||
1517 | foreach (Row row in eventManifestTable.Rows) | ||
1518 | { | ||
1519 | string formattedFile = (string)row[1]; | ||
1520 | Util.EventManifest eventManifest = (Util.EventManifest)this.Core.GetIndexedElement(row); | ||
1521 | |||
1522 | // try to "de-format" the File column's value to determine the proper parent File element | ||
1523 | if ((formattedFile.StartsWith("[#", StringComparison.Ordinal) || formattedFile.StartsWith("[!", StringComparison.Ordinal)) | ||
1524 | && formattedFile.EndsWith("]", StringComparison.Ordinal)) | ||
1525 | { | ||
1526 | string fileId = formattedFile.Substring(2, formattedFile.Length - 3); | ||
1527 | |||
1528 | Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", fileId); | ||
1529 | if (null != file) | ||
1530 | { | ||
1531 | file.AddChild(eventManifest); | ||
1532 | } | ||
1533 | } | ||
1534 | else | ||
1535 | { | ||
1536 | this.Core.OnMessage(UtilErrors.IllegalFileValueInPerfmonOrManifest(formattedFile, "EventManifest")); | ||
1537 | } | ||
1538 | } | ||
1539 | } | ||
1540 | } | ||
1541 | } | ||
1542 | #endif | ||
1543 | } | ||
diff --git a/src/wixext/UtilErrors.cs b/src/wixext/UtilErrors.cs new file mode 100644 index 00000000..988b8321 --- /dev/null +++ b/src/wixext/UtilErrors.cs | |||
@@ -0,0 +1,109 @@ | |||
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 System; | ||
6 | using System.Resources; | ||
7 | using WixToolset.Data; | ||
8 | |||
9 | public static class UtilErrors | ||
10 | { | ||
11 | public static Message ArgumentRequiresValue(string argument) | ||
12 | { | ||
13 | return Message(null, Ids.ArgumentRequiresValue, "The argument '{0}' does not have a value specified and it is required.", argument); | ||
14 | } | ||
15 | |||
16 | public static Message CircularSearchReference(string chain) | ||
17 | { | ||
18 | return Message(null, Ids.CircularSearchReference, "A circular reference of search ordering constraints was detected: {0}. Search ordering references must form a directed acyclic graph.", chain); | ||
19 | } | ||
20 | |||
21 | public static Message DirectoryNotFound(string directory) | ||
22 | { | ||
23 | return Message(null, Ids.DirectoryNotFound, "The directory '{0}' could not be found.", directory); | ||
24 | } | ||
25 | |||
26 | public static Message EmptyDirectory(string directory) | ||
27 | { | ||
28 | return Message(null, Ids.EmptyDirectory, "The directory '{0}' did not contain any files or sub-directories and since empty directories are not being kept, there was nothing to harvest.", directory); | ||
29 | } | ||
30 | |||
31 | public static Message ErrorTransformingHarvestedWiX(string transform, string message) | ||
32 | { | ||
33 | return Message(null, Ids.ErrorTransformingHarvestedWiX, "Error applying transform {0} to harvested WiX: {1}", transform, message); | ||
34 | } | ||
35 | |||
36 | public static Message FileNotFound(string file) | ||
37 | { | ||
38 | return Message(null, Ids.FileNotFound, "The file '{0}' cannot be found.", file); | ||
39 | } | ||
40 | |||
41 | public static Message IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
42 | { | ||
43 | return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutComponent, "The {0}/@{1} attribute cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.", elementName, attributeName); | ||
44 | } | ||
45 | |||
46 | public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName) | ||
47 | { | ||
48 | return Message(sourceLineNumbers, Ids.IllegalElementWithoutComponent, "The {0} element cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.", elementName); | ||
49 | } | ||
50 | |||
51 | public static Message IllegalFileValueInPerfmonOrManifest(string file, string table) | ||
52 | { | ||
53 | return Message(null, Ids.IllegalFileValueInPerfmonOrManifest, "The value '{0}' in the File column, {1} table is invalid. It should be in the form of '[#file]' or '[!file]'.", file, table); | ||
54 | } | ||
55 | |||
56 | public static Message InvalidRegistryObject(SourceLineNumber sourceLineNumbers, string registryElementName) | ||
57 | { | ||
58 | return Message(sourceLineNumbers, Ids.InvalidRegistryObject, "The {0} element has no id and cannot have its permissions set. If you want to set permissions on a 'placeholder' registry key, force its creation by setting the ForceCreateOnInstall attribute to yes.", registryElementName); | ||
59 | } | ||
60 | |||
61 | public static Message PerformanceCategoryNotFound(string key) | ||
62 | { | ||
63 | return Message(null, Ids.PerformanceCategoryNotFound, "Performance category '{0}' not found.", key); | ||
64 | } | ||
65 | |||
66 | public static Message SpacesNotAllowedInArgumentValue(string arg, string value) | ||
67 | { | ||
68 | return Message(null, Ids.SpacesNotAllowedInArgumentValue, "The switch '{0}' does not allow the spaces from the value. Please remove the spaces in from the value: {1}", arg, value); | ||
69 | } | ||
70 | |||
71 | public static Message UnableToOpenRegistryKey(string key) | ||
72 | { | ||
73 | return Message(null, Ids.UnableToOpenRegistryKey, "Unable to open registry key '{0}'.", key); | ||
74 | } | ||
75 | |||
76 | public static Message UnsupportedPerformanceCounterType(string key) | ||
77 | { | ||
78 | return Message(null, Ids.UnsupportedPerformanceCounterType, "Unsupported performance counter type '{0}'.", key); | ||
79 | } | ||
80 | |||
81 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
82 | { | ||
83 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | ||
84 | } | ||
85 | |||
86 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
87 | { | ||
88 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); | ||
89 | } | ||
90 | |||
91 | public enum Ids | ||
92 | { | ||
93 | IllegalAttributeWithoutComponent = 5050, | ||
94 | IllegalElementWithoutComponent = 5051, | ||
95 | DirectoryNotFound = 5052, | ||
96 | EmptyDirectory = 5053, | ||
97 | IllegalFileValueInPerfmonOrManifest = 5054, | ||
98 | ErrorTransformingHarvestedWiX = 5055, | ||
99 | UnableToOpenRegistryKey = 5056, | ||
100 | SpacesNotAllowedInArgumentValue = 5057, | ||
101 | ArgumentRequiresValue = 5058, | ||
102 | FileNotFound = 5059, | ||
103 | PerformanceCategoryNotFound = 5060, | ||
104 | UnsupportedPerformanceCounterType = 5061, | ||
105 | CircularSearchReference = 5062, | ||
106 | InvalidRegistryObject = 5063, | ||
107 | } | ||
108 | } | ||
109 | } | ||
diff --git a/src/wixext/UtilExtensionData.cs b/src/wixext/UtilExtensionData.cs new file mode 100644 index 00000000..7eefc238 --- /dev/null +++ b/src/wixext/UtilExtensionData.cs | |||
@@ -0,0 +1,21 @@ | |||
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.Extensibility; | ||
7 | |||
8 | public sealed class UtilExtensionData : BaseExtensionData | ||
9 | { | ||
10 | public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) | ||
11 | { | ||
12 | tupleDefinition = UtilTupleDefinitions.ByName(name); | ||
13 | return tupleDefinition != null; | ||
14 | } | ||
15 | |||
16 | public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) | ||
17 | { | ||
18 | return Intermediate.Load(typeof(UtilExtensionData).Assembly, "WixToolset.Util.util.wixlib", tupleDefinitions); | ||
19 | } | ||
20 | } | ||
21 | } | ||
diff --git a/src/wixext/UtilExtensionFactory.cs b/src/wixext/UtilExtensionFactory.cs new file mode 100644 index 00000000..07bfae85 --- /dev/null +++ b/src/wixext/UtilExtensionFactory.cs | |||
@@ -0,0 +1,18 @@ | |||
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 System; | ||
6 | using System.Collections.Generic; | ||
7 | using WixToolset.Extensibility; | ||
8 | |||
9 | public class UtilExtensionFactory : BaseExtensionFactory | ||
10 | { | ||
11 | protected override IEnumerable<Type> ExtensionTypes => new[] | ||
12 | { | ||
13 | typeof(UtilCompiler), | ||
14 | typeof(UtilExtensionData), | ||
15 | typeof(UtilWindowsInstallerBackendExtension), | ||
16 | }; | ||
17 | } | ||
18 | } | ||
diff --git a/src/wixext/UtilWarnings.cs b/src/wixext/UtilWarnings.cs new file mode 100644 index 00000000..13dcea4e --- /dev/null +++ b/src/wixext/UtilWarnings.cs | |||
@@ -0,0 +1,72 @@ | |||
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 System; | ||
6 | using System.Resources; | ||
7 | using WixToolset.Data; | ||
8 | |||
9 | public static class UtilWarnings | ||
10 | { | ||
11 | public static Message AssemblyHarvestFailed(string file, string message) | ||
12 | { | ||
13 | return Message(null, Ids.AssemblyHarvestFailed, "Could not harvest data from a file that was expected to be an assembly: {0}. If this file is not an assembly you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: {1}", file, message); | ||
14 | } | ||
15 | |||
16 | public static Message DeprecatedPerfCounterElement(SourceLineNumber sourceLineNumbers) | ||
17 | { | ||
18 | return Message(sourceLineNumbers, Ids.DeprecatedPerfCounterElement, "The PerfCounter element has been deprecated. Please use the PerformanceCounter element instead."); | ||
19 | } | ||
20 | |||
21 | public static Message DuplicateDllRegistryEntry(string registryKey, string componentId) | ||
22 | { | ||
23 | return Message(null, Ids.DuplicateDllRegistryEntry, "Ignoring the registry key '{0}', it has already been added to the component '{1}'.", registryKey, componentId); | ||
24 | } | ||
25 | |||
26 | public static Message DuplicateDllRegistryEntry(string registryKey, string registryKeyValue, string componentId) | ||
27 | { | ||
28 | return Message(null, Ids.DuplicateDllRegistryEntry, "Ignoring the registry key '{0}', it has already been added to the component '{2}'. The registry key value '{1}' will not be harvested.", registryKey, registryKeyValue, componentId); | ||
29 | } | ||
30 | |||
31 | public static Message RequiredAttributeForWindowsXP(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
32 | { | ||
33 | return Message(sourceLineNumbers, Ids.RequiredAttributeForWindowsXP, "The {0}/@{1} attribute must be specified to successfully install on Windows XP. You can ignore this warning if this installation does not install on Windows XP.", elementName, attributeName); | ||
34 | } | ||
35 | |||
36 | public static Message SelfRegHarvestFailed(string file, string message) | ||
37 | { | ||
38 | return Message(null, Ids.SelfRegHarvestFailed, "Could not harvest data from a file that was expected to be a SelfReg DLL: {0}. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: {1}", file, message); | ||
39 | } | ||
40 | |||
41 | public static Message TypeLibLoadFailed(string file, string message) | ||
42 | { | ||
43 | return Message(null, Ids.TypeLibLoadFailed, "Could not load file that was expected to be a type library based off of file extension: {0}. If this file is not a type library you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the load failure: {1}", file, message); | ||
44 | } | ||
45 | |||
46 | public static Message UnsupportedRegistryType(string registryValue, int regFileLineNumber, string unsupportedType) | ||
47 | { | ||
48 | return Message(null, Ids.UnsupportedRegistryType, "Ignoring the registry value '{0}' found on line {1}, because it is of a type unsupported by Windows Installer ({2}).", registryValue, regFileLineNumber, unsupportedType); | ||
49 | } | ||
50 | |||
51 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
52 | { | ||
53 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); | ||
54 | } | ||
55 | |||
56 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
57 | { | ||
58 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); | ||
59 | } | ||
60 | |||
61 | public enum Ids | ||
62 | { | ||
63 | SelfRegHarvestFailed = 5150, | ||
64 | AssemblyHarvestFailed = 5151, | ||
65 | TypeLibLoadFailed = 5152, | ||
66 | DeprecatedPerfCounterElement = 5153, | ||
67 | RequiredAttributeForWindowsXP = 5154, | ||
68 | DuplicateDllRegistryEntry = 5156, | ||
69 | UnsupportedRegistryType = 5157, | ||
70 | } | ||
71 | } | ||
72 | } | ||
diff --git a/src/wixext/UtilWindowsInstallerBackendExtension.cs b/src/wixext/UtilWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..00ac8d34 --- /dev/null +++ b/src/wixext/UtilWindowsInstallerBackendExtension.cs | |||
@@ -0,0 +1,26 @@ | |||
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 System.Linq; | ||
6 | using System.Xml; | ||
7 | using WixToolset.Data.WindowsInstaller; | ||
8 | using WixToolset.Extensibility; | ||
9 | |||
10 | public class UtilWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension | ||
11 | { | ||
12 | private static readonly TableDefinition[] Tables = LoadTables(); | ||
13 | |||
14 | protected override TableDefinition[] TableDefinitionsForTuples => Tables; | ||
15 | |||
16 | private static TableDefinition[] LoadTables() | ||
17 | { | ||
18 | using (var resourceStream = typeof(UtilWindowsInstallerBackendExtension).Assembly.GetManifestResourceStream("WixToolset.Util.tables.xml")) | ||
19 | using (var reader = XmlReader.Create(resourceStream)) | ||
20 | { | ||
21 | var tables = TableDefinitionCollection.Load(reader); | ||
22 | return tables.ToArray(); | ||
23 | } | ||
24 | } | ||
25 | } | ||
26 | } | ||
diff --git a/src/wixext/WixToolset.Util.wixext.csproj b/src/wixext/WixToolset.Util.wixext.csproj new file mode 100644 index 00000000..a06298a3 --- /dev/null +++ b/src/wixext/WixToolset.Util.wixext.csproj | |||
@@ -0,0 +1,34 @@ | |||
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. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>netstandard2.0</TargetFramework> | ||
7 | <RootNamespace>WixToolset.Util</RootNamespace> | ||
8 | <Description>WiX Toolset Utility Extension</Description> | ||
9 | <Title>WiX Toolset Util Extension</Title> | ||
10 | <IsTool>true</IsTool> | ||
11 | <ContentTargetFolders>build</ContentTargetFolders> | ||
12 | </PropertyGroup> | ||
13 | |||
14 | <ItemGroup> | ||
15 | <Content Include="$(MSBuildThisFileName).targets" /> | ||
16 | <Content Include="util.xsd" PackagePath="tools" /> | ||
17 | <EmbeddedResource Include="tables.xml" /> | ||
18 | <EmbeddedResource Include="$(OutputPath)..\util.wixlib" /> | ||
19 | </ItemGroup> | ||
20 | |||
21 | <ItemGroup> | ||
22 | <ProjectReference Include="$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " /> | ||
23 | <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " /> | ||
24 | <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " PrivateAssets="all" /> | ||
25 | </ItemGroup> | ||
26 | |||
27 | <ItemGroup> | ||
28 | <ProjectReference Include="..\wixlib\util.wixproj" ReferenceOutputAssembly="false" /> | ||
29 | </ItemGroup> | ||
30 | |||
31 | <ItemGroup> | ||
32 | <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.7" PrivateAssets="all" /> | ||
33 | </ItemGroup> | ||
34 | </Project> | ||
diff --git a/src/wixext/WixToolset.Util.wixext.targets b/src/wixext/WixToolset.Util.wixext.targets new file mode 100644 index 00000000..3b43c25c --- /dev/null +++ b/src/wixext/WixToolset.Util.wixext.targets | |||
@@ -0,0 +1,8 @@ | |||
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. --> | ||
3 | |||
4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
5 | <ItemGroup> | ||
6 | <WixExtension Include="$(MSBuildThisFileDirectory)..\tools\WixToolset.Util.wixext.dll" /> | ||
7 | </ItemGroup> | ||
8 | </Project> | ||
diff --git a/src/wixext/tables.xml b/src/wixext/tables.xml new file mode 100644 index 00000000..190b0404 --- /dev/null +++ b/src/wixext/tables.xml | |||
@@ -0,0 +1,242 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <tableDefinitions xmlns="http://wixtoolset.org/schemas/v4/wi/tables"> | ||
6 | <tableDefinition name="WixCloseApplication"> | ||
7 | <columnDefinition name="WixCloseApplication" type="string" length="72" primaryKey="yes" modularize="column" | ||
8 | category="identifier" description="Primary key, non-localized token in table."/> | ||
9 | <columnDefinition name="Target" type="localized" length="0" modularize="property" | ||
10 | category="formatted" description="Name of executable to ensure is closed."/> | ||
11 | <columnDefinition name="Description" type="string" length="0" nullable="yes" localizable="yes" modularize="property" | ||
12 | category="formatted" description="Description string displayed to user when executable is in use."/> | ||
13 | <columnDefinition name="Condition" type="string" length="0" nullable="yes" localizable="yes" modularize="condition" | ||
14 | category="condition" description="Optional expression which skips the closing."/> | ||
15 | <columnDefinition name="Attributes" type="number" length="4" | ||
16 | minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied."/> | ||
17 | <columnDefinition name="Sequence" type="number" length="4" nullable="yes" | ||
18 | minValue="1" maxValue="2147483647" description="Sequence to order the closings by."/> | ||
19 | <columnDefinition name="Property" type="string" length="72" nullable="yes" localizable="yes" modularize="property" | ||
20 | category="identifier" description="Optional property that is set to the number of running instances of the app."/> | ||
21 | <columnDefinition name="TerminateExitCode" type="number" length="4" nullable="yes" | ||
22 | minValue="0" maxValue="2147483647" description="Exit code to return from a terminated application."/> | ||
23 | <columnDefinition name="Timeout" type="number" length="4" nullable="yes" | ||
24 | minValue="1" maxValue="2147483647" description="Timeout in milliseconds before scheduling restart or terminating application."/> | ||
25 | </tableDefinition> | ||
26 | <tableDefinition name="WixRemoveFolderEx" createSymbols="yes"> | ||
27 | <columnDefinition name="WixRemoveFolderEx" type="string" length="72" primaryKey="yes" modularize="column" | ||
28 | category="identifier" description="Identifier for the WixRemoveFolderEx row in the package."/> | ||
29 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
30 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table used to determine install state"/> | ||
31 | <columnDefinition name="Property" type="string" length="72" modularize="property" | ||
32 | category="identifier" description="Name of Property that contains the root of the directory tree to remove."/> | ||
33 | <columnDefinition name="InstallMode" type="number" length="2" | ||
34 | minValue="1" maxValue="3" description="1 == Remove only when the associated component is being installed (msiInstallStateLocal or msiInstallStateSource), 2 == Remove only when the associated component is being removed (msiInstallStateAbsent), 3 = Remove in either of the above cases."/> | ||
35 | </tableDefinition> | ||
36 | <tableDefinition name="WixRestartResource"> | ||
37 | <columnDefinition name="WixRestartResource" type="string" length="72" primaryKey="yes" modularize="column" | ||
38 | category="identifier" description="Primary key, non-localized identifier."/> | ||
39 | <columnDefinition name="Component_" type="string" length="72" nullable="yes" modularize="column" | ||
40 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table used to determine install state."/> | ||
41 | <columnDefinition name="Resource" type="string" length="0" modularize="property" | ||
42 | category="formatted" description="The resource to be registered with the Restart Manager."/> | ||
43 | <columnDefinition name="Attributes" type="number" length="4" | ||
44 | minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the type of resource and flags used for processing."/> | ||
45 | </tableDefinition> | ||
46 | <tableDefinition name="FileShare" createSymbols="yes"> | ||
47 | <columnDefinition name="FileShare" type="string" length="72" primaryKey="yes" modularize="column" | ||
48 | category="identifier" description="Primary key, non-localized identifier"/> | ||
49 | <columnDefinition name="ShareName" type="string" length="255" | ||
50 | category="formatted" description="The actual share name used"/> | ||
51 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
52 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table used to determine install state"/> | ||
53 | <columnDefinition name="Description" type="string" length="255" nullable="yes" | ||
54 | category="text" description="Description string displayed for the file share"/> | ||
55 | <columnDefinition name="Directory_" type="string" length="72" modularize="column" | ||
56 | keyTable="Directory" keyColumn="1" category="identifier" description="Foreign key referencing directory that the share is created on"/> | ||
57 | <columnDefinition name="User_" type="string" length="72" modularize="column" nullable="yes" | ||
58 | keyTable="User" keyColumn="1" category="identifier" description="Foreign key, User to give access permissions to"/> | ||
59 | <columnDefinition name="Permissions" type="number" length="4" nullable="yes" | ||
60 | description="Permissions int, as on EXPLICIT_ACCESS.grfAccessPermissions in MSDN"/> | ||
61 | </tableDefinition> | ||
62 | <tableDefinition name="FileSharePermissions"> | ||
63 | <columnDefinition name="FileShare_" type="string" length="72" primaryKey="yes" modularize="column" | ||
64 | keyTable="FileShare" keyColumn="1" category="identifier" description="FileShare that these premissions are to be applied to."/> | ||
65 | <columnDefinition name="User_" type="string" length="72" primaryKey="yes" modularize="column" | ||
66 | category="identifier" description="User that these premissions are to apply to."/> | ||
67 | <columnDefinition name="Permissions" type="number" length="4" | ||
68 | description="Permissions int, as on EXPLICIT_ACCESS.grfAccessPermissions in MSDN"/> | ||
69 | </tableDefinition> | ||
70 | <tableDefinition name="Group" createSymbols="yes"> | ||
71 | <columnDefinition name="Group" type="string" length="72" primaryKey="yes" modularize="column" | ||
72 | category="identifier" description="Primary key, non-localized token"/> | ||
73 | <columnDefinition name="Component_" type="string" length="72" nullable="yes" modularize="column" | ||
74 | keyTable="Component" keyColumn="1" category="text" description="Foreign key, Component used to determine install state"/> | ||
75 | <columnDefinition name="Name" type="string" length="255" modularize="property" | ||
76 | category="formatted" description="Group name"/> | ||
77 | <columnDefinition name="Domain" type="string" length="255" nullable="yes" modularize="property" | ||
78 | category="formatted" description="Group domain"/> | ||
79 | </tableDefinition> | ||
80 | <tableDefinition name="WixInternetShortcut" createSymbols="yes"> | ||
81 | <columnDefinition name="WixInternetShortcut" type="string" length="72" primaryKey="yes" modularize="column" | ||
82 | category="identifier" description="Primary key, non-localized token in table."/> | ||
83 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
84 | keyTable="Component" keyColumn="1" category="text" description="Foreign key, Component used to determine install state"/> | ||
85 | <columnDefinition name="Directory_" type="string" length="72" modularize="column" | ||
86 | keyTable="Directory" keyColumn="1" category="identifier" description="Foreign key referencing directory that the shortcut is created in"/> | ||
87 | <columnDefinition name="Name" type="string" length="72" modularize="property" | ||
88 | category="text" description="Name used for shortcut."/> | ||
89 | <columnDefinition name="Target" type="localized" length="0" escapeIdtCharacters="yes" | ||
90 | category="text" description="URL target."/> | ||
91 | <columnDefinition name="Attributes" type="number" length="2" | ||
92 | description="Attribute flags that control how the shortcut is created."/> | ||
93 | <columnDefinition name="IconFile" type="localized" length="0" escapeIdtCharacters="yes" | ||
94 | category="text" nullable="yes" description="Icon file for shortcut"/> | ||
95 | <columnDefinition name="IconIndex" type="number" length="4" | ||
96 | nullable="yes" description="Index of the icon being referenced."/> | ||
97 | </tableDefinition> | ||
98 | <tableDefinition name="PerformanceCategory"> | ||
99 | <columnDefinition name="PerformanceCategory" type="string" length="72" primaryKey="yes" modularize="column" | ||
100 | category="identifier" description="Primary key, non-localized token in table."/> | ||
101 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
102 | keyTable="Component" keyColumn="1" category="identifier" description="Component used to determine install state"/> | ||
103 | <columnDefinition name="Name" type="string" length="80" | ||
104 | category="text" description="Name of the performance counter category."/> | ||
105 | <columnDefinition name="IniData" type="localized" length="0" escapeIdtCharacters="yes" | ||
106 | category="text" description="Data that goes into the performance counter .ini file."/> | ||
107 | <columnDefinition name="ConstantData" type="localized" length="0" escapeIdtCharacters="yes" | ||
108 | category="text" description="Data that goes into the performance counter .h file."/> | ||
109 | </tableDefinition> | ||
110 | <tableDefinition name="Perfmon"> | ||
111 | <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column" | ||
112 | keyTable="Component" keyColumn="1" category="identifier" description="Component used to determine install state"/> | ||
113 | <columnDefinition name="File" type="string" length="72" primaryKey="yes" modularize="property" | ||
114 | category="formatted" description="Name of .INI file"/> | ||
115 | <columnDefinition name="Name" type="string" length="72" primaryKey="yes" | ||
116 | category="text" description="Service name in registry"/> | ||
117 | </tableDefinition> | ||
118 | <tableDefinition name="PerfmonManifest"> | ||
119 | <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column" | ||
120 | keyTable="Component" keyColumn="1" category="identifier" description="Component used to determine install state"/> | ||
121 | <columnDefinition name="File" type="string" length="72" primaryKey="yes" modularize="property" | ||
122 | category="formatted" description="Name of perfmon manifest file"/> | ||
123 | <columnDefinition name="ResourceFileDirectory" type="string" length="255" primaryKey="yes" | ||
124 | category="formatted" description="The path of the Resource File Directory"/> | ||
125 | </tableDefinition> | ||
126 | <tableDefinition name="EventManifest"> | ||
127 | <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column" | ||
128 | keyTable="Component" keyColumn="1" category="identifier" description="Component used to determine install state"/> | ||
129 | <columnDefinition name="File" type="string" length="72" primaryKey="yes" modularize="property" | ||
130 | category="formatted" description="Name of event manifest file"/> | ||
131 | </tableDefinition> | ||
132 | <tableDefinition name="SecureObjects"> | ||
133 | <columnDefinition name="SecureObject" type="string" length="72" primaryKey="yes" modularize="column" | ||
134 | category="identifier" description="Primary key, non-localized token in Table"/> | ||
135 | <columnDefinition name="Table" type="string" length="32" primaryKey="yes" | ||
136 | category="text" description="Table SecureObject should be securing"/> | ||
137 | <columnDefinition name="Domain" type="string" length="255" primaryKey="yes" nullable="yes" modularize="property" | ||
138 | category="text" description="Domain half of user account to secure"/> | ||
139 | <columnDefinition name="User" type="string" length="255" primaryKey="yes" modularize="property" | ||
140 | category="text" description="Username half of user account to secure"/> | ||
141 | <columnDefinition name="Permission" type="number" length="4" nullable="yes" | ||
142 | minValue="-2147483647" maxValue="2147483647" description="Permissions to grant to User"/> | ||
143 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
144 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table used to determine install state"/> | ||
145 | </tableDefinition> | ||
146 | <tableDefinition name="ServiceConfig"> | ||
147 | <columnDefinition name="ServiceName" type="string" length="72" primaryKey="yes" | ||
148 | category="formatted" description="Primary key, non-localized token"/> | ||
149 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
150 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key, Component used to determine install state "/> | ||
151 | <columnDefinition name="NewService" type="number" length="1" | ||
152 | minValue="0" maxValue="1" description="Whether the affected service is being installed or already exists."/> | ||
153 | <columnDefinition name="FirstFailureActionType" type="string" length="32" | ||
154 | category="text" description="First failure action type for configured service to take."/> | ||
155 | <columnDefinition name="SecondFailureActionType" type="string" length="32" | ||
156 | category="text" description="Second failure action type for configured service to take."/> | ||
157 | <columnDefinition name="ThirdFailureActionType" type="string" length="32" | ||
158 | category="text" description="Third failure action type for configured service to take."/> | ||
159 | <columnDefinition name="ResetPeriodInDays" type="number" length="4" nullable="yes" | ||
160 | category="integer" minValue="0" description="Period after which to reset the failure count for the service."/> | ||
161 | <columnDefinition name="RestartServiceDelayInSeconds" type="number" length="4" nullable="yes" | ||
162 | category="integer" minValue="0" description="Period after which to restart the service after a given failure."/> | ||
163 | <columnDefinition name="ProgramCommandLine" type="string" length="255" nullable="yes" | ||
164 | category="formatted" description="Command line for program to run if failure action is RUN_COMMAND."/> | ||
165 | <columnDefinition name="RebootMessage" type="string" length="255" nullable="yes" | ||
166 | category="text" description="Message to show to users when rebooting if failure action is REBOOT."/> | ||
167 | </tableDefinition> | ||
168 | <tableDefinition name="WixTouchFile" createSymbols="yes"> | ||
169 | <columnDefinition name="WixTouchFile" type="string" length="72" primaryKey="yes" modularize="column" | ||
170 | category="identifier" description="Identifier for the WixTouchFile row in the package."/> | ||
171 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
172 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table used to determine install state"/> | ||
173 | <columnDefinition name="Path" type="string" length="255" modularize="property" | ||
174 | category="formatted" description="Formatted column that resolves to the path to touch."/> | ||
175 | <columnDefinition name="Attributes" type="number" length="2" | ||
176 | minValue="1" maxValue="63" description="1 == Touch only when the associated component is being installed, 2 == Touch only when the associated component is being repaired , 4 == Touch only when the associated component is being removed, 16 = path is in 64-bit location, 32 = touching the file is vital."/> | ||
177 | </tableDefinition> | ||
178 | <tableDefinition name="User" createSymbols="yes"> | ||
179 | <columnDefinition name="User" type="string" length="72" primaryKey="yes" modularize="column" | ||
180 | category="identifier" description="Primary key, non-localized token"/> | ||
181 | <columnDefinition name="Component_" type="string" length="72" nullable="yes" modularize="column" | ||
182 | keyTable="Component" keyColumn="1" category="text" description="Foreign key, Component used to determine install state"/> | ||
183 | <columnDefinition name="Name" type="string" length="255" modularize="property" | ||
184 | category="formatted" description="User name"/> | ||
185 | <columnDefinition name="Domain" type="string" length="255" nullable="yes" modularize="property" | ||
186 | category="formatted" description="User domain"/> | ||
187 | <columnDefinition name="Password" type="string" length="255" nullable="yes" modularize="property" | ||
188 | category="formatted" description="User password"/> | ||
189 | <columnDefinition name="Attributes" type="number" length="4" nullable="yes" | ||
190 | minValue="0" maxValue="65535" description="Attributes describing how to create the user"/> | ||
191 | </tableDefinition> | ||
192 | <tableDefinition name="UserGroup"> | ||
193 | <columnDefinition name="User_" type="string" length="72" primaryKey="yes" modularize="column" | ||
194 | keyTable="User" keyColumn="1" category="identifier" description="User to be joined to a Group."/> | ||
195 | <columnDefinition name="Group_" type="string" length="72" primaryKey="yes" modularize="column" | ||
196 | keyTable="Group" keyColumn="1" category="identifier" description="User to be joined to a Group."/> | ||
197 | </tableDefinition> | ||
198 | <tableDefinition name="XmlFile"> | ||
199 | <columnDefinition name="XmlFile" type="string" length="72" primaryKey="yes" modularize="column" | ||
200 | category="identifier" description="Primary key, non-localized token."/> | ||
201 | <columnDefinition name="File" type="localized" length="255" modularize="property" | ||
202 | category="formatted" description="The .XML file in which to write the information"/> | ||
203 | <columnDefinition name="ElementPath" type="localized" length="0" modularize="property" | ||
204 | category="formatted" description="The .XML file element to modify."/> | ||
205 | <columnDefinition name="Name" type="localized" length="255" modularize="property" nullable="yes" | ||
206 | category="formatted" description="The .XML file node to set/add in the element."/> | ||
207 | <columnDefinition name="Value" type="localized" length="0" modularize="property" nullable="yes" | ||
208 | category="formatted" description="The value to be written."/> | ||
209 | <columnDefinition name="Flags" type="number" length="4" | ||
210 | minValue="0" maxValue="70143" description="Flags"/> | ||
211 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
212 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the installing of the .XML value."/> | ||
213 | <columnDefinition name="Sequence" type="number" length="2" nullable="yes" | ||
214 | description="Order to execute the XML modifications."/> | ||
215 | </tableDefinition> | ||
216 | <tableDefinition name="XmlConfig" createSymbols="yes"> | ||
217 | <columnDefinition name="XmlConfig" type="string" length="72" primaryKey="yes" modularize="column" | ||
218 | category="identifier" description="Primary key, non-localized token."/> | ||
219 | <columnDefinition name="File" type="localized" length="255" modularize="property" | ||
220 | category="formatted" description="The .XML file in which to write the information"/> | ||
221 | <columnDefinition name="ElementPath" type="localized" length="0" modularize="property" | ||
222 | category="formatted" description="The XPATH query for an element to modify or add children to. Can also be a foreign key reference to another XmlConfig row if no attributes are set and the row referenced is a create element row."/> | ||
223 | <columnDefinition name="VerifyPath" type="localized" length="0" modularize="property" nullable="yes" | ||
224 | category="formatted" description="The XPATH query run from ElementPath to verify whether a repair is necessary. Also used to uninstall."/> | ||
225 | <columnDefinition name="Name" type="localized" length="255" modularize="property" nullable="yes" | ||
226 | category="formatted" description="The .XML file node to set/add in the element."/> | ||
227 | <columnDefinition name="Value" type="localized" length="0" modularize="property" nullable="yes" escapeIdtCharacters="yes" | ||
228 | category="formatted" description="The value to be written."/> | ||
229 | <columnDefinition name="Flags" type="number" length="4" | ||
230 | minValue="0" maxValue="65536" description="Element=1,Value=2,Document=4,Create=16,Delete=32,Install=256,Uninstall=512"/> | ||
231 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
232 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the installing of the .XML value."/> | ||
233 | <columnDefinition name="Sequence" type="number" length="2" nullable="yes" | ||
234 | description="Order to execute the XML modifications."/> | ||
235 | </tableDefinition> | ||
236 | <tableDefinition name="WixFormatFiles"> | ||
237 | <columnDefinition name="Binary_" type="string" length="72" primaryKey="yes" modularize="column" | ||
238 | keyTable="Binary" keyColumn="1" category="identifier" description="Binary data to be formatted."/> | ||
239 | <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column" | ||
240 | keyTable="File" keyColumn="1" category="identifier" description="File whose component controls the custom action and where the formatted data is written."/> | ||
241 | </tableDefinition> | ||
242 | </tableDefinitions> | ||
diff --git a/src/wixext/util.cs b/src/wixext/util.cs new file mode 100644 index 00000000..9ebe89a7 --- /dev/null +++ b/src/wixext/util.cs | |||
@@ -0,0 +1,11461 @@ | |||
1 | //------------------------------------------------------------------------------ | ||
2 | // <auto-generated> | ||
3 | // This code was generated by a tool. | ||
4 | // Runtime Version:4.0.30319.42000 | ||
5 | // | ||
6 | // Changes to this file may cause incorrect behavior and will be lost if | ||
7 | // the code is regenerated. | ||
8 | // </auto-generated> | ||
9 | //------------------------------------------------------------------------------ | ||
10 | |||
11 | namespace WixToolset.Util.Serialize | ||
12 | { | ||
13 | using System; | ||
14 | using System.CodeDom.Compiler; | ||
15 | using System.Collections; | ||
16 | using System.Diagnostics.CodeAnalysis; | ||
17 | using System.Globalization; | ||
18 | using System.Xml; | ||
19 | using WixToolset.Data.Serialize; | ||
20 | |||
21 | |||
22 | /// <summary> | ||
23 | /// Values of this type will either be "yes" or "no". | ||
24 | /// </summary> | ||
25 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
26 | public enum YesNoType | ||
27 | { | ||
28 | |||
29 | IllegalValue = int.MaxValue, | ||
30 | |||
31 | NotSet = -1, | ||
32 | |||
33 | no, | ||
34 | |||
35 | yes, | ||
36 | } | ||
37 | |||
38 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
39 | public class Enums | ||
40 | { | ||
41 | |||
42 | /// <summary> | ||
43 | /// Parses a YesNoType from a string. | ||
44 | /// </summary> | ||
45 | public static YesNoType ParseYesNoType(string value) | ||
46 | { | ||
47 | YesNoType parsedValue; | ||
48 | Enums.TryParseYesNoType(value, out parsedValue); | ||
49 | return parsedValue; | ||
50 | } | ||
51 | |||
52 | /// <summary> | ||
53 | /// Tries to parse a YesNoType from a string. | ||
54 | /// </summary> | ||
55 | public static bool TryParseYesNoType(string value, out YesNoType parsedValue) | ||
56 | { | ||
57 | parsedValue = YesNoType.NotSet; | ||
58 | if (string.IsNullOrEmpty(value)) | ||
59 | { | ||
60 | return false; | ||
61 | } | ||
62 | if (("no" == value)) | ||
63 | { | ||
64 | parsedValue = YesNoType.no; | ||
65 | } | ||
66 | else | ||
67 | { | ||
68 | if (("yes" == value)) | ||
69 | { | ||
70 | parsedValue = YesNoType.yes; | ||
71 | } | ||
72 | else | ||
73 | { | ||
74 | parsedValue = YesNoType.IllegalValue; | ||
75 | return false; | ||
76 | } | ||
77 | } | ||
78 | return true; | ||
79 | } | ||
80 | |||
81 | /// <summary> | ||
82 | /// Parses a PerformanceCounterLanguageType from a string. | ||
83 | /// </summary> | ||
84 | public static PerformanceCounterLanguageType ParsePerformanceCounterLanguageType(string value) | ||
85 | { | ||
86 | PerformanceCounterLanguageType parsedValue; | ||
87 | Enums.TryParsePerformanceCounterLanguageType(value, out parsedValue); | ||
88 | return parsedValue; | ||
89 | } | ||
90 | |||
91 | /// <summary> | ||
92 | /// Tries to parse a PerformanceCounterLanguageType from a string. | ||
93 | /// </summary> | ||
94 | public static bool TryParsePerformanceCounterLanguageType(string value, out PerformanceCounterLanguageType parsedValue) | ||
95 | { | ||
96 | parsedValue = PerformanceCounterLanguageType.NotSet; | ||
97 | if (string.IsNullOrEmpty(value)) | ||
98 | { | ||
99 | return false; | ||
100 | } | ||
101 | if (("afrikaans" == value)) | ||
102 | { | ||
103 | parsedValue = PerformanceCounterLanguageType.afrikaans; | ||
104 | } | ||
105 | else | ||
106 | { | ||
107 | if (("albanian" == value)) | ||
108 | { | ||
109 | parsedValue = PerformanceCounterLanguageType.albanian; | ||
110 | } | ||
111 | else | ||
112 | { | ||
113 | if (("arabic" == value)) | ||
114 | { | ||
115 | parsedValue = PerformanceCounterLanguageType.arabic; | ||
116 | } | ||
117 | else | ||
118 | { | ||
119 | if (("armenian" == value)) | ||
120 | { | ||
121 | parsedValue = PerformanceCounterLanguageType.armenian; | ||
122 | } | ||
123 | else | ||
124 | { | ||
125 | if (("assamese" == value)) | ||
126 | { | ||
127 | parsedValue = PerformanceCounterLanguageType.assamese; | ||
128 | } | ||
129 | else | ||
130 | { | ||
131 | if (("azeri" == value)) | ||
132 | { | ||
133 | parsedValue = PerformanceCounterLanguageType.azeri; | ||
134 | } | ||
135 | else | ||
136 | { | ||
137 | if (("basque" == value)) | ||
138 | { | ||
139 | parsedValue = PerformanceCounterLanguageType.basque; | ||
140 | } | ||
141 | else | ||
142 | { | ||
143 | if (("belarusian" == value)) | ||
144 | { | ||
145 | parsedValue = PerformanceCounterLanguageType.belarusian; | ||
146 | } | ||
147 | else | ||
148 | { | ||
149 | if (("bengali" == value)) | ||
150 | { | ||
151 | parsedValue = PerformanceCounterLanguageType.bengali; | ||
152 | } | ||
153 | else | ||
154 | { | ||
155 | if (("bulgarian" == value)) | ||
156 | { | ||
157 | parsedValue = PerformanceCounterLanguageType.bulgarian; | ||
158 | } | ||
159 | else | ||
160 | { | ||
161 | if (("catalan" == value)) | ||
162 | { | ||
163 | parsedValue = PerformanceCounterLanguageType.catalan; | ||
164 | } | ||
165 | else | ||
166 | { | ||
167 | if (("chinese" == value)) | ||
168 | { | ||
169 | parsedValue = PerformanceCounterLanguageType.chinese; | ||
170 | } | ||
171 | else | ||
172 | { | ||
173 | if (("croatian" == value)) | ||
174 | { | ||
175 | parsedValue = PerformanceCounterLanguageType.croatian; | ||
176 | } | ||
177 | else | ||
178 | { | ||
179 | if (("czech" == value)) | ||
180 | { | ||
181 | parsedValue = PerformanceCounterLanguageType.czech; | ||
182 | } | ||
183 | else | ||
184 | { | ||
185 | if (("danish" == value)) | ||
186 | { | ||
187 | parsedValue = PerformanceCounterLanguageType.danish; | ||
188 | } | ||
189 | else | ||
190 | { | ||
191 | if (("divehi" == value)) | ||
192 | { | ||
193 | parsedValue = PerformanceCounterLanguageType.divehi; | ||
194 | } | ||
195 | else | ||
196 | { | ||
197 | if (("dutch" == value)) | ||
198 | { | ||
199 | parsedValue = PerformanceCounterLanguageType.dutch; | ||
200 | } | ||
201 | else | ||
202 | { | ||
203 | if (("english" == value)) | ||
204 | { | ||
205 | parsedValue = PerformanceCounterLanguageType.english; | ||
206 | } | ||
207 | else | ||
208 | { | ||
209 | if (("estonian" == value)) | ||
210 | { | ||
211 | parsedValue = PerformanceCounterLanguageType.estonian; | ||
212 | } | ||
213 | else | ||
214 | { | ||
215 | if (("faeroese" == value)) | ||
216 | { | ||
217 | parsedValue = PerformanceCounterLanguageType.faeroese; | ||
218 | } | ||
219 | else | ||
220 | { | ||
221 | if (("farsi" == value)) | ||
222 | { | ||
223 | parsedValue = PerformanceCounterLanguageType.farsi; | ||
224 | } | ||
225 | else | ||
226 | { | ||
227 | if (("finnish" == value)) | ||
228 | { | ||
229 | parsedValue = PerformanceCounterLanguageType.finnish; | ||
230 | } | ||
231 | else | ||
232 | { | ||
233 | if (("french" == value)) | ||
234 | { | ||
235 | parsedValue = PerformanceCounterLanguageType.french; | ||
236 | } | ||
237 | else | ||
238 | { | ||
239 | if (("galician" == value)) | ||
240 | { | ||
241 | parsedValue = PerformanceCounterLanguageType.galician; | ||
242 | } | ||
243 | else | ||
244 | { | ||
245 | if (("georgian" == value)) | ||
246 | { | ||
247 | parsedValue = PerformanceCounterLanguageType.georgian; | ||
248 | } | ||
249 | else | ||
250 | { | ||
251 | if (("german" == value)) | ||
252 | { | ||
253 | parsedValue = PerformanceCounterLanguageType.german; | ||
254 | } | ||
255 | else | ||
256 | { | ||
257 | if (("greek" == value)) | ||
258 | { | ||
259 | parsedValue = PerformanceCounterLanguageType.greek; | ||
260 | } | ||
261 | else | ||
262 | { | ||
263 | if (("gujarati" == value)) | ||
264 | { | ||
265 | parsedValue = PerformanceCounterLanguageType.gujarati; | ||
266 | } | ||
267 | else | ||
268 | { | ||
269 | if (("hebrew" == value)) | ||
270 | { | ||
271 | parsedValue = PerformanceCounterLanguageType.hebrew; | ||
272 | } | ||
273 | else | ||
274 | { | ||
275 | if (("hindi" == value)) | ||
276 | { | ||
277 | parsedValue = PerformanceCounterLanguageType.hindi; | ||
278 | } | ||
279 | else | ||
280 | { | ||
281 | if (("hungarian" == value)) | ||
282 | { | ||
283 | parsedValue = PerformanceCounterLanguageType.hungarian; | ||
284 | } | ||
285 | else | ||
286 | { | ||
287 | if (("icelandic" == value)) | ||
288 | { | ||
289 | parsedValue = PerformanceCounterLanguageType.icelandic; | ||
290 | } | ||
291 | else | ||
292 | { | ||
293 | if (("indonesian" == value)) | ||
294 | { | ||
295 | parsedValue = PerformanceCounterLanguageType.indonesian; | ||
296 | } | ||
297 | else | ||
298 | { | ||
299 | if (("italian" == value)) | ||
300 | { | ||
301 | parsedValue = PerformanceCounterLanguageType.italian; | ||
302 | } | ||
303 | else | ||
304 | { | ||
305 | if (("japanese" == value)) | ||
306 | { | ||
307 | parsedValue = PerformanceCounterLanguageType.japanese; | ||
308 | } | ||
309 | else | ||
310 | { | ||
311 | if (("kannada" == value)) | ||
312 | { | ||
313 | parsedValue = PerformanceCounterLanguageType.kannada; | ||
314 | } | ||
315 | else | ||
316 | { | ||
317 | if (("kashmiri" == value)) | ||
318 | { | ||
319 | parsedValue = PerformanceCounterLanguageType.kashmiri; | ||
320 | } | ||
321 | else | ||
322 | { | ||
323 | if (("kazak" == value)) | ||
324 | { | ||
325 | parsedValue = PerformanceCounterLanguageType.kazak; | ||
326 | } | ||
327 | else | ||
328 | { | ||
329 | if (("konkani" == value)) | ||
330 | { | ||
331 | parsedValue = PerformanceCounterLanguageType.konkani; | ||
332 | } | ||
333 | else | ||
334 | { | ||
335 | if (("korean" == value)) | ||
336 | { | ||
337 | parsedValue = PerformanceCounterLanguageType.korean; | ||
338 | } | ||
339 | else | ||
340 | { | ||
341 | if (("kyrgyz" == value)) | ||
342 | { | ||
343 | parsedValue = PerformanceCounterLanguageType.kyrgyz; | ||
344 | } | ||
345 | else | ||
346 | { | ||
347 | if (("latvian" == value)) | ||
348 | { | ||
349 | parsedValue = PerformanceCounterLanguageType.latvian; | ||
350 | } | ||
351 | else | ||
352 | { | ||
353 | if (("lithuanian" == value)) | ||
354 | { | ||
355 | parsedValue = PerformanceCounterLanguageType.lithuanian; | ||
356 | } | ||
357 | else | ||
358 | { | ||
359 | if (("macedonian" == value)) | ||
360 | { | ||
361 | parsedValue = PerformanceCounterLanguageType.macedonian; | ||
362 | } | ||
363 | else | ||
364 | { | ||
365 | if (("malay" == value)) | ||
366 | { | ||
367 | parsedValue = PerformanceCounterLanguageType.malay; | ||
368 | } | ||
369 | else | ||
370 | { | ||
371 | if (("malayalam" == value)) | ||
372 | { | ||
373 | parsedValue = PerformanceCounterLanguageType.malayalam; | ||
374 | } | ||
375 | else | ||
376 | { | ||
377 | if (("manipuri" == value)) | ||
378 | { | ||
379 | parsedValue = PerformanceCounterLanguageType.manipuri; | ||
380 | } | ||
381 | else | ||
382 | { | ||
383 | if (("marathi" == value)) | ||
384 | { | ||
385 | parsedValue = PerformanceCounterLanguageType.marathi; | ||
386 | } | ||
387 | else | ||
388 | { | ||
389 | if (("mongolian" == value)) | ||
390 | { | ||
391 | parsedValue = PerformanceCounterLanguageType.mongolian; | ||
392 | } | ||
393 | else | ||
394 | { | ||
395 | if (("nepali" == value)) | ||
396 | { | ||
397 | parsedValue = PerformanceCounterLanguageType.nepali; | ||
398 | } | ||
399 | else | ||
400 | { | ||
401 | if (("norwegian" == value)) | ||
402 | { | ||
403 | parsedValue = PerformanceCounterLanguageType.norwegian; | ||
404 | } | ||
405 | else | ||
406 | { | ||
407 | if (("oriya" == value)) | ||
408 | { | ||
409 | parsedValue = PerformanceCounterLanguageType.oriya; | ||
410 | } | ||
411 | else | ||
412 | { | ||
413 | if (("polish" == value)) | ||
414 | { | ||
415 | parsedValue = PerformanceCounterLanguageType.polish; | ||
416 | } | ||
417 | else | ||
418 | { | ||
419 | if (("portuguese" == value)) | ||
420 | { | ||
421 | parsedValue = PerformanceCounterLanguageType.portuguese; | ||
422 | } | ||
423 | else | ||
424 | { | ||
425 | if (("punjabi" == value)) | ||
426 | { | ||
427 | parsedValue = PerformanceCounterLanguageType.punjabi; | ||
428 | } | ||
429 | else | ||
430 | { | ||
431 | if (("romanian" == value)) | ||
432 | { | ||
433 | parsedValue = PerformanceCounterLanguageType.romanian; | ||
434 | } | ||
435 | else | ||
436 | { | ||
437 | if (("russian" == value)) | ||
438 | { | ||
439 | parsedValue = PerformanceCounterLanguageType.russian; | ||
440 | } | ||
441 | else | ||
442 | { | ||
443 | if (("sanskrit" == value)) | ||
444 | { | ||
445 | parsedValue = PerformanceCounterLanguageType.sanskrit; | ||
446 | } | ||
447 | else | ||
448 | { | ||
449 | if (("serbian" == value)) | ||
450 | { | ||
451 | parsedValue = PerformanceCounterLanguageType.serbian; | ||
452 | } | ||
453 | else | ||
454 | { | ||
455 | if (("sindhi" == value)) | ||
456 | { | ||
457 | parsedValue = PerformanceCounterLanguageType.sindhi; | ||
458 | } | ||
459 | else | ||
460 | { | ||
461 | if (("slovak" == value)) | ||
462 | { | ||
463 | parsedValue = PerformanceCounterLanguageType.slovak; | ||
464 | } | ||
465 | else | ||
466 | { | ||
467 | if (("slovenian" == value)) | ||
468 | { | ||
469 | parsedValue = PerformanceCounterLanguageType.slovenian; | ||
470 | } | ||
471 | else | ||
472 | { | ||
473 | if (("spanish" == value)) | ||
474 | { | ||
475 | parsedValue = PerformanceCounterLanguageType.spanish; | ||
476 | } | ||
477 | else | ||
478 | { | ||
479 | if (("swahili" == value)) | ||
480 | { | ||
481 | parsedValue = PerformanceCounterLanguageType.swahili; | ||
482 | } | ||
483 | else | ||
484 | { | ||
485 | if (("swedish" == value)) | ||
486 | { | ||
487 | parsedValue = PerformanceCounterLanguageType.swedish; | ||
488 | } | ||
489 | else | ||
490 | { | ||
491 | if (("syriac" == value)) | ||
492 | { | ||
493 | parsedValue = PerformanceCounterLanguageType.syriac; | ||
494 | } | ||
495 | else | ||
496 | { | ||
497 | if (("tamil" == value)) | ||
498 | { | ||
499 | parsedValue = PerformanceCounterLanguageType.tamil; | ||
500 | } | ||
501 | else | ||
502 | { | ||
503 | if (("tatar" == value)) | ||
504 | { | ||
505 | parsedValue = PerformanceCounterLanguageType.tatar; | ||
506 | } | ||
507 | else | ||
508 | { | ||
509 | if (("telugu" == value)) | ||
510 | { | ||
511 | parsedValue = PerformanceCounterLanguageType.telugu; | ||
512 | } | ||
513 | else | ||
514 | { | ||
515 | if (("thai" == value)) | ||
516 | { | ||
517 | parsedValue = PerformanceCounterLanguageType.thai; | ||
518 | } | ||
519 | else | ||
520 | { | ||
521 | if (("turkish" == value)) | ||
522 | { | ||
523 | parsedValue = PerformanceCounterLanguageType.turkish; | ||
524 | } | ||
525 | else | ||
526 | { | ||
527 | if (("ukrainian" == value)) | ||
528 | { | ||
529 | parsedValue = PerformanceCounterLanguageType.ukrainian; | ||
530 | } | ||
531 | else | ||
532 | { | ||
533 | if (("urdu" == value)) | ||
534 | { | ||
535 | parsedValue = PerformanceCounterLanguageType.urdu; | ||
536 | } | ||
537 | else | ||
538 | { | ||
539 | if (("uzbek" == value)) | ||
540 | { | ||
541 | parsedValue = PerformanceCounterLanguageType.uzbek; | ||
542 | } | ||
543 | else | ||
544 | { | ||
545 | if (("vietnamese" == value)) | ||
546 | { | ||
547 | parsedValue = PerformanceCounterLanguageType.vietnamese; | ||
548 | } | ||
549 | else | ||
550 | { | ||
551 | parsedValue = PerformanceCounterLanguageType.IllegalValue; | ||
552 | return false; | ||
553 | } | ||
554 | } | ||
555 | } | ||
556 | } | ||
557 | } | ||
558 | } | ||
559 | } | ||
560 | } | ||
561 | } | ||
562 | } | ||
563 | } | ||
564 | } | ||
565 | } | ||
566 | } | ||
567 | } | ||
568 | } | ||
569 | } | ||
570 | } | ||
571 | } | ||
572 | } | ||
573 | } | ||
574 | } | ||
575 | } | ||
576 | } | ||
577 | } | ||
578 | } | ||
579 | } | ||
580 | } | ||
581 | } | ||
582 | } | ||
583 | } | ||
584 | } | ||
585 | } | ||
586 | } | ||
587 | } | ||
588 | } | ||
589 | } | ||
590 | } | ||
591 | } | ||
592 | } | ||
593 | } | ||
594 | } | ||
595 | } | ||
596 | } | ||
597 | } | ||
598 | } | ||
599 | } | ||
600 | } | ||
601 | } | ||
602 | } | ||
603 | } | ||
604 | } | ||
605 | } | ||
606 | } | ||
607 | } | ||
608 | } | ||
609 | } | ||
610 | } | ||
611 | } | ||
612 | } | ||
613 | } | ||
614 | } | ||
615 | } | ||
616 | } | ||
617 | } | ||
618 | } | ||
619 | } | ||
620 | } | ||
621 | } | ||
622 | } | ||
623 | } | ||
624 | } | ||
625 | } | ||
626 | } | ||
627 | } | ||
628 | return true; | ||
629 | } | ||
630 | |||
631 | /// <summary> | ||
632 | /// Parses a PerformanceCounterTypesType from a string. | ||
633 | /// </summary> | ||
634 | public static PerformanceCounterTypesType ParsePerformanceCounterTypesType(string value) | ||
635 | { | ||
636 | PerformanceCounterTypesType parsedValue; | ||
637 | Enums.TryParsePerformanceCounterTypesType(value, out parsedValue); | ||
638 | return parsedValue; | ||
639 | } | ||
640 | |||
641 | /// <summary> | ||
642 | /// Tries to parse a PerformanceCounterTypesType from a string. | ||
643 | /// </summary> | ||
644 | public static bool TryParsePerformanceCounterTypesType(string value, out PerformanceCounterTypesType parsedValue) | ||
645 | { | ||
646 | parsedValue = PerformanceCounterTypesType.NotSet; | ||
647 | if (string.IsNullOrEmpty(value)) | ||
648 | { | ||
649 | return false; | ||
650 | } | ||
651 | if (("averageBase" == value)) | ||
652 | { | ||
653 | parsedValue = PerformanceCounterTypesType.averageBase; | ||
654 | } | ||
655 | else | ||
656 | { | ||
657 | if (("averageCount64" == value)) | ||
658 | { | ||
659 | parsedValue = PerformanceCounterTypesType.averageCount64; | ||
660 | } | ||
661 | else | ||
662 | { | ||
663 | if (("averageTimer32" == value)) | ||
664 | { | ||
665 | parsedValue = PerformanceCounterTypesType.averageTimer32; | ||
666 | } | ||
667 | else | ||
668 | { | ||
669 | if (("counterDelta32" == value)) | ||
670 | { | ||
671 | parsedValue = PerformanceCounterTypesType.counterDelta32; | ||
672 | } | ||
673 | else | ||
674 | { | ||
675 | if (("counterTimerInverse" == value)) | ||
676 | { | ||
677 | parsedValue = PerformanceCounterTypesType.counterTimerInverse; | ||
678 | } | ||
679 | else | ||
680 | { | ||
681 | if (("sampleFraction" == value)) | ||
682 | { | ||
683 | parsedValue = PerformanceCounterTypesType.sampleFraction; | ||
684 | } | ||
685 | else | ||
686 | { | ||
687 | if (("timer100Ns" == value)) | ||
688 | { | ||
689 | parsedValue = PerformanceCounterTypesType.timer100Ns; | ||
690 | } | ||
691 | else | ||
692 | { | ||
693 | if (("counterTimer" == value)) | ||
694 | { | ||
695 | parsedValue = PerformanceCounterTypesType.counterTimer; | ||
696 | } | ||
697 | else | ||
698 | { | ||
699 | if (("rawFraction" == value)) | ||
700 | { | ||
701 | parsedValue = PerformanceCounterTypesType.rawFraction; | ||
702 | } | ||
703 | else | ||
704 | { | ||
705 | if (("timer100NsInverse" == value)) | ||
706 | { | ||
707 | parsedValue = PerformanceCounterTypesType.timer100NsInverse; | ||
708 | } | ||
709 | else | ||
710 | { | ||
711 | if (("counterMultiTimer" == value)) | ||
712 | { | ||
713 | parsedValue = PerformanceCounterTypesType.counterMultiTimer; | ||
714 | } | ||
715 | else | ||
716 | { | ||
717 | if (("counterMultiTimer100Ns" == value)) | ||
718 | { | ||
719 | parsedValue = PerformanceCounterTypesType.counterMultiTimer100Ns; | ||
720 | } | ||
721 | else | ||
722 | { | ||
723 | if (("counterMultiTimerInverse" == value)) | ||
724 | { | ||
725 | parsedValue = PerformanceCounterTypesType.counterMultiTimerInverse; | ||
726 | } | ||
727 | else | ||
728 | { | ||
729 | if (("counterMultiTimer100NsInverse" == value)) | ||
730 | { | ||
731 | parsedValue = PerformanceCounterTypesType.counterMultiTimer100NsInverse; | ||
732 | } | ||
733 | else | ||
734 | { | ||
735 | if (("elapsedTime" == value)) | ||
736 | { | ||
737 | parsedValue = PerformanceCounterTypesType.elapsedTime; | ||
738 | } | ||
739 | else | ||
740 | { | ||
741 | if (("sampleBase" == value)) | ||
742 | { | ||
743 | parsedValue = PerformanceCounterTypesType.sampleBase; | ||
744 | } | ||
745 | else | ||
746 | { | ||
747 | if (("rawBase" == value)) | ||
748 | { | ||
749 | parsedValue = PerformanceCounterTypesType.rawBase; | ||
750 | } | ||
751 | else | ||
752 | { | ||
753 | if (("counterMultiBase" == value)) | ||
754 | { | ||
755 | parsedValue = PerformanceCounterTypesType.counterMultiBase; | ||
756 | } | ||
757 | else | ||
758 | { | ||
759 | if (("rateOfCountsPerSecond64" == value)) | ||
760 | { | ||
761 | parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond64; | ||
762 | } | ||
763 | else | ||
764 | { | ||
765 | if (("rateOfCountsPerSecond32" == value)) | ||
766 | { | ||
767 | parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond32; | ||
768 | } | ||
769 | else | ||
770 | { | ||
771 | if (("countPerTimeInterval64" == value)) | ||
772 | { | ||
773 | parsedValue = PerformanceCounterTypesType.countPerTimeInterval64; | ||
774 | } | ||
775 | else | ||
776 | { | ||
777 | if (("countPerTimeInterval32" == value)) | ||
778 | { | ||
779 | parsedValue = PerformanceCounterTypesType.countPerTimeInterval32; | ||
780 | } | ||
781 | else | ||
782 | { | ||
783 | if (("sampleCounter" == value)) | ||
784 | { | ||
785 | parsedValue = PerformanceCounterTypesType.sampleCounter; | ||
786 | } | ||
787 | else | ||
788 | { | ||
789 | if (("counterDelta64" == value)) | ||
790 | { | ||
791 | parsedValue = PerformanceCounterTypesType.counterDelta64; | ||
792 | } | ||
793 | else | ||
794 | { | ||
795 | if (("numberOfItems64" == value)) | ||
796 | { | ||
797 | parsedValue = PerformanceCounterTypesType.numberOfItems64; | ||
798 | } | ||
799 | else | ||
800 | { | ||
801 | if (("numberOfItems32" == value)) | ||
802 | { | ||
803 | parsedValue = PerformanceCounterTypesType.numberOfItems32; | ||
804 | } | ||
805 | else | ||
806 | { | ||
807 | if (("numberOfItemsHEX64" == value)) | ||
808 | { | ||
809 | parsedValue = PerformanceCounterTypesType.numberOfItemsHEX64; | ||
810 | } | ||
811 | else | ||
812 | { | ||
813 | if (("numberOfItemsHEX32" == value)) | ||
814 | { | ||
815 | parsedValue = PerformanceCounterTypesType.numberOfItemsHEX32; | ||
816 | } | ||
817 | else | ||
818 | { | ||
819 | parsedValue = PerformanceCounterTypesType.IllegalValue; | ||
820 | return false; | ||
821 | } | ||
822 | } | ||
823 | } | ||
824 | } | ||
825 | } | ||
826 | } | ||
827 | } | ||
828 | } | ||
829 | } | ||
830 | } | ||
831 | } | ||
832 | } | ||
833 | } | ||
834 | } | ||
835 | } | ||
836 | } | ||
837 | } | ||
838 | } | ||
839 | } | ||
840 | } | ||
841 | } | ||
842 | } | ||
843 | } | ||
844 | } | ||
845 | } | ||
846 | } | ||
847 | } | ||
848 | } | ||
849 | return true; | ||
850 | } | ||
851 | } | ||
852 | |||
853 | /// <summary> | ||
854 | /// Enumeration of valid languages for performance counters. | ||
855 | /// </summary> | ||
856 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
857 | public enum PerformanceCounterLanguageType | ||
858 | { | ||
859 | |||
860 | IllegalValue = int.MaxValue, | ||
861 | |||
862 | NotSet = -1, | ||
863 | |||
864 | afrikaans, | ||
865 | |||
866 | albanian, | ||
867 | |||
868 | arabic, | ||
869 | |||
870 | armenian, | ||
871 | |||
872 | assamese, | ||
873 | |||
874 | azeri, | ||
875 | |||
876 | basque, | ||
877 | |||
878 | belarusian, | ||
879 | |||
880 | bengali, | ||
881 | |||
882 | bulgarian, | ||
883 | |||
884 | catalan, | ||
885 | |||
886 | chinese, | ||
887 | |||
888 | croatian, | ||
889 | |||
890 | czech, | ||
891 | |||
892 | danish, | ||
893 | |||
894 | divehi, | ||
895 | |||
896 | dutch, | ||
897 | |||
898 | english, | ||
899 | |||
900 | estonian, | ||
901 | |||
902 | faeroese, | ||
903 | |||
904 | farsi, | ||
905 | |||
906 | finnish, | ||
907 | |||
908 | french, | ||
909 | |||
910 | galician, | ||
911 | |||
912 | georgian, | ||
913 | |||
914 | german, | ||
915 | |||
916 | greek, | ||
917 | |||
918 | gujarati, | ||
919 | |||
920 | hebrew, | ||
921 | |||
922 | hindi, | ||
923 | |||
924 | hungarian, | ||
925 | |||
926 | icelandic, | ||
927 | |||
928 | indonesian, | ||
929 | |||
930 | italian, | ||
931 | |||
932 | japanese, | ||
933 | |||
934 | kannada, | ||
935 | |||
936 | kashmiri, | ||
937 | |||
938 | kazak, | ||
939 | |||
940 | konkani, | ||
941 | |||
942 | korean, | ||
943 | |||
944 | kyrgyz, | ||
945 | |||
946 | latvian, | ||
947 | |||
948 | lithuanian, | ||
949 | |||
950 | macedonian, | ||
951 | |||
952 | malay, | ||
953 | |||
954 | malayalam, | ||
955 | |||
956 | manipuri, | ||
957 | |||
958 | marathi, | ||
959 | |||
960 | mongolian, | ||
961 | |||
962 | nepali, | ||
963 | |||
964 | norwegian, | ||
965 | |||
966 | oriya, | ||
967 | |||
968 | polish, | ||
969 | |||
970 | portuguese, | ||
971 | |||
972 | punjabi, | ||
973 | |||
974 | romanian, | ||
975 | |||
976 | russian, | ||
977 | |||
978 | sanskrit, | ||
979 | |||
980 | serbian, | ||
981 | |||
982 | sindhi, | ||
983 | |||
984 | slovak, | ||
985 | |||
986 | slovenian, | ||
987 | |||
988 | spanish, | ||
989 | |||
990 | swahili, | ||
991 | |||
992 | swedish, | ||
993 | |||
994 | syriac, | ||
995 | |||
996 | tamil, | ||
997 | |||
998 | tatar, | ||
999 | |||
1000 | telugu, | ||
1001 | |||
1002 | thai, | ||
1003 | |||
1004 | turkish, | ||
1005 | |||
1006 | ukrainian, | ||
1007 | |||
1008 | urdu, | ||
1009 | |||
1010 | uzbek, | ||
1011 | |||
1012 | vietnamese, | ||
1013 | } | ||
1014 | |||
1015 | /// <summary> | ||
1016 | /// Enumeration of valid types for performance counters. | ||
1017 | /// </summary> | ||
1018 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1019 | public enum PerformanceCounterTypesType | ||
1020 | { | ||
1021 | |||
1022 | IllegalValue = int.MaxValue, | ||
1023 | |||
1024 | NotSet = -1, | ||
1025 | |||
1026 | averageBase, | ||
1027 | |||
1028 | averageCount64, | ||
1029 | |||
1030 | averageTimer32, | ||
1031 | |||
1032 | counterDelta32, | ||
1033 | |||
1034 | counterTimerInverse, | ||
1035 | |||
1036 | sampleFraction, | ||
1037 | |||
1038 | timer100Ns, | ||
1039 | |||
1040 | counterTimer, | ||
1041 | |||
1042 | rawFraction, | ||
1043 | |||
1044 | timer100NsInverse, | ||
1045 | |||
1046 | counterMultiTimer, | ||
1047 | |||
1048 | counterMultiTimer100Ns, | ||
1049 | |||
1050 | counterMultiTimerInverse, | ||
1051 | |||
1052 | counterMultiTimer100NsInverse, | ||
1053 | |||
1054 | elapsedTime, | ||
1055 | |||
1056 | sampleBase, | ||
1057 | |||
1058 | rawBase, | ||
1059 | |||
1060 | counterMultiBase, | ||
1061 | |||
1062 | rateOfCountsPerSecond64, | ||
1063 | |||
1064 | rateOfCountsPerSecond32, | ||
1065 | |||
1066 | countPerTimeInterval64, | ||
1067 | |||
1068 | countPerTimeInterval32, | ||
1069 | |||
1070 | sampleCounter, | ||
1071 | |||
1072 | counterDelta64, | ||
1073 | |||
1074 | numberOfItems64, | ||
1075 | |||
1076 | numberOfItems32, | ||
1077 | |||
1078 | numberOfItemsHEX64, | ||
1079 | |||
1080 | numberOfItemsHEX32, | ||
1081 | } | ||
1082 | |||
1083 | /// <summary> | ||
1084 | /// Closes applications or schedules a reboot if application cannot be closed. | ||
1085 | /// </summary> | ||
1086 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1087 | public class CloseApplication : ISchemaElement, ISetAttributes | ||
1088 | { | ||
1089 | |||
1090 | private string idField; | ||
1091 | |||
1092 | private bool idFieldSet; | ||
1093 | |||
1094 | private string targetField; | ||
1095 | |||
1096 | private bool targetFieldSet; | ||
1097 | |||
1098 | private string descriptionField; | ||
1099 | |||
1100 | private bool descriptionFieldSet; | ||
1101 | |||
1102 | private int sequenceField; | ||
1103 | |||
1104 | private bool sequenceFieldSet; | ||
1105 | |||
1106 | private YesNoType closeMessageField; | ||
1107 | |||
1108 | private bool closeMessageFieldSet; | ||
1109 | |||
1110 | private YesNoType endSessionMessageField; | ||
1111 | |||
1112 | private bool endSessionMessageFieldSet; | ||
1113 | |||
1114 | private YesNoType elevatedCloseMessageField; | ||
1115 | |||
1116 | private bool elevatedCloseMessageFieldSet; | ||
1117 | |||
1118 | private YesNoType elevatedEndSessionMessageField; | ||
1119 | |||
1120 | private bool elevatedEndSessionMessageFieldSet; | ||
1121 | |||
1122 | private YesNoType rebootPromptField; | ||
1123 | |||
1124 | private bool rebootPromptFieldSet; | ||
1125 | |||
1126 | private YesNoType promptToContinueField; | ||
1127 | |||
1128 | private bool promptToContinueFieldSet; | ||
1129 | |||
1130 | private string propertyField; | ||
1131 | |||
1132 | private bool propertyFieldSet; | ||
1133 | |||
1134 | private int terminateProcessField; | ||
1135 | |||
1136 | private bool terminateProcessFieldSet; | ||
1137 | |||
1138 | private int timeoutField; | ||
1139 | |||
1140 | private bool timeoutFieldSet; | ||
1141 | |||
1142 | private string contentField; | ||
1143 | |||
1144 | private bool contentFieldSet; | ||
1145 | |||
1146 | private ISchemaElement parentElement; | ||
1147 | |||
1148 | /// <summary> | ||
1149 | /// Identifier for the close application (primary key). If the Id is not specified, one will be generated. | ||
1150 | /// </summary> | ||
1151 | public string Id | ||
1152 | { | ||
1153 | get | ||
1154 | { | ||
1155 | return this.idField; | ||
1156 | } | ||
1157 | set | ||
1158 | { | ||
1159 | this.idFieldSet = true; | ||
1160 | this.idField = value; | ||
1161 | } | ||
1162 | } | ||
1163 | |||
1164 | /// <summary> | ||
1165 | /// Name of the exectuable to be closed. This should only be the file name. | ||
1166 | /// </summary> | ||
1167 | public string Target | ||
1168 | { | ||
1169 | get | ||
1170 | { | ||
1171 | return this.targetField; | ||
1172 | } | ||
1173 | set | ||
1174 | { | ||
1175 | this.targetFieldSet = true; | ||
1176 | this.targetField = value; | ||
1177 | } | ||
1178 | } | ||
1179 | |||
1180 | /// <summary> | ||
1181 | /// Description to show if application is running and needs to be closed. | ||
1182 | /// </summary> | ||
1183 | public string Description | ||
1184 | { | ||
1185 | get | ||
1186 | { | ||
1187 | return this.descriptionField; | ||
1188 | } | ||
1189 | set | ||
1190 | { | ||
1191 | this.descriptionFieldSet = true; | ||
1192 | this.descriptionField = value; | ||
1193 | } | ||
1194 | } | ||
1195 | |||
1196 | /// <summary> | ||
1197 | /// Optionally orders the applications to be closed. | ||
1198 | /// </summary> | ||
1199 | public int Sequence | ||
1200 | { | ||
1201 | get | ||
1202 | { | ||
1203 | return this.sequenceField; | ||
1204 | } | ||
1205 | set | ||
1206 | { | ||
1207 | this.sequenceFieldSet = true; | ||
1208 | this.sequenceField = value; | ||
1209 | } | ||
1210 | } | ||
1211 | |||
1212 | /// <summary> | ||
1213 | /// Optionally sends a close message to the application. Default is no. | ||
1214 | /// </summary> | ||
1215 | public YesNoType CloseMessage | ||
1216 | { | ||
1217 | get | ||
1218 | { | ||
1219 | return this.closeMessageField; | ||
1220 | } | ||
1221 | set | ||
1222 | { | ||
1223 | this.closeMessageFieldSet = true; | ||
1224 | this.closeMessageField = value; | ||
1225 | } | ||
1226 | } | ||
1227 | |||
1228 | /// <summary> | ||
1229 | /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. Default is "no". | ||
1230 | /// </summary> | ||
1231 | public YesNoType EndSessionMessage | ||
1232 | { | ||
1233 | get | ||
1234 | { | ||
1235 | return this.endSessionMessageField; | ||
1236 | } | ||
1237 | set | ||
1238 | { | ||
1239 | this.endSessionMessageFieldSet = true; | ||
1240 | this.endSessionMessageField = value; | ||
1241 | } | ||
1242 | } | ||
1243 | |||
1244 | /// <summary> | ||
1245 | /// Optionally sends a close message to the application from deffered action without impersonation. Default is no. | ||
1246 | /// </summary> | ||
1247 | public YesNoType ElevatedCloseMessage | ||
1248 | { | ||
1249 | get | ||
1250 | { | ||
1251 | return this.elevatedCloseMessageField; | ||
1252 | } | ||
1253 | set | ||
1254 | { | ||
1255 | this.elevatedCloseMessageFieldSet = true; | ||
1256 | this.elevatedCloseMessageField = value; | ||
1257 | } | ||
1258 | } | ||
1259 | |||
1260 | /// <summary> | ||
1261 | /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application from a deffered action without impersonation. Default is "no". | ||
1262 | /// </summary> | ||
1263 | public YesNoType ElevatedEndSessionMessage | ||
1264 | { | ||
1265 | get | ||
1266 | { | ||
1267 | return this.elevatedEndSessionMessageField; | ||
1268 | } | ||
1269 | set | ||
1270 | { | ||
1271 | this.elevatedEndSessionMessageFieldSet = true; | ||
1272 | this.elevatedEndSessionMessageField = value; | ||
1273 | } | ||
1274 | } | ||
1275 | |||
1276 | /// <summary> | ||
1277 | /// Optionally prompts for reboot if application is still running. The default is "yes". The TerminateProcess attribute must be "no" or not specified if this attribute is "yes". | ||
1278 | /// </summary> | ||
1279 | public YesNoType RebootPrompt | ||
1280 | { | ||
1281 | get | ||
1282 | { | ||
1283 | return this.rebootPromptField; | ||
1284 | } | ||
1285 | set | ||
1286 | { | ||
1287 | this.rebootPromptFieldSet = true; | ||
1288 | this.rebootPromptField = value; | ||
1289 | } | ||
1290 | } | ||
1291 | |||
1292 | /// <summary> | ||
1293 | /// When this attribute is set to "yes", the user will be prompted when the application is still running. The Description attribute must contain the message to | ||
1294 | /// display in the prompt. The prompt occurs before executing any of the other options and gives the options to "Abort", "Retry", or "Ignore". Abort will cancel | ||
1295 | /// the install. Retry will attempt the check again and if the application is still running, prompt again. "Ignore" will continue and execute any other options | ||
1296 | /// set on the CloseApplication element. The default is "no". | ||
1297 | /// </summary> | ||
1298 | public YesNoType PromptToContinue | ||
1299 | { | ||
1300 | get | ||
1301 | { | ||
1302 | return this.promptToContinueField; | ||
1303 | } | ||
1304 | set | ||
1305 | { | ||
1306 | this.promptToContinueFieldSet = true; | ||
1307 | this.promptToContinueField = value; | ||
1308 | } | ||
1309 | } | ||
1310 | |||
1311 | /// <summary> | ||
1312 | /// Property to be set if application is still running. Useful for launch conditions or to conditionalize custom UI to ask user to shut down apps. | ||
1313 | /// </summary> | ||
1314 | public string Property | ||
1315 | { | ||
1316 | get | ||
1317 | { | ||
1318 | return this.propertyField; | ||
1319 | } | ||
1320 | set | ||
1321 | { | ||
1322 | this.propertyFieldSet = true; | ||
1323 | this.propertyField = value; | ||
1324 | } | ||
1325 | } | ||
1326 | |||
1327 | /// <summary> | ||
1328 | /// Attempts to terminates process and return the specified exit code if application is still running after sending any requested close and/or end session messages. | ||
1329 | /// If this attribute is specified, the RebootPrompt attribute must be "no". The default is "no". | ||
1330 | /// </summary> | ||
1331 | public int TerminateProcess | ||
1332 | { | ||
1333 | get | ||
1334 | { | ||
1335 | return this.terminateProcessField; | ||
1336 | } | ||
1337 | set | ||
1338 | { | ||
1339 | this.terminateProcessFieldSet = true; | ||
1340 | this.terminateProcessField = value; | ||
1341 | } | ||
1342 | } | ||
1343 | |||
1344 | /// <summary> | ||
1345 | /// Optional time in seconds to wait for the application to exit after the close and/or end session messages. If the application is still running after the timeout then | ||
1346 | /// the RebootPrompt or TerminateProcess attributes will be considered. The default value is "5" seconds. | ||
1347 | /// </summary> | ||
1348 | public int Timeout | ||
1349 | { | ||
1350 | get | ||
1351 | { | ||
1352 | return this.timeoutField; | ||
1353 | } | ||
1354 | set | ||
1355 | { | ||
1356 | this.timeoutFieldSet = true; | ||
1357 | this.timeoutField = value; | ||
1358 | } | ||
1359 | } | ||
1360 | |||
1361 | /// <summary> | ||
1362 | /// Condition that determines if the application should be closed. Must be blank or evaluate to true | ||
1363 | /// for the application to be scheduled for closing. | ||
1364 | /// </summary> | ||
1365 | public string Content | ||
1366 | { | ||
1367 | get | ||
1368 | { | ||
1369 | return this.contentField; | ||
1370 | } | ||
1371 | set | ||
1372 | { | ||
1373 | this.contentFieldSet = true; | ||
1374 | this.contentField = value; | ||
1375 | } | ||
1376 | } | ||
1377 | |||
1378 | public virtual ISchemaElement ParentElement | ||
1379 | { | ||
1380 | get | ||
1381 | { | ||
1382 | return this.parentElement; | ||
1383 | } | ||
1384 | set | ||
1385 | { | ||
1386 | this.parentElement = value; | ||
1387 | } | ||
1388 | } | ||
1389 | |||
1390 | /// <summary> | ||
1391 | /// Processes this element and all child elements into an XmlWriter. | ||
1392 | /// </summary> | ||
1393 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
1394 | public virtual void OutputXml(XmlWriter writer) | ||
1395 | { | ||
1396 | if ((null == writer)) | ||
1397 | { | ||
1398 | throw new ArgumentNullException("writer"); | ||
1399 | } | ||
1400 | writer.WriteStartElement("CloseApplication", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
1401 | if (this.idFieldSet) | ||
1402 | { | ||
1403 | writer.WriteAttributeString("Id", this.idField); | ||
1404 | } | ||
1405 | if (this.targetFieldSet) | ||
1406 | { | ||
1407 | writer.WriteAttributeString("Target", this.targetField); | ||
1408 | } | ||
1409 | if (this.descriptionFieldSet) | ||
1410 | { | ||
1411 | writer.WriteAttributeString("Description", this.descriptionField); | ||
1412 | } | ||
1413 | if (this.sequenceFieldSet) | ||
1414 | { | ||
1415 | writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); | ||
1416 | } | ||
1417 | if (this.closeMessageFieldSet) | ||
1418 | { | ||
1419 | if ((this.closeMessageField == YesNoType.no)) | ||
1420 | { | ||
1421 | writer.WriteAttributeString("CloseMessage", "no"); | ||
1422 | } | ||
1423 | if ((this.closeMessageField == YesNoType.yes)) | ||
1424 | { | ||
1425 | writer.WriteAttributeString("CloseMessage", "yes"); | ||
1426 | } | ||
1427 | } | ||
1428 | if (this.endSessionMessageFieldSet) | ||
1429 | { | ||
1430 | if ((this.endSessionMessageField == YesNoType.no)) | ||
1431 | { | ||
1432 | writer.WriteAttributeString("EndSessionMessage", "no"); | ||
1433 | } | ||
1434 | if ((this.endSessionMessageField == YesNoType.yes)) | ||
1435 | { | ||
1436 | writer.WriteAttributeString("EndSessionMessage", "yes"); | ||
1437 | } | ||
1438 | } | ||
1439 | if (this.elevatedCloseMessageFieldSet) | ||
1440 | { | ||
1441 | if ((this.elevatedCloseMessageField == YesNoType.no)) | ||
1442 | { | ||
1443 | writer.WriteAttributeString("ElevatedCloseMessage", "no"); | ||
1444 | } | ||
1445 | if ((this.elevatedCloseMessageField == YesNoType.yes)) | ||
1446 | { | ||
1447 | writer.WriteAttributeString("ElevatedCloseMessage", "yes"); | ||
1448 | } | ||
1449 | } | ||
1450 | if (this.elevatedEndSessionMessageFieldSet) | ||
1451 | { | ||
1452 | if ((this.elevatedEndSessionMessageField == YesNoType.no)) | ||
1453 | { | ||
1454 | writer.WriteAttributeString("ElevatedEndSessionMessage", "no"); | ||
1455 | } | ||
1456 | if ((this.elevatedEndSessionMessageField == YesNoType.yes)) | ||
1457 | { | ||
1458 | writer.WriteAttributeString("ElevatedEndSessionMessage", "yes"); | ||
1459 | } | ||
1460 | } | ||
1461 | if (this.rebootPromptFieldSet) | ||
1462 | { | ||
1463 | if ((this.rebootPromptField == YesNoType.no)) | ||
1464 | { | ||
1465 | writer.WriteAttributeString("RebootPrompt", "no"); | ||
1466 | } | ||
1467 | if ((this.rebootPromptField == YesNoType.yes)) | ||
1468 | { | ||
1469 | writer.WriteAttributeString("RebootPrompt", "yes"); | ||
1470 | } | ||
1471 | } | ||
1472 | if (this.promptToContinueFieldSet) | ||
1473 | { | ||
1474 | if ((this.promptToContinueField == YesNoType.no)) | ||
1475 | { | ||
1476 | writer.WriteAttributeString("PromptToContinue", "no"); | ||
1477 | } | ||
1478 | if ((this.promptToContinueField == YesNoType.yes)) | ||
1479 | { | ||
1480 | writer.WriteAttributeString("PromptToContinue", "yes"); | ||
1481 | } | ||
1482 | } | ||
1483 | if (this.propertyFieldSet) | ||
1484 | { | ||
1485 | writer.WriteAttributeString("Property", this.propertyField); | ||
1486 | } | ||
1487 | if (this.terminateProcessFieldSet) | ||
1488 | { | ||
1489 | writer.WriteAttributeString("TerminateProcess", this.terminateProcessField.ToString(CultureInfo.InvariantCulture)); | ||
1490 | } | ||
1491 | if (this.timeoutFieldSet) | ||
1492 | { | ||
1493 | writer.WriteAttributeString("Timeout", this.timeoutField.ToString(CultureInfo.InvariantCulture)); | ||
1494 | } | ||
1495 | if (this.contentFieldSet) | ||
1496 | { | ||
1497 | writer.WriteString(this.contentField); | ||
1498 | } | ||
1499 | writer.WriteEndElement(); | ||
1500 | } | ||
1501 | |||
1502 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1503 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
1504 | void ISetAttributes.SetAttribute(string name, string value) | ||
1505 | { | ||
1506 | if (String.IsNullOrEmpty(name)) | ||
1507 | { | ||
1508 | throw new ArgumentNullException("name"); | ||
1509 | } | ||
1510 | if (("Id" == name)) | ||
1511 | { | ||
1512 | this.idField = value; | ||
1513 | this.idFieldSet = true; | ||
1514 | } | ||
1515 | if (("Target" == name)) | ||
1516 | { | ||
1517 | this.targetField = value; | ||
1518 | this.targetFieldSet = true; | ||
1519 | } | ||
1520 | if (("Description" == name)) | ||
1521 | { | ||
1522 | this.descriptionField = value; | ||
1523 | this.descriptionFieldSet = true; | ||
1524 | } | ||
1525 | if (("Sequence" == name)) | ||
1526 | { | ||
1527 | this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
1528 | this.sequenceFieldSet = true; | ||
1529 | } | ||
1530 | if (("CloseMessage" == name)) | ||
1531 | { | ||
1532 | this.closeMessageField = Enums.ParseYesNoType(value); | ||
1533 | this.closeMessageFieldSet = true; | ||
1534 | } | ||
1535 | if (("EndSessionMessage" == name)) | ||
1536 | { | ||
1537 | this.endSessionMessageField = Enums.ParseYesNoType(value); | ||
1538 | this.endSessionMessageFieldSet = true; | ||
1539 | } | ||
1540 | if (("ElevatedCloseMessage" == name)) | ||
1541 | { | ||
1542 | this.elevatedCloseMessageField = Enums.ParseYesNoType(value); | ||
1543 | this.elevatedCloseMessageFieldSet = true; | ||
1544 | } | ||
1545 | if (("ElevatedEndSessionMessage" == name)) | ||
1546 | { | ||
1547 | this.elevatedEndSessionMessageField = Enums.ParseYesNoType(value); | ||
1548 | this.elevatedEndSessionMessageFieldSet = true; | ||
1549 | } | ||
1550 | if (("RebootPrompt" == name)) | ||
1551 | { | ||
1552 | this.rebootPromptField = Enums.ParseYesNoType(value); | ||
1553 | this.rebootPromptFieldSet = true; | ||
1554 | } | ||
1555 | if (("PromptToContinue" == name)) | ||
1556 | { | ||
1557 | this.promptToContinueField = Enums.ParseYesNoType(value); | ||
1558 | this.promptToContinueFieldSet = true; | ||
1559 | } | ||
1560 | if (("Property" == name)) | ||
1561 | { | ||
1562 | this.propertyField = value; | ||
1563 | this.propertyFieldSet = true; | ||
1564 | } | ||
1565 | if (("TerminateProcess" == name)) | ||
1566 | { | ||
1567 | this.terminateProcessField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
1568 | this.terminateProcessFieldSet = true; | ||
1569 | } | ||
1570 | if (("Timeout" == name)) | ||
1571 | { | ||
1572 | this.timeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
1573 | this.timeoutFieldSet = true; | ||
1574 | } | ||
1575 | if (("Content" == name)) | ||
1576 | { | ||
1577 | this.contentField = value; | ||
1578 | this.contentFieldSet = true; | ||
1579 | } | ||
1580 | } | ||
1581 | } | ||
1582 | |||
1583 | /// <summary> | ||
1584 | /// Describes a component search. | ||
1585 | /// </summary> | ||
1586 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1587 | public class ComponentSearch : ISchemaElement, ISetAttributes | ||
1588 | { | ||
1589 | |||
1590 | private string idField; | ||
1591 | |||
1592 | private bool idFieldSet; | ||
1593 | |||
1594 | private string variableField; | ||
1595 | |||
1596 | private bool variableFieldSet; | ||
1597 | |||
1598 | private string conditionField; | ||
1599 | |||
1600 | private bool conditionFieldSet; | ||
1601 | |||
1602 | private string afterField; | ||
1603 | |||
1604 | private bool afterFieldSet; | ||
1605 | |||
1606 | private string guidField; | ||
1607 | |||
1608 | private bool guidFieldSet; | ||
1609 | |||
1610 | private string productCodeField; | ||
1611 | |||
1612 | private bool productCodeFieldSet; | ||
1613 | |||
1614 | private ResultType resultField; | ||
1615 | |||
1616 | private bool resultFieldSet; | ||
1617 | |||
1618 | private ISchemaElement parentElement; | ||
1619 | |||
1620 | /// <summary> | ||
1621 | /// Id of the search for ordering and dependency. | ||
1622 | /// </summary> | ||
1623 | public string Id | ||
1624 | { | ||
1625 | get | ||
1626 | { | ||
1627 | return this.idField; | ||
1628 | } | ||
1629 | set | ||
1630 | { | ||
1631 | this.idFieldSet = true; | ||
1632 | this.idField = value; | ||
1633 | } | ||
1634 | } | ||
1635 | |||
1636 | /// <summary> | ||
1637 | /// Name of the variable in which to place the result of the search. | ||
1638 | /// </summary> | ||
1639 | public string Variable | ||
1640 | { | ||
1641 | get | ||
1642 | { | ||
1643 | return this.variableField; | ||
1644 | } | ||
1645 | set | ||
1646 | { | ||
1647 | this.variableFieldSet = true; | ||
1648 | this.variableField = value; | ||
1649 | } | ||
1650 | } | ||
1651 | |||
1652 | /// <summary> | ||
1653 | /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. | ||
1654 | /// </summary> | ||
1655 | public string Condition | ||
1656 | { | ||
1657 | get | ||
1658 | { | ||
1659 | return this.conditionField; | ||
1660 | } | ||
1661 | set | ||
1662 | { | ||
1663 | this.conditionFieldSet = true; | ||
1664 | this.conditionField = value; | ||
1665 | } | ||
1666 | } | ||
1667 | |||
1668 | /// <summary> | ||
1669 | /// Id of the search that this one should come after. | ||
1670 | /// </summary> | ||
1671 | public string After | ||
1672 | { | ||
1673 | get | ||
1674 | { | ||
1675 | return this.afterField; | ||
1676 | } | ||
1677 | set | ||
1678 | { | ||
1679 | this.afterFieldSet = true; | ||
1680 | this.afterField = value; | ||
1681 | } | ||
1682 | } | ||
1683 | |||
1684 | /// <summary> | ||
1685 | /// Component to search for. | ||
1686 | /// </summary> | ||
1687 | public string Guid | ||
1688 | { | ||
1689 | get | ||
1690 | { | ||
1691 | return this.guidField; | ||
1692 | } | ||
1693 | set | ||
1694 | { | ||
1695 | this.guidFieldSet = true; | ||
1696 | this.guidField = value; | ||
1697 | } | ||
1698 | } | ||
1699 | |||
1700 | /// <summary> | ||
1701 | /// Optional ProductCode to determine if the component is installed. | ||
1702 | /// </summary> | ||
1703 | public string ProductCode | ||
1704 | { | ||
1705 | get | ||
1706 | { | ||
1707 | return this.productCodeField; | ||
1708 | } | ||
1709 | set | ||
1710 | { | ||
1711 | this.productCodeFieldSet = true; | ||
1712 | this.productCodeField = value; | ||
1713 | } | ||
1714 | } | ||
1715 | |||
1716 | /// <summary> | ||
1717 | /// Rather than saving the matching key path into the variable, a ComponentSearch can save an attribute of the component instead. | ||
1718 | /// </summary> | ||
1719 | public ResultType Result | ||
1720 | { | ||
1721 | get | ||
1722 | { | ||
1723 | return this.resultField; | ||
1724 | } | ||
1725 | set | ||
1726 | { | ||
1727 | this.resultFieldSet = true; | ||
1728 | this.resultField = value; | ||
1729 | } | ||
1730 | } | ||
1731 | |||
1732 | public virtual ISchemaElement ParentElement | ||
1733 | { | ||
1734 | get | ||
1735 | { | ||
1736 | return this.parentElement; | ||
1737 | } | ||
1738 | set | ||
1739 | { | ||
1740 | this.parentElement = value; | ||
1741 | } | ||
1742 | } | ||
1743 | |||
1744 | /// <summary> | ||
1745 | /// Parses a ResultType from a string. | ||
1746 | /// </summary> | ||
1747 | public static ResultType ParseResultType(string value) | ||
1748 | { | ||
1749 | ResultType parsedValue; | ||
1750 | ComponentSearch.TryParseResultType(value, out parsedValue); | ||
1751 | return parsedValue; | ||
1752 | } | ||
1753 | |||
1754 | /// <summary> | ||
1755 | /// Tries to parse a ResultType from a string. | ||
1756 | /// </summary> | ||
1757 | public static bool TryParseResultType(string value, out ResultType parsedValue) | ||
1758 | { | ||
1759 | parsedValue = ResultType.NotSet; | ||
1760 | if (string.IsNullOrEmpty(value)) | ||
1761 | { | ||
1762 | return false; | ||
1763 | } | ||
1764 | if (("directory" == value)) | ||
1765 | { | ||
1766 | parsedValue = ResultType.directory; | ||
1767 | } | ||
1768 | else | ||
1769 | { | ||
1770 | if (("state" == value)) | ||
1771 | { | ||
1772 | parsedValue = ResultType.state; | ||
1773 | } | ||
1774 | else | ||
1775 | { | ||
1776 | if (("keyPath" == value)) | ||
1777 | { | ||
1778 | parsedValue = ResultType.keyPath; | ||
1779 | } | ||
1780 | else | ||
1781 | { | ||
1782 | parsedValue = ResultType.IllegalValue; | ||
1783 | return false; | ||
1784 | } | ||
1785 | } | ||
1786 | } | ||
1787 | return true; | ||
1788 | } | ||
1789 | |||
1790 | /// <summary> | ||
1791 | /// Processes this element and all child elements into an XmlWriter. | ||
1792 | /// </summary> | ||
1793 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
1794 | public virtual void OutputXml(XmlWriter writer) | ||
1795 | { | ||
1796 | if ((null == writer)) | ||
1797 | { | ||
1798 | throw new ArgumentNullException("writer"); | ||
1799 | } | ||
1800 | writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
1801 | if (this.idFieldSet) | ||
1802 | { | ||
1803 | writer.WriteAttributeString("Id", this.idField); | ||
1804 | } | ||
1805 | if (this.variableFieldSet) | ||
1806 | { | ||
1807 | writer.WriteAttributeString("Variable", this.variableField); | ||
1808 | } | ||
1809 | if (this.conditionFieldSet) | ||
1810 | { | ||
1811 | writer.WriteAttributeString("Condition", this.conditionField); | ||
1812 | } | ||
1813 | if (this.afterFieldSet) | ||
1814 | { | ||
1815 | writer.WriteAttributeString("After", this.afterField); | ||
1816 | } | ||
1817 | if (this.guidFieldSet) | ||
1818 | { | ||
1819 | writer.WriteAttributeString("Guid", this.guidField); | ||
1820 | } | ||
1821 | if (this.productCodeFieldSet) | ||
1822 | { | ||
1823 | writer.WriteAttributeString("ProductCode", this.productCodeField); | ||
1824 | } | ||
1825 | if (this.resultFieldSet) | ||
1826 | { | ||
1827 | if ((this.resultField == ResultType.directory)) | ||
1828 | { | ||
1829 | writer.WriteAttributeString("Result", "directory"); | ||
1830 | } | ||
1831 | if ((this.resultField == ResultType.state)) | ||
1832 | { | ||
1833 | writer.WriteAttributeString("Result", "state"); | ||
1834 | } | ||
1835 | if ((this.resultField == ResultType.keyPath)) | ||
1836 | { | ||
1837 | writer.WriteAttributeString("Result", "keyPath"); | ||
1838 | } | ||
1839 | } | ||
1840 | writer.WriteEndElement(); | ||
1841 | } | ||
1842 | |||
1843 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1844 | void ISetAttributes.SetAttribute(string name, string value) | ||
1845 | { | ||
1846 | if (String.IsNullOrEmpty(name)) | ||
1847 | { | ||
1848 | throw new ArgumentNullException("name"); | ||
1849 | } | ||
1850 | if (("Id" == name)) | ||
1851 | { | ||
1852 | this.idField = value; | ||
1853 | this.idFieldSet = true; | ||
1854 | } | ||
1855 | if (("Variable" == name)) | ||
1856 | { | ||
1857 | this.variableField = value; | ||
1858 | this.variableFieldSet = true; | ||
1859 | } | ||
1860 | if (("Condition" == name)) | ||
1861 | { | ||
1862 | this.conditionField = value; | ||
1863 | this.conditionFieldSet = true; | ||
1864 | } | ||
1865 | if (("After" == name)) | ||
1866 | { | ||
1867 | this.afterField = value; | ||
1868 | this.afterFieldSet = true; | ||
1869 | } | ||
1870 | if (("Guid" == name)) | ||
1871 | { | ||
1872 | this.guidField = value; | ||
1873 | this.guidFieldSet = true; | ||
1874 | } | ||
1875 | if (("ProductCode" == name)) | ||
1876 | { | ||
1877 | this.productCodeField = value; | ||
1878 | this.productCodeFieldSet = true; | ||
1879 | } | ||
1880 | if (("Result" == name)) | ||
1881 | { | ||
1882 | this.resultField = ComponentSearch.ParseResultType(value); | ||
1883 | this.resultFieldSet = true; | ||
1884 | } | ||
1885 | } | ||
1886 | |||
1887 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1888 | public enum ResultType | ||
1889 | { | ||
1890 | |||
1891 | IllegalValue = int.MaxValue, | ||
1892 | |||
1893 | NotSet = -1, | ||
1894 | |||
1895 | /// <summary> | ||
1896 | /// Saves the parent directory for the component's file key path; other types of key path are returned unmodified. | ||
1897 | /// </summary> | ||
1898 | directory, | ||
1899 | |||
1900 | /// <summary> | ||
1901 | /// Saves the state of the component: absent (2), locally installed (3), will run from source (4), or installed in default location (either local or from source) (5) | ||
1902 | /// </summary> | ||
1903 | state, | ||
1904 | |||
1905 | /// <summary> | ||
1906 | /// Saves the key path of the component if installed. This is the default. | ||
1907 | /// </summary> | ||
1908 | keyPath, | ||
1909 | } | ||
1910 | } | ||
1911 | |||
1912 | /// <summary> | ||
1913 | /// References a ComponentSearch. | ||
1914 | /// </summary> | ||
1915 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1916 | public class ComponentSearchRef : ISchemaElement, ISetAttributes | ||
1917 | { | ||
1918 | |||
1919 | private string idField; | ||
1920 | |||
1921 | private bool idFieldSet; | ||
1922 | |||
1923 | private ISchemaElement parentElement; | ||
1924 | |||
1925 | public string Id | ||
1926 | { | ||
1927 | get | ||
1928 | { | ||
1929 | return this.idField; | ||
1930 | } | ||
1931 | set | ||
1932 | { | ||
1933 | this.idFieldSet = true; | ||
1934 | this.idField = value; | ||
1935 | } | ||
1936 | } | ||
1937 | |||
1938 | public virtual ISchemaElement ParentElement | ||
1939 | { | ||
1940 | get | ||
1941 | { | ||
1942 | return this.parentElement; | ||
1943 | } | ||
1944 | set | ||
1945 | { | ||
1946 | this.parentElement = value; | ||
1947 | } | ||
1948 | } | ||
1949 | |||
1950 | /// <summary> | ||
1951 | /// Processes this element and all child elements into an XmlWriter. | ||
1952 | /// </summary> | ||
1953 | public virtual void OutputXml(XmlWriter writer) | ||
1954 | { | ||
1955 | if ((null == writer)) | ||
1956 | { | ||
1957 | throw new ArgumentNullException("writer"); | ||
1958 | } | ||
1959 | writer.WriteStartElement("ComponentSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
1960 | if (this.idFieldSet) | ||
1961 | { | ||
1962 | writer.WriteAttributeString("Id", this.idField); | ||
1963 | } | ||
1964 | writer.WriteEndElement(); | ||
1965 | } | ||
1966 | |||
1967 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1968 | void ISetAttributes.SetAttribute(string name, string value) | ||
1969 | { | ||
1970 | if (String.IsNullOrEmpty(name)) | ||
1971 | { | ||
1972 | throw new ArgumentNullException("name"); | ||
1973 | } | ||
1974 | if (("Id" == name)) | ||
1975 | { | ||
1976 | this.idField = value; | ||
1977 | this.idFieldSet = true; | ||
1978 | } | ||
1979 | } | ||
1980 | } | ||
1981 | |||
1982 | /// <summary> | ||
1983 | /// Describes a directory search. | ||
1984 | /// </summary> | ||
1985 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1986 | public class DirectorySearch : ISchemaElement, ISetAttributes | ||
1987 | { | ||
1988 | |||
1989 | private string idField; | ||
1990 | |||
1991 | private bool idFieldSet; | ||
1992 | |||
1993 | private string variableField; | ||
1994 | |||
1995 | private bool variableFieldSet; | ||
1996 | |||
1997 | private string conditionField; | ||
1998 | |||
1999 | private bool conditionFieldSet; | ||
2000 | |||
2001 | private string afterField; | ||
2002 | |||
2003 | private bool afterFieldSet; | ||
2004 | |||
2005 | private string pathField; | ||
2006 | |||
2007 | private bool pathFieldSet; | ||
2008 | |||
2009 | private ResultType resultField; | ||
2010 | |||
2011 | private bool resultFieldSet; | ||
2012 | |||
2013 | private ISchemaElement parentElement; | ||
2014 | |||
2015 | /// <summary> | ||
2016 | /// Id of the search for ordering and dependency. | ||
2017 | /// </summary> | ||
2018 | public string Id | ||
2019 | { | ||
2020 | get | ||
2021 | { | ||
2022 | return this.idField; | ||
2023 | } | ||
2024 | set | ||
2025 | { | ||
2026 | this.idFieldSet = true; | ||
2027 | this.idField = value; | ||
2028 | } | ||
2029 | } | ||
2030 | |||
2031 | /// <summary> | ||
2032 | /// Name of the variable in which to place the result of the search. | ||
2033 | /// </summary> | ||
2034 | public string Variable | ||
2035 | { | ||
2036 | get | ||
2037 | { | ||
2038 | return this.variableField; | ||
2039 | } | ||
2040 | set | ||
2041 | { | ||
2042 | this.variableFieldSet = true; | ||
2043 | this.variableField = value; | ||
2044 | } | ||
2045 | } | ||
2046 | |||
2047 | /// <summary> | ||
2048 | /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. | ||
2049 | /// </summary> | ||
2050 | public string Condition | ||
2051 | { | ||
2052 | get | ||
2053 | { | ||
2054 | return this.conditionField; | ||
2055 | } | ||
2056 | set | ||
2057 | { | ||
2058 | this.conditionFieldSet = true; | ||
2059 | this.conditionField = value; | ||
2060 | } | ||
2061 | } | ||
2062 | |||
2063 | /// <summary> | ||
2064 | /// Id of the search that this one should come after. | ||
2065 | /// </summary> | ||
2066 | public string After | ||
2067 | { | ||
2068 | get | ||
2069 | { | ||
2070 | return this.afterField; | ||
2071 | } | ||
2072 | set | ||
2073 | { | ||
2074 | this.afterFieldSet = true; | ||
2075 | this.afterField = value; | ||
2076 | } | ||
2077 | } | ||
2078 | |||
2079 | /// <summary> | ||
2080 | /// Directory path to search for. | ||
2081 | /// </summary> | ||
2082 | public string Path | ||
2083 | { | ||
2084 | get | ||
2085 | { | ||
2086 | return this.pathField; | ||
2087 | } | ||
2088 | set | ||
2089 | { | ||
2090 | this.pathFieldSet = true; | ||
2091 | this.pathField = value; | ||
2092 | } | ||
2093 | } | ||
2094 | |||
2095 | /// <summary> | ||
2096 | /// Rather than saving the matching directory path into the variable, a DirectorySearch can save an | ||
2097 | /// attribute of the matching directory instead. | ||
2098 | /// </summary> | ||
2099 | public ResultType Result | ||
2100 | { | ||
2101 | get | ||
2102 | { | ||
2103 | return this.resultField; | ||
2104 | } | ||
2105 | set | ||
2106 | { | ||
2107 | this.resultFieldSet = true; | ||
2108 | this.resultField = value; | ||
2109 | } | ||
2110 | } | ||
2111 | |||
2112 | public virtual ISchemaElement ParentElement | ||
2113 | { | ||
2114 | get | ||
2115 | { | ||
2116 | return this.parentElement; | ||
2117 | } | ||
2118 | set | ||
2119 | { | ||
2120 | this.parentElement = value; | ||
2121 | } | ||
2122 | } | ||
2123 | |||
2124 | /// <summary> | ||
2125 | /// Parses a ResultType from a string. | ||
2126 | /// </summary> | ||
2127 | public static ResultType ParseResultType(string value) | ||
2128 | { | ||
2129 | ResultType parsedValue; | ||
2130 | DirectorySearch.TryParseResultType(value, out parsedValue); | ||
2131 | return parsedValue; | ||
2132 | } | ||
2133 | |||
2134 | /// <summary> | ||
2135 | /// Tries to parse a ResultType from a string. | ||
2136 | /// </summary> | ||
2137 | public static bool TryParseResultType(string value, out ResultType parsedValue) | ||
2138 | { | ||
2139 | parsedValue = ResultType.NotSet; | ||
2140 | if (string.IsNullOrEmpty(value)) | ||
2141 | { | ||
2142 | return false; | ||
2143 | } | ||
2144 | if (("exists" == value)) | ||
2145 | { | ||
2146 | parsedValue = ResultType.exists; | ||
2147 | } | ||
2148 | else | ||
2149 | { | ||
2150 | parsedValue = ResultType.IllegalValue; | ||
2151 | return false; | ||
2152 | } | ||
2153 | return true; | ||
2154 | } | ||
2155 | |||
2156 | /// <summary> | ||
2157 | /// Processes this element and all child elements into an XmlWriter. | ||
2158 | /// </summary> | ||
2159 | public virtual void OutputXml(XmlWriter writer) | ||
2160 | { | ||
2161 | if ((null == writer)) | ||
2162 | { | ||
2163 | throw new ArgumentNullException("writer"); | ||
2164 | } | ||
2165 | writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
2166 | if (this.idFieldSet) | ||
2167 | { | ||
2168 | writer.WriteAttributeString("Id", this.idField); | ||
2169 | } | ||
2170 | if (this.variableFieldSet) | ||
2171 | { | ||
2172 | writer.WriteAttributeString("Variable", this.variableField); | ||
2173 | } | ||
2174 | if (this.conditionFieldSet) | ||
2175 | { | ||
2176 | writer.WriteAttributeString("Condition", this.conditionField); | ||
2177 | } | ||
2178 | if (this.afterFieldSet) | ||
2179 | { | ||
2180 | writer.WriteAttributeString("After", this.afterField); | ||
2181 | } | ||
2182 | if (this.pathFieldSet) | ||
2183 | { | ||
2184 | writer.WriteAttributeString("Path", this.pathField); | ||
2185 | } | ||
2186 | if (this.resultFieldSet) | ||
2187 | { | ||
2188 | if ((this.resultField == ResultType.exists)) | ||
2189 | { | ||
2190 | writer.WriteAttributeString("Result", "exists"); | ||
2191 | } | ||
2192 | } | ||
2193 | writer.WriteEndElement(); | ||
2194 | } | ||
2195 | |||
2196 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
2197 | void ISetAttributes.SetAttribute(string name, string value) | ||
2198 | { | ||
2199 | if (String.IsNullOrEmpty(name)) | ||
2200 | { | ||
2201 | throw new ArgumentNullException("name"); | ||
2202 | } | ||
2203 | if (("Id" == name)) | ||
2204 | { | ||
2205 | this.idField = value; | ||
2206 | this.idFieldSet = true; | ||
2207 | } | ||
2208 | if (("Variable" == name)) | ||
2209 | { | ||
2210 | this.variableField = value; | ||
2211 | this.variableFieldSet = true; | ||
2212 | } | ||
2213 | if (("Condition" == name)) | ||
2214 | { | ||
2215 | this.conditionField = value; | ||
2216 | this.conditionFieldSet = true; | ||
2217 | } | ||
2218 | if (("After" == name)) | ||
2219 | { | ||
2220 | this.afterField = value; | ||
2221 | this.afterFieldSet = true; | ||
2222 | } | ||
2223 | if (("Path" == name)) | ||
2224 | { | ||
2225 | this.pathField = value; | ||
2226 | this.pathFieldSet = true; | ||
2227 | } | ||
2228 | if (("Result" == name)) | ||
2229 | { | ||
2230 | this.resultField = DirectorySearch.ParseResultType(value); | ||
2231 | this.resultFieldSet = true; | ||
2232 | } | ||
2233 | } | ||
2234 | |||
2235 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
2236 | public enum ResultType | ||
2237 | { | ||
2238 | |||
2239 | IllegalValue = int.MaxValue, | ||
2240 | |||
2241 | NotSet = -1, | ||
2242 | |||
2243 | /// <summary> | ||
2244 | /// Saves true if a matching directory is found; false otherwise. | ||
2245 | /// </summary> | ||
2246 | exists, | ||
2247 | } | ||
2248 | } | ||
2249 | |||
2250 | /// <summary> | ||
2251 | /// References a DirectorySearch. | ||
2252 | /// </summary> | ||
2253 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
2254 | public class DirectorySearchRef : ISchemaElement, ISetAttributes | ||
2255 | { | ||
2256 | |||
2257 | private string idField; | ||
2258 | |||
2259 | private bool idFieldSet; | ||
2260 | |||
2261 | private ISchemaElement parentElement; | ||
2262 | |||
2263 | public string Id | ||
2264 | { | ||
2265 | get | ||
2266 | { | ||
2267 | return this.idField; | ||
2268 | } | ||
2269 | set | ||
2270 | { | ||
2271 | this.idFieldSet = true; | ||
2272 | this.idField = value; | ||
2273 | } | ||
2274 | } | ||
2275 | |||
2276 | public virtual ISchemaElement ParentElement | ||
2277 | { | ||
2278 | get | ||
2279 | { | ||
2280 | return this.parentElement; | ||
2281 | } | ||
2282 | set | ||
2283 | { | ||
2284 | this.parentElement = value; | ||
2285 | } | ||
2286 | } | ||
2287 | |||
2288 | /// <summary> | ||
2289 | /// Processes this element and all child elements into an XmlWriter. | ||
2290 | /// </summary> | ||
2291 | public virtual void OutputXml(XmlWriter writer) | ||
2292 | { | ||
2293 | if ((null == writer)) | ||
2294 | { | ||
2295 | throw new ArgumentNullException("writer"); | ||
2296 | } | ||
2297 | writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
2298 | if (this.idFieldSet) | ||
2299 | { | ||
2300 | writer.WriteAttributeString("Id", this.idField); | ||
2301 | } | ||
2302 | writer.WriteEndElement(); | ||
2303 | } | ||
2304 | |||
2305 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
2306 | void ISetAttributes.SetAttribute(string name, string value) | ||
2307 | { | ||
2308 | if (String.IsNullOrEmpty(name)) | ||
2309 | { | ||
2310 | throw new ArgumentNullException("name"); | ||
2311 | } | ||
2312 | if (("Id" == name)) | ||
2313 | { | ||
2314 | this.idField = value; | ||
2315 | this.idFieldSet = true; | ||
2316 | } | ||
2317 | } | ||
2318 | } | ||
2319 | |||
2320 | /// <summary> | ||
2321 | /// Creates an event source. | ||
2322 | /// </summary> | ||
2323 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
2324 | public class EventSource : ISchemaElement, ISetAttributes | ||
2325 | { | ||
2326 | |||
2327 | private int categoryCountField; | ||
2328 | |||
2329 | private bool categoryCountFieldSet; | ||
2330 | |||
2331 | private string categoryMessageFileField; | ||
2332 | |||
2333 | private bool categoryMessageFileFieldSet; | ||
2334 | |||
2335 | private string eventMessageFileField; | ||
2336 | |||
2337 | private bool eventMessageFileFieldSet; | ||
2338 | |||
2339 | private YesNoType keyPathField; | ||
2340 | |||
2341 | private bool keyPathFieldSet; | ||
2342 | |||
2343 | private string logField; | ||
2344 | |||
2345 | private bool logFieldSet; | ||
2346 | |||
2347 | private string nameField; | ||
2348 | |||
2349 | private bool nameFieldSet; | ||
2350 | |||
2351 | private string parameterMessageFileField; | ||
2352 | |||
2353 | private bool parameterMessageFileFieldSet; | ||
2354 | |||
2355 | private YesNoType supportsErrorsField; | ||
2356 | |||
2357 | private bool supportsErrorsFieldSet; | ||
2358 | |||
2359 | private YesNoType supportsFailureAuditsField; | ||
2360 | |||
2361 | private bool supportsFailureAuditsFieldSet; | ||
2362 | |||
2363 | private YesNoType supportsInformationalsField; | ||
2364 | |||
2365 | private bool supportsInformationalsFieldSet; | ||
2366 | |||
2367 | private YesNoType supportsSuccessAuditsField; | ||
2368 | |||
2369 | private bool supportsSuccessAuditsFieldSet; | ||
2370 | |||
2371 | private YesNoType supportsWarningsField; | ||
2372 | |||
2373 | private bool supportsWarningsFieldSet; | ||
2374 | |||
2375 | private ISchemaElement parentElement; | ||
2376 | |||
2377 | /// <summary> | ||
2378 | /// The number of categories in CategoryMessageFile. CategoryMessageFile | ||
2379 | /// must be specified too. | ||
2380 | /// </summary> | ||
2381 | public int CategoryCount | ||
2382 | { | ||
2383 | get | ||
2384 | { | ||
2385 | return this.categoryCountField; | ||
2386 | } | ||
2387 | set | ||
2388 | { | ||
2389 | this.categoryCountFieldSet = true; | ||
2390 | this.categoryCountField = value; | ||
2391 | } | ||
2392 | } | ||
2393 | |||
2394 | /// <summary> | ||
2395 | /// Name of the category message file. CategoryCount must be specified too. | ||
2396 | /// Note that this is a formatted field, so you can use [#fileId] syntax to | ||
2397 | /// refer to a file being installed. It is also written as a REG_EXPAND_SZ | ||
2398 | /// string, so you can use %environment_variable% syntax to refer to a file | ||
2399 | /// already present on the user's machine. | ||
2400 | /// </summary> | ||
2401 | public string CategoryMessageFile | ||
2402 | { | ||
2403 | get | ||
2404 | { | ||
2405 | return this.categoryMessageFileField; | ||
2406 | } | ||
2407 | set | ||
2408 | { | ||
2409 | this.categoryMessageFileFieldSet = true; | ||
2410 | this.categoryMessageFileField = value; | ||
2411 | } | ||
2412 | } | ||
2413 | |||
2414 | /// <summary> | ||
2415 | /// Name of the event message file. | ||
2416 | /// Note that this is a formatted field, so you can use [#fileId] syntax to | ||
2417 | /// refer to a file being installed. It is also written as a REG_EXPAND_SZ | ||
2418 | /// string, so you can use %environment_variable% syntax to refer to a file | ||
2419 | /// already present on the user's machine. | ||
2420 | /// </summary> | ||
2421 | public string EventMessageFile | ||
2422 | { | ||
2423 | get | ||
2424 | { | ||
2425 | return this.eventMessageFileField; | ||
2426 | } | ||
2427 | set | ||
2428 | { | ||
2429 | this.eventMessageFileFieldSet = true; | ||
2430 | this.eventMessageFileField = value; | ||
2431 | } | ||
2432 | } | ||
2433 | |||
2434 | /// <summary> | ||
2435 | /// Marks the EventSource registry as the key path of the component it belongs to. | ||
2436 | /// </summary> | ||
2437 | public YesNoType KeyPath | ||
2438 | { | ||
2439 | get | ||
2440 | { | ||
2441 | return this.keyPathField; | ||
2442 | } | ||
2443 | set | ||
2444 | { | ||
2445 | this.keyPathFieldSet = true; | ||
2446 | this.keyPathField = value; | ||
2447 | } | ||
2448 | } | ||
2449 | |||
2450 | /// <summary> | ||
2451 | /// Name of the event source's log. | ||
2452 | /// </summary> | ||
2453 | public string Log | ||
2454 | { | ||
2455 | get | ||
2456 | { | ||
2457 | return this.logField; | ||
2458 | } | ||
2459 | set | ||
2460 | { | ||
2461 | this.logFieldSet = true; | ||
2462 | this.logField = value; | ||
2463 | } | ||
2464 | } | ||
2465 | |||
2466 | /// <summary> | ||
2467 | /// Name of the event source. | ||
2468 | /// </summary> | ||
2469 | public string Name | ||
2470 | { | ||
2471 | get | ||
2472 | { | ||
2473 | return this.nameField; | ||
2474 | } | ||
2475 | set | ||
2476 | { | ||
2477 | this.nameFieldSet = true; | ||
2478 | this.nameField = value; | ||
2479 | } | ||
2480 | } | ||
2481 | |||
2482 | /// <summary> | ||
2483 | /// Name of the parameter message file. | ||
2484 | /// Note that this is a formatted field, so you can use [#fileId] syntax to | ||
2485 | /// refer to a file being installed. It is also written as a REG_EXPAND_SZ | ||
2486 | /// string, so you can use %environment_variable% syntax to refer to a file | ||
2487 | /// already present on the user's machine. | ||
2488 | /// </summary> | ||
2489 | public string ParameterMessageFile | ||
2490 | { | ||
2491 | get | ||
2492 | { | ||
2493 | return this.parameterMessageFileField; | ||
2494 | } | ||
2495 | set | ||
2496 | { | ||
2497 | this.parameterMessageFileFieldSet = true; | ||
2498 | this.parameterMessageFileField = value; | ||
2499 | } | ||
2500 | } | ||
2501 | |||
2502 | /// <summary> | ||
2503 | /// Equivalent to EVENTLOG_ERROR_TYPE. | ||
2504 | /// </summary> | ||
2505 | public YesNoType SupportsErrors | ||
2506 | { | ||
2507 | get | ||
2508 | { | ||
2509 | return this.supportsErrorsField; | ||
2510 | } | ||
2511 | set | ||
2512 | { | ||
2513 | this.supportsErrorsFieldSet = true; | ||
2514 | this.supportsErrorsField = value; | ||
2515 | } | ||
2516 | } | ||
2517 | |||
2518 | /// <summary> | ||
2519 | /// Equivalent to EVENTLOG_AUDIT_FAILURE. | ||
2520 | /// </summary> | ||
2521 | public YesNoType SupportsFailureAudits | ||
2522 | { | ||
2523 | get | ||
2524 | { | ||
2525 | return this.supportsFailureAuditsField; | ||
2526 | } | ||
2527 | set | ||
2528 | { | ||
2529 | this.supportsFailureAuditsFieldSet = true; | ||
2530 | this.supportsFailureAuditsField = value; | ||
2531 | } | ||
2532 | } | ||
2533 | |||
2534 | /// <summary> | ||
2535 | /// Equivalent to EVENTLOG_INFORMATION_TYPE. | ||
2536 | /// </summary> | ||
2537 | public YesNoType SupportsInformationals | ||
2538 | { | ||
2539 | get | ||
2540 | { | ||
2541 | return this.supportsInformationalsField; | ||
2542 | } | ||
2543 | set | ||
2544 | { | ||
2545 | this.supportsInformationalsFieldSet = true; | ||
2546 | this.supportsInformationalsField = value; | ||
2547 | } | ||
2548 | } | ||
2549 | |||
2550 | /// <summary> | ||
2551 | /// Equivalent to EVENTLOG_AUDIT_SUCCESS. | ||
2552 | /// </summary> | ||
2553 | public YesNoType SupportsSuccessAudits | ||
2554 | { | ||
2555 | get | ||
2556 | { | ||
2557 | return this.supportsSuccessAuditsField; | ||
2558 | } | ||
2559 | set | ||
2560 | { | ||
2561 | this.supportsSuccessAuditsFieldSet = true; | ||
2562 | this.supportsSuccessAuditsField = value; | ||
2563 | } | ||
2564 | } | ||
2565 | |||
2566 | /// <summary> | ||
2567 | /// Equivalent to EVENTLOG_WARNING_TYPE. | ||
2568 | /// </summary> | ||
2569 | public YesNoType SupportsWarnings | ||
2570 | { | ||
2571 | get | ||
2572 | { | ||
2573 | return this.supportsWarningsField; | ||
2574 | } | ||
2575 | set | ||
2576 | { | ||
2577 | this.supportsWarningsFieldSet = true; | ||
2578 | this.supportsWarningsField = value; | ||
2579 | } | ||
2580 | } | ||
2581 | |||
2582 | public virtual ISchemaElement ParentElement | ||
2583 | { | ||
2584 | get | ||
2585 | { | ||
2586 | return this.parentElement; | ||
2587 | } | ||
2588 | set | ||
2589 | { | ||
2590 | this.parentElement = value; | ||
2591 | } | ||
2592 | } | ||
2593 | |||
2594 | /// <summary> | ||
2595 | /// Processes this element and all child elements into an XmlWriter. | ||
2596 | /// </summary> | ||
2597 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
2598 | public virtual void OutputXml(XmlWriter writer) | ||
2599 | { | ||
2600 | if ((null == writer)) | ||
2601 | { | ||
2602 | throw new ArgumentNullException("writer"); | ||
2603 | } | ||
2604 | writer.WriteStartElement("EventSource", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
2605 | if (this.categoryCountFieldSet) | ||
2606 | { | ||
2607 | writer.WriteAttributeString("CategoryCount", this.categoryCountField.ToString(CultureInfo.InvariantCulture)); | ||
2608 | } | ||
2609 | if (this.categoryMessageFileFieldSet) | ||
2610 | { | ||
2611 | writer.WriteAttributeString("CategoryMessageFile", this.categoryMessageFileField); | ||
2612 | } | ||
2613 | if (this.eventMessageFileFieldSet) | ||
2614 | { | ||
2615 | writer.WriteAttributeString("EventMessageFile", this.eventMessageFileField); | ||
2616 | } | ||
2617 | if (this.keyPathFieldSet) | ||
2618 | { | ||
2619 | if ((this.keyPathField == YesNoType.no)) | ||
2620 | { | ||
2621 | writer.WriteAttributeString("KeyPath", "no"); | ||
2622 | } | ||
2623 | if ((this.keyPathField == YesNoType.yes)) | ||
2624 | { | ||
2625 | writer.WriteAttributeString("KeyPath", "yes"); | ||
2626 | } | ||
2627 | } | ||
2628 | if (this.logFieldSet) | ||
2629 | { | ||
2630 | writer.WriteAttributeString("Log", this.logField); | ||
2631 | } | ||
2632 | if (this.nameFieldSet) | ||
2633 | { | ||
2634 | writer.WriteAttributeString("Name", this.nameField); | ||
2635 | } | ||
2636 | if (this.parameterMessageFileFieldSet) | ||
2637 | { | ||
2638 | writer.WriteAttributeString("ParameterMessageFile", this.parameterMessageFileField); | ||
2639 | } | ||
2640 | if (this.supportsErrorsFieldSet) | ||
2641 | { | ||
2642 | if ((this.supportsErrorsField == YesNoType.no)) | ||
2643 | { | ||
2644 | writer.WriteAttributeString("SupportsErrors", "no"); | ||
2645 | } | ||
2646 | if ((this.supportsErrorsField == YesNoType.yes)) | ||
2647 | { | ||
2648 | writer.WriteAttributeString("SupportsErrors", "yes"); | ||
2649 | } | ||
2650 | } | ||
2651 | if (this.supportsFailureAuditsFieldSet) | ||
2652 | { | ||
2653 | if ((this.supportsFailureAuditsField == YesNoType.no)) | ||
2654 | { | ||
2655 | writer.WriteAttributeString("SupportsFailureAudits", "no"); | ||
2656 | } | ||
2657 | if ((this.supportsFailureAuditsField == YesNoType.yes)) | ||
2658 | { | ||
2659 | writer.WriteAttributeString("SupportsFailureAudits", "yes"); | ||
2660 | } | ||
2661 | } | ||
2662 | if (this.supportsInformationalsFieldSet) | ||
2663 | { | ||
2664 | if ((this.supportsInformationalsField == YesNoType.no)) | ||
2665 | { | ||
2666 | writer.WriteAttributeString("SupportsInformationals", "no"); | ||
2667 | } | ||
2668 | if ((this.supportsInformationalsField == YesNoType.yes)) | ||
2669 | { | ||
2670 | writer.WriteAttributeString("SupportsInformationals", "yes"); | ||
2671 | } | ||
2672 | } | ||
2673 | if (this.supportsSuccessAuditsFieldSet) | ||
2674 | { | ||
2675 | if ((this.supportsSuccessAuditsField == YesNoType.no)) | ||
2676 | { | ||
2677 | writer.WriteAttributeString("SupportsSuccessAudits", "no"); | ||
2678 | } | ||
2679 | if ((this.supportsSuccessAuditsField == YesNoType.yes)) | ||
2680 | { | ||
2681 | writer.WriteAttributeString("SupportsSuccessAudits", "yes"); | ||
2682 | } | ||
2683 | } | ||
2684 | if (this.supportsWarningsFieldSet) | ||
2685 | { | ||
2686 | if ((this.supportsWarningsField == YesNoType.no)) | ||
2687 | { | ||
2688 | writer.WriteAttributeString("SupportsWarnings", "no"); | ||
2689 | } | ||
2690 | if ((this.supportsWarningsField == YesNoType.yes)) | ||
2691 | { | ||
2692 | writer.WriteAttributeString("SupportsWarnings", "yes"); | ||
2693 | } | ||
2694 | } | ||
2695 | writer.WriteEndElement(); | ||
2696 | } | ||
2697 | |||
2698 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
2699 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
2700 | void ISetAttributes.SetAttribute(string name, string value) | ||
2701 | { | ||
2702 | if (String.IsNullOrEmpty(name)) | ||
2703 | { | ||
2704 | throw new ArgumentNullException("name"); | ||
2705 | } | ||
2706 | if (("CategoryCount" == name)) | ||
2707 | { | ||
2708 | this.categoryCountField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
2709 | this.categoryCountFieldSet = true; | ||
2710 | } | ||
2711 | if (("CategoryMessageFile" == name)) | ||
2712 | { | ||
2713 | this.categoryMessageFileField = value; | ||
2714 | this.categoryMessageFileFieldSet = true; | ||
2715 | } | ||
2716 | if (("EventMessageFile" == name)) | ||
2717 | { | ||
2718 | this.eventMessageFileField = value; | ||
2719 | this.eventMessageFileFieldSet = true; | ||
2720 | } | ||
2721 | if (("KeyPath" == name)) | ||
2722 | { | ||
2723 | this.keyPathField = Enums.ParseYesNoType(value); | ||
2724 | this.keyPathFieldSet = true; | ||
2725 | } | ||
2726 | if (("Log" == name)) | ||
2727 | { | ||
2728 | this.logField = value; | ||
2729 | this.logFieldSet = true; | ||
2730 | } | ||
2731 | if (("Name" == name)) | ||
2732 | { | ||
2733 | this.nameField = value; | ||
2734 | this.nameFieldSet = true; | ||
2735 | } | ||
2736 | if (("ParameterMessageFile" == name)) | ||
2737 | { | ||
2738 | this.parameterMessageFileField = value; | ||
2739 | this.parameterMessageFileFieldSet = true; | ||
2740 | } | ||
2741 | if (("SupportsErrors" == name)) | ||
2742 | { | ||
2743 | this.supportsErrorsField = Enums.ParseYesNoType(value); | ||
2744 | this.supportsErrorsFieldSet = true; | ||
2745 | } | ||
2746 | if (("SupportsFailureAudits" == name)) | ||
2747 | { | ||
2748 | this.supportsFailureAuditsField = Enums.ParseYesNoType(value); | ||
2749 | this.supportsFailureAuditsFieldSet = true; | ||
2750 | } | ||
2751 | if (("SupportsInformationals" == name)) | ||
2752 | { | ||
2753 | this.supportsInformationalsField = Enums.ParseYesNoType(value); | ||
2754 | this.supportsInformationalsFieldSet = true; | ||
2755 | } | ||
2756 | if (("SupportsSuccessAudits" == name)) | ||
2757 | { | ||
2758 | this.supportsSuccessAuditsField = Enums.ParseYesNoType(value); | ||
2759 | this.supportsSuccessAuditsFieldSet = true; | ||
2760 | } | ||
2761 | if (("SupportsWarnings" == name)) | ||
2762 | { | ||
2763 | this.supportsWarningsField = Enums.ParseYesNoType(value); | ||
2764 | this.supportsWarningsFieldSet = true; | ||
2765 | } | ||
2766 | } | ||
2767 | } | ||
2768 | |||
2769 | /// <summary> | ||
2770 | /// Describes a file search. | ||
2771 | /// </summary> | ||
2772 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
2773 | public class FileSearch : ISchemaElement, ISetAttributes | ||
2774 | { | ||
2775 | |||
2776 | private string idField; | ||
2777 | |||
2778 | private bool idFieldSet; | ||
2779 | |||
2780 | private string variableField; | ||
2781 | |||
2782 | private bool variableFieldSet; | ||
2783 | |||
2784 | private string conditionField; | ||
2785 | |||
2786 | private bool conditionFieldSet; | ||
2787 | |||
2788 | private string afterField; | ||
2789 | |||
2790 | private bool afterFieldSet; | ||
2791 | |||
2792 | private string pathField; | ||
2793 | |||
2794 | private bool pathFieldSet; | ||
2795 | |||
2796 | private ResultType resultField; | ||
2797 | |||
2798 | private bool resultFieldSet; | ||
2799 | |||
2800 | private ISchemaElement parentElement; | ||
2801 | |||
2802 | /// <summary> | ||
2803 | /// Id of the search for ordering and dependency. | ||
2804 | /// </summary> | ||
2805 | public string Id | ||
2806 | { | ||
2807 | get | ||
2808 | { | ||
2809 | return this.idField; | ||
2810 | } | ||
2811 | set | ||
2812 | { | ||
2813 | this.idFieldSet = true; | ||
2814 | this.idField = value; | ||
2815 | } | ||
2816 | } | ||
2817 | |||
2818 | /// <summary> | ||
2819 | /// Name of the variable in which to place the result of the search. | ||
2820 | /// </summary> | ||
2821 | public string Variable | ||
2822 | { | ||
2823 | get | ||
2824 | { | ||
2825 | return this.variableField; | ||
2826 | } | ||
2827 | set | ||
2828 | { | ||
2829 | this.variableFieldSet = true; | ||
2830 | this.variableField = value; | ||
2831 | } | ||
2832 | } | ||
2833 | |||
2834 | /// <summary> | ||
2835 | /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. | ||
2836 | /// </summary> | ||
2837 | public string Condition | ||
2838 | { | ||
2839 | get | ||
2840 | { | ||
2841 | return this.conditionField; | ||
2842 | } | ||
2843 | set | ||
2844 | { | ||
2845 | this.conditionFieldSet = true; | ||
2846 | this.conditionField = value; | ||
2847 | } | ||
2848 | } | ||
2849 | |||
2850 | /// <summary> | ||
2851 | /// Id of the search that this one should come after. | ||
2852 | /// </summary> | ||
2853 | public string After | ||
2854 | { | ||
2855 | get | ||
2856 | { | ||
2857 | return this.afterField; | ||
2858 | } | ||
2859 | set | ||
2860 | { | ||
2861 | this.afterFieldSet = true; | ||
2862 | this.afterField = value; | ||
2863 | } | ||
2864 | } | ||
2865 | |||
2866 | /// <summary> | ||
2867 | /// File path to search for. | ||
2868 | /// </summary> | ||
2869 | public string Path | ||
2870 | { | ||
2871 | get | ||
2872 | { | ||
2873 | return this.pathField; | ||
2874 | } | ||
2875 | set | ||
2876 | { | ||
2877 | this.pathFieldSet = true; | ||
2878 | this.pathField = value; | ||
2879 | } | ||
2880 | } | ||
2881 | |||
2882 | /// <summary> | ||
2883 | /// Rather than saving the matching file path into the variable, a FileSearch can save an attribute of the matching file instead. | ||
2884 | /// </summary> | ||
2885 | public ResultType Result | ||
2886 | { | ||
2887 | get | ||
2888 | { | ||
2889 | return this.resultField; | ||
2890 | } | ||
2891 | set | ||
2892 | { | ||
2893 | this.resultFieldSet = true; | ||
2894 | this.resultField = value; | ||
2895 | } | ||
2896 | } | ||
2897 | |||
2898 | public virtual ISchemaElement ParentElement | ||
2899 | { | ||
2900 | get | ||
2901 | { | ||
2902 | return this.parentElement; | ||
2903 | } | ||
2904 | set | ||
2905 | { | ||
2906 | this.parentElement = value; | ||
2907 | } | ||
2908 | } | ||
2909 | |||
2910 | /// <summary> | ||
2911 | /// Parses a ResultType from a string. | ||
2912 | /// </summary> | ||
2913 | public static ResultType ParseResultType(string value) | ||
2914 | { | ||
2915 | ResultType parsedValue; | ||
2916 | FileSearch.TryParseResultType(value, out parsedValue); | ||
2917 | return parsedValue; | ||
2918 | } | ||
2919 | |||
2920 | /// <summary> | ||
2921 | /// Tries to parse a ResultType from a string. | ||
2922 | /// </summary> | ||
2923 | public static bool TryParseResultType(string value, out ResultType parsedValue) | ||
2924 | { | ||
2925 | parsedValue = ResultType.NotSet; | ||
2926 | if (string.IsNullOrEmpty(value)) | ||
2927 | { | ||
2928 | return false; | ||
2929 | } | ||
2930 | if (("exists" == value)) | ||
2931 | { | ||
2932 | parsedValue = ResultType.exists; | ||
2933 | } | ||
2934 | else | ||
2935 | { | ||
2936 | if (("version" == value)) | ||
2937 | { | ||
2938 | parsedValue = ResultType.version; | ||
2939 | } | ||
2940 | else | ||
2941 | { | ||
2942 | parsedValue = ResultType.IllegalValue; | ||
2943 | return false; | ||
2944 | } | ||
2945 | } | ||
2946 | return true; | ||
2947 | } | ||
2948 | |||
2949 | /// <summary> | ||
2950 | /// Processes this element and all child elements into an XmlWriter. | ||
2951 | /// </summary> | ||
2952 | public virtual void OutputXml(XmlWriter writer) | ||
2953 | { | ||
2954 | if ((null == writer)) | ||
2955 | { | ||
2956 | throw new ArgumentNullException("writer"); | ||
2957 | } | ||
2958 | writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
2959 | if (this.idFieldSet) | ||
2960 | { | ||
2961 | writer.WriteAttributeString("Id", this.idField); | ||
2962 | } | ||
2963 | if (this.variableFieldSet) | ||
2964 | { | ||
2965 | writer.WriteAttributeString("Variable", this.variableField); | ||
2966 | } | ||
2967 | if (this.conditionFieldSet) | ||
2968 | { | ||
2969 | writer.WriteAttributeString("Condition", this.conditionField); | ||
2970 | } | ||
2971 | if (this.afterFieldSet) | ||
2972 | { | ||
2973 | writer.WriteAttributeString("After", this.afterField); | ||
2974 | } | ||
2975 | if (this.pathFieldSet) | ||
2976 | { | ||
2977 | writer.WriteAttributeString("Path", this.pathField); | ||
2978 | } | ||
2979 | if (this.resultFieldSet) | ||
2980 | { | ||
2981 | if ((this.resultField == ResultType.exists)) | ||
2982 | { | ||
2983 | writer.WriteAttributeString("Result", "exists"); | ||
2984 | } | ||
2985 | if ((this.resultField == ResultType.version)) | ||
2986 | { | ||
2987 | writer.WriteAttributeString("Result", "version"); | ||
2988 | } | ||
2989 | } | ||
2990 | writer.WriteEndElement(); | ||
2991 | } | ||
2992 | |||
2993 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
2994 | void ISetAttributes.SetAttribute(string name, string value) | ||
2995 | { | ||
2996 | if (String.IsNullOrEmpty(name)) | ||
2997 | { | ||
2998 | throw new ArgumentNullException("name"); | ||
2999 | } | ||
3000 | if (("Id" == name)) | ||
3001 | { | ||
3002 | this.idField = value; | ||
3003 | this.idFieldSet = true; | ||
3004 | } | ||
3005 | if (("Variable" == name)) | ||
3006 | { | ||
3007 | this.variableField = value; | ||
3008 | this.variableFieldSet = true; | ||
3009 | } | ||
3010 | if (("Condition" == name)) | ||
3011 | { | ||
3012 | this.conditionField = value; | ||
3013 | this.conditionFieldSet = true; | ||
3014 | } | ||
3015 | if (("After" == name)) | ||
3016 | { | ||
3017 | this.afterField = value; | ||
3018 | this.afterFieldSet = true; | ||
3019 | } | ||
3020 | if (("Path" == name)) | ||
3021 | { | ||
3022 | this.pathField = value; | ||
3023 | this.pathFieldSet = true; | ||
3024 | } | ||
3025 | if (("Result" == name)) | ||
3026 | { | ||
3027 | this.resultField = FileSearch.ParseResultType(value); | ||
3028 | this.resultFieldSet = true; | ||
3029 | } | ||
3030 | } | ||
3031 | |||
3032 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
3033 | public enum ResultType | ||
3034 | { | ||
3035 | |||
3036 | IllegalValue = int.MaxValue, | ||
3037 | |||
3038 | NotSet = -1, | ||
3039 | |||
3040 | /// <summary> | ||
3041 | /// Saves true if a matching file is found; false otherwise. | ||
3042 | /// </summary> | ||
3043 | exists, | ||
3044 | |||
3045 | /// <summary> | ||
3046 | /// Saves the version information for files that have it (.exe, .dll); zero-version (0.0.0.0) otherwise. | ||
3047 | /// </summary> | ||
3048 | version, | ||
3049 | } | ||
3050 | } | ||
3051 | |||
3052 | /// <summary> | ||
3053 | /// References a FileSearch. | ||
3054 | /// </summary> | ||
3055 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
3056 | public class FileSearchRef : ISchemaElement, ISetAttributes | ||
3057 | { | ||
3058 | |||
3059 | private string idField; | ||
3060 | |||
3061 | private bool idFieldSet; | ||
3062 | |||
3063 | private ISchemaElement parentElement; | ||
3064 | |||
3065 | public string Id | ||
3066 | { | ||
3067 | get | ||
3068 | { | ||
3069 | return this.idField; | ||
3070 | } | ||
3071 | set | ||
3072 | { | ||
3073 | this.idFieldSet = true; | ||
3074 | this.idField = value; | ||
3075 | } | ||
3076 | } | ||
3077 | |||
3078 | public virtual ISchemaElement ParentElement | ||
3079 | { | ||
3080 | get | ||
3081 | { | ||
3082 | return this.parentElement; | ||
3083 | } | ||
3084 | set | ||
3085 | { | ||
3086 | this.parentElement = value; | ||
3087 | } | ||
3088 | } | ||
3089 | |||
3090 | /// <summary> | ||
3091 | /// Processes this element and all child elements into an XmlWriter. | ||
3092 | /// </summary> | ||
3093 | public virtual void OutputXml(XmlWriter writer) | ||
3094 | { | ||
3095 | if ((null == writer)) | ||
3096 | { | ||
3097 | throw new ArgumentNullException("writer"); | ||
3098 | } | ||
3099 | writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
3100 | if (this.idFieldSet) | ||
3101 | { | ||
3102 | writer.WriteAttributeString("Id", this.idField); | ||
3103 | } | ||
3104 | writer.WriteEndElement(); | ||
3105 | } | ||
3106 | |||
3107 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
3108 | void ISetAttributes.SetAttribute(string name, string value) | ||
3109 | { | ||
3110 | if (String.IsNullOrEmpty(name)) | ||
3111 | { | ||
3112 | throw new ArgumentNullException("name"); | ||
3113 | } | ||
3114 | if (("Id" == name)) | ||
3115 | { | ||
3116 | this.idField = value; | ||
3117 | this.idFieldSet = true; | ||
3118 | } | ||
3119 | } | ||
3120 | } | ||
3121 | |||
3122 | /// <summary> | ||
3123 | /// Creates a file share out of the component's directory. | ||
3124 | /// </summary> | ||
3125 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
3126 | public class FileShare : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes | ||
3127 | { | ||
3128 | |||
3129 | private ElementCollection children; | ||
3130 | |||
3131 | private string idField; | ||
3132 | |||
3133 | private bool idFieldSet; | ||
3134 | |||
3135 | private string nameField; | ||
3136 | |||
3137 | private bool nameFieldSet; | ||
3138 | |||
3139 | private string descriptionField; | ||
3140 | |||
3141 | private bool descriptionFieldSet; | ||
3142 | |||
3143 | private ISchemaElement parentElement; | ||
3144 | |||
3145 | public FileShare() | ||
3146 | { | ||
3147 | ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); | ||
3148 | childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(FileSharePermission))); | ||
3149 | this.children = childCollection0; | ||
3150 | } | ||
3151 | |||
3152 | public virtual IEnumerable Children | ||
3153 | { | ||
3154 | get | ||
3155 | { | ||
3156 | return this.children; | ||
3157 | } | ||
3158 | } | ||
3159 | |||
3160 | [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] | ||
3161 | public virtual IEnumerable this[System.Type childType] | ||
3162 | { | ||
3163 | get | ||
3164 | { | ||
3165 | return this.children.Filter(childType); | ||
3166 | } | ||
3167 | } | ||
3168 | |||
3169 | /// <summary> | ||
3170 | /// Identifier for the file share (primary key). | ||
3171 | /// </summary> | ||
3172 | public string Id | ||
3173 | { | ||
3174 | get | ||
3175 | { | ||
3176 | return this.idField; | ||
3177 | } | ||
3178 | set | ||
3179 | { | ||
3180 | this.idFieldSet = true; | ||
3181 | this.idField = value; | ||
3182 | } | ||
3183 | } | ||
3184 | |||
3185 | /// <summary> | ||
3186 | /// Name of the file share. | ||
3187 | /// </summary> | ||
3188 | public string Name | ||
3189 | { | ||
3190 | get | ||
3191 | { | ||
3192 | return this.nameField; | ||
3193 | } | ||
3194 | set | ||
3195 | { | ||
3196 | this.nameFieldSet = true; | ||
3197 | this.nameField = value; | ||
3198 | } | ||
3199 | } | ||
3200 | |||
3201 | /// <summary> | ||
3202 | /// Description of the file share. | ||
3203 | /// </summary> | ||
3204 | public string Description | ||
3205 | { | ||
3206 | get | ||
3207 | { | ||
3208 | return this.descriptionField; | ||
3209 | } | ||
3210 | set | ||
3211 | { | ||
3212 | this.descriptionFieldSet = true; | ||
3213 | this.descriptionField = value; | ||
3214 | } | ||
3215 | } | ||
3216 | |||
3217 | public virtual ISchemaElement ParentElement | ||
3218 | { | ||
3219 | get | ||
3220 | { | ||
3221 | return this.parentElement; | ||
3222 | } | ||
3223 | set | ||
3224 | { | ||
3225 | this.parentElement = value; | ||
3226 | } | ||
3227 | } | ||
3228 | |||
3229 | public virtual void AddChild(ISchemaElement child) | ||
3230 | { | ||
3231 | if ((null == child)) | ||
3232 | { | ||
3233 | throw new ArgumentNullException("child"); | ||
3234 | } | ||
3235 | this.children.AddElement(child); | ||
3236 | child.ParentElement = this; | ||
3237 | } | ||
3238 | |||
3239 | public virtual void RemoveChild(ISchemaElement child) | ||
3240 | { | ||
3241 | if ((null == child)) | ||
3242 | { | ||
3243 | throw new ArgumentNullException("child"); | ||
3244 | } | ||
3245 | this.children.RemoveElement(child); | ||
3246 | child.ParentElement = null; | ||
3247 | } | ||
3248 | |||
3249 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
3250 | ISchemaElement ICreateChildren.CreateChild(string childName) | ||
3251 | { | ||
3252 | if (String.IsNullOrEmpty(childName)) | ||
3253 | { | ||
3254 | throw new ArgumentNullException("childName"); | ||
3255 | } | ||
3256 | ISchemaElement childValue = null; | ||
3257 | if (("FileSharePermission" == childName)) | ||
3258 | { | ||
3259 | childValue = new FileSharePermission(); | ||
3260 | } | ||
3261 | if ((null == childValue)) | ||
3262 | { | ||
3263 | throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); | ||
3264 | } | ||
3265 | return childValue; | ||
3266 | } | ||
3267 | |||
3268 | /// <summary> | ||
3269 | /// Processes this element and all child elements into an XmlWriter. | ||
3270 | /// </summary> | ||
3271 | public virtual void OutputXml(XmlWriter writer) | ||
3272 | { | ||
3273 | if ((null == writer)) | ||
3274 | { | ||
3275 | throw new ArgumentNullException("writer"); | ||
3276 | } | ||
3277 | writer.WriteStartElement("FileShare", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
3278 | if (this.idFieldSet) | ||
3279 | { | ||
3280 | writer.WriteAttributeString("Id", this.idField); | ||
3281 | } | ||
3282 | if (this.nameFieldSet) | ||
3283 | { | ||
3284 | writer.WriteAttributeString("Name", this.nameField); | ||
3285 | } | ||
3286 | if (this.descriptionFieldSet) | ||
3287 | { | ||
3288 | writer.WriteAttributeString("Description", this.descriptionField); | ||
3289 | } | ||
3290 | for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) | ||
3291 | { | ||
3292 | ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); | ||
3293 | childElement.OutputXml(writer); | ||
3294 | } | ||
3295 | writer.WriteEndElement(); | ||
3296 | } | ||
3297 | |||
3298 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
3299 | void ISetAttributes.SetAttribute(string name, string value) | ||
3300 | { | ||
3301 | if (String.IsNullOrEmpty(name)) | ||
3302 | { | ||
3303 | throw new ArgumentNullException("name"); | ||
3304 | } | ||
3305 | if (("Id" == name)) | ||
3306 | { | ||
3307 | this.idField = value; | ||
3308 | this.idFieldSet = true; | ||
3309 | } | ||
3310 | if (("Name" == name)) | ||
3311 | { | ||
3312 | this.nameField = value; | ||
3313 | this.nameFieldSet = true; | ||
3314 | } | ||
3315 | if (("Description" == name)) | ||
3316 | { | ||
3317 | this.descriptionField = value; | ||
3318 | this.descriptionFieldSet = true; | ||
3319 | } | ||
3320 | } | ||
3321 | } | ||
3322 | |||
3323 | /// <summary> | ||
3324 | /// Sets ACLs on a FileShare. This element has no Id attribute. | ||
3325 | /// The table and key are taken from the parent element. | ||
3326 | /// </summary> | ||
3327 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
3328 | public class FileSharePermission : ISchemaElement, ISetAttributes | ||
3329 | { | ||
3330 | |||
3331 | private string userField; | ||
3332 | |||
3333 | private bool userFieldSet; | ||
3334 | |||
3335 | private YesNoType readField; | ||
3336 | |||
3337 | private bool readFieldSet; | ||
3338 | |||
3339 | private YesNoType deleteField; | ||
3340 | |||
3341 | private bool deleteFieldSet; | ||
3342 | |||
3343 | private YesNoType readPermissionField; | ||
3344 | |||
3345 | private bool readPermissionFieldSet; | ||
3346 | |||
3347 | private YesNoType changePermissionField; | ||
3348 | |||
3349 | private bool changePermissionFieldSet; | ||
3350 | |||
3351 | private YesNoType takeOwnershipField; | ||
3352 | |||
3353 | private bool takeOwnershipFieldSet; | ||
3354 | |||
3355 | private YesNoType readAttributesField; | ||
3356 | |||
3357 | private bool readAttributesFieldSet; | ||
3358 | |||
3359 | private YesNoType writeAttributesField; | ||
3360 | |||
3361 | private bool writeAttributesFieldSet; | ||
3362 | |||
3363 | private YesNoType readExtendedAttributesField; | ||
3364 | |||
3365 | private bool readExtendedAttributesFieldSet; | ||
3366 | |||
3367 | private YesNoType writeExtendedAttributesField; | ||
3368 | |||
3369 | private bool writeExtendedAttributesFieldSet; | ||
3370 | |||
3371 | private YesNoType synchronizeField; | ||
3372 | |||
3373 | private bool synchronizeFieldSet; | ||
3374 | |||
3375 | private YesNoType createFileField; | ||
3376 | |||
3377 | private bool createFileFieldSet; | ||
3378 | |||
3379 | private YesNoType createChildField; | ||
3380 | |||
3381 | private bool createChildFieldSet; | ||
3382 | |||
3383 | private YesNoType deleteChildField; | ||
3384 | |||
3385 | private bool deleteChildFieldSet; | ||
3386 | |||
3387 | private YesNoType traverseField; | ||
3388 | |||
3389 | private bool traverseFieldSet; | ||
3390 | |||
3391 | private YesNoType genericAllField; | ||
3392 | |||
3393 | private bool genericAllFieldSet; | ||
3394 | |||
3395 | private YesNoType genericExecuteField; | ||
3396 | |||
3397 | private bool genericExecuteFieldSet; | ||
3398 | |||
3399 | private YesNoType genericWriteField; | ||
3400 | |||
3401 | private bool genericWriteFieldSet; | ||
3402 | |||
3403 | private YesNoType genericReadField; | ||
3404 | |||
3405 | private bool genericReadFieldSet; | ||
3406 | |||
3407 | private ISchemaElement parentElement; | ||
3408 | |||
3409 | public string User | ||
3410 | { | ||
3411 | get | ||
3412 | { | ||
3413 | return this.userField; | ||
3414 | } | ||
3415 | set | ||
3416 | { | ||
3417 | this.userFieldSet = true; | ||
3418 | this.userField = value; | ||
3419 | } | ||
3420 | } | ||
3421 | |||
3422 | public YesNoType Read | ||
3423 | { | ||
3424 | get | ||
3425 | { | ||
3426 | return this.readField; | ||
3427 | } | ||
3428 | set | ||
3429 | { | ||
3430 | this.readFieldSet = true; | ||
3431 | this.readField = value; | ||
3432 | } | ||
3433 | } | ||
3434 | |||
3435 | public YesNoType Delete | ||
3436 | { | ||
3437 | get | ||
3438 | { | ||
3439 | return this.deleteField; | ||
3440 | } | ||
3441 | set | ||
3442 | { | ||
3443 | this.deleteFieldSet = true; | ||
3444 | this.deleteField = value; | ||
3445 | } | ||
3446 | } | ||
3447 | |||
3448 | public YesNoType ReadPermission | ||
3449 | { | ||
3450 | get | ||
3451 | { | ||
3452 | return this.readPermissionField; | ||
3453 | } | ||
3454 | set | ||
3455 | { | ||
3456 | this.readPermissionFieldSet = true; | ||
3457 | this.readPermissionField = value; | ||
3458 | } | ||
3459 | } | ||
3460 | |||
3461 | public YesNoType ChangePermission | ||
3462 | { | ||
3463 | get | ||
3464 | { | ||
3465 | return this.changePermissionField; | ||
3466 | } | ||
3467 | set | ||
3468 | { | ||
3469 | this.changePermissionFieldSet = true; | ||
3470 | this.changePermissionField = value; | ||
3471 | } | ||
3472 | } | ||
3473 | |||
3474 | public YesNoType TakeOwnership | ||
3475 | { | ||
3476 | get | ||
3477 | { | ||
3478 | return this.takeOwnershipField; | ||
3479 | } | ||
3480 | set | ||
3481 | { | ||
3482 | this.takeOwnershipFieldSet = true; | ||
3483 | this.takeOwnershipField = value; | ||
3484 | } | ||
3485 | } | ||
3486 | |||
3487 | public YesNoType ReadAttributes | ||
3488 | { | ||
3489 | get | ||
3490 | { | ||
3491 | return this.readAttributesField; | ||
3492 | } | ||
3493 | set | ||
3494 | { | ||
3495 | this.readAttributesFieldSet = true; | ||
3496 | this.readAttributesField = value; | ||
3497 | } | ||
3498 | } | ||
3499 | |||
3500 | public YesNoType WriteAttributes | ||
3501 | { | ||
3502 | get | ||
3503 | { | ||
3504 | return this.writeAttributesField; | ||
3505 | } | ||
3506 | set | ||
3507 | { | ||
3508 | this.writeAttributesFieldSet = true; | ||
3509 | this.writeAttributesField = value; | ||
3510 | } | ||
3511 | } | ||
3512 | |||
3513 | public YesNoType ReadExtendedAttributes | ||
3514 | { | ||
3515 | get | ||
3516 | { | ||
3517 | return this.readExtendedAttributesField; | ||
3518 | } | ||
3519 | set | ||
3520 | { | ||
3521 | this.readExtendedAttributesFieldSet = true; | ||
3522 | this.readExtendedAttributesField = value; | ||
3523 | } | ||
3524 | } | ||
3525 | |||
3526 | public YesNoType WriteExtendedAttributes | ||
3527 | { | ||
3528 | get | ||
3529 | { | ||
3530 | return this.writeExtendedAttributesField; | ||
3531 | } | ||
3532 | set | ||
3533 | { | ||
3534 | this.writeExtendedAttributesFieldSet = true; | ||
3535 | this.writeExtendedAttributesField = value; | ||
3536 | } | ||
3537 | } | ||
3538 | |||
3539 | public YesNoType Synchronize | ||
3540 | { | ||
3541 | get | ||
3542 | { | ||
3543 | return this.synchronizeField; | ||
3544 | } | ||
3545 | set | ||
3546 | { | ||
3547 | this.synchronizeFieldSet = true; | ||
3548 | this.synchronizeField = value; | ||
3549 | } | ||
3550 | } | ||
3551 | |||
3552 | /// <summary> | ||
3553 | /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. | ||
3554 | /// </summary> | ||
3555 | public YesNoType CreateFile | ||
3556 | { | ||
3557 | get | ||
3558 | { | ||
3559 | return this.createFileField; | ||
3560 | } | ||
3561 | set | ||
3562 | { | ||
3563 | this.createFileFieldSet = true; | ||
3564 | this.createFileField = value; | ||
3565 | } | ||
3566 | } | ||
3567 | |||
3568 | /// <summary> | ||
3569 | /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. | ||
3570 | /// </summary> | ||
3571 | public YesNoType CreateChild | ||
3572 | { | ||
3573 | get | ||
3574 | { | ||
3575 | return this.createChildField; | ||
3576 | } | ||
3577 | set | ||
3578 | { | ||
3579 | this.createChildFieldSet = true; | ||
3580 | this.createChildField = value; | ||
3581 | } | ||
3582 | } | ||
3583 | |||
3584 | /// <summary> | ||
3585 | /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent. | ||
3586 | /// </summary> | ||
3587 | public YesNoType DeleteChild | ||
3588 | { | ||
3589 | get | ||
3590 | { | ||
3591 | return this.deleteChildField; | ||
3592 | } | ||
3593 | set | ||
3594 | { | ||
3595 | this.deleteChildFieldSet = true; | ||
3596 | this.deleteChildField = value; | ||
3597 | } | ||
3598 | } | ||
3599 | |||
3600 | /// <summary> | ||
3601 | /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent. | ||
3602 | /// </summary> | ||
3603 | public YesNoType Traverse | ||
3604 | { | ||
3605 | get | ||
3606 | { | ||
3607 | return this.traverseField; | ||
3608 | } | ||
3609 | set | ||
3610 | { | ||
3611 | this.traverseFieldSet = true; | ||
3612 | this.traverseField = value; | ||
3613 | } | ||
3614 | } | ||
3615 | |||
3616 | public YesNoType GenericAll | ||
3617 | { | ||
3618 | get | ||
3619 | { | ||
3620 | return this.genericAllField; | ||
3621 | } | ||
3622 | set | ||
3623 | { | ||
3624 | this.genericAllFieldSet = true; | ||
3625 | this.genericAllField = value; | ||
3626 | } | ||
3627 | } | ||
3628 | |||
3629 | public YesNoType GenericExecute | ||
3630 | { | ||
3631 | get | ||
3632 | { | ||
3633 | return this.genericExecuteField; | ||
3634 | } | ||
3635 | set | ||
3636 | { | ||
3637 | this.genericExecuteFieldSet = true; | ||
3638 | this.genericExecuteField = value; | ||
3639 | } | ||
3640 | } | ||
3641 | |||
3642 | public YesNoType GenericWrite | ||
3643 | { | ||
3644 | get | ||
3645 | { | ||
3646 | return this.genericWriteField; | ||
3647 | } | ||
3648 | set | ||
3649 | { | ||
3650 | this.genericWriteFieldSet = true; | ||
3651 | this.genericWriteField = value; | ||
3652 | } | ||
3653 | } | ||
3654 | |||
3655 | /// <summary> | ||
3656 | /// specifying this will fail to grant read access | ||
3657 | /// </summary> | ||
3658 | public YesNoType GenericRead | ||
3659 | { | ||
3660 | get | ||
3661 | { | ||
3662 | return this.genericReadField; | ||
3663 | } | ||
3664 | set | ||
3665 | { | ||
3666 | this.genericReadFieldSet = true; | ||
3667 | this.genericReadField = value; | ||
3668 | } | ||
3669 | } | ||
3670 | |||
3671 | public virtual ISchemaElement ParentElement | ||
3672 | { | ||
3673 | get | ||
3674 | { | ||
3675 | return this.parentElement; | ||
3676 | } | ||
3677 | set | ||
3678 | { | ||
3679 | this.parentElement = value; | ||
3680 | } | ||
3681 | } | ||
3682 | |||
3683 | /// <summary> | ||
3684 | /// Processes this element and all child elements into an XmlWriter. | ||
3685 | /// </summary> | ||
3686 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
3687 | public virtual void OutputXml(XmlWriter writer) | ||
3688 | { | ||
3689 | if ((null == writer)) | ||
3690 | { | ||
3691 | throw new ArgumentNullException("writer"); | ||
3692 | } | ||
3693 | writer.WriteStartElement("FileSharePermission", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
3694 | if (this.userFieldSet) | ||
3695 | { | ||
3696 | writer.WriteAttributeString("User", this.userField); | ||
3697 | } | ||
3698 | if (this.readFieldSet) | ||
3699 | { | ||
3700 | if ((this.readField == YesNoType.no)) | ||
3701 | { | ||
3702 | writer.WriteAttributeString("Read", "no"); | ||
3703 | } | ||
3704 | if ((this.readField == YesNoType.yes)) | ||
3705 | { | ||
3706 | writer.WriteAttributeString("Read", "yes"); | ||
3707 | } | ||
3708 | } | ||
3709 | if (this.deleteFieldSet) | ||
3710 | { | ||
3711 | if ((this.deleteField == YesNoType.no)) | ||
3712 | { | ||
3713 | writer.WriteAttributeString("Delete", "no"); | ||
3714 | } | ||
3715 | if ((this.deleteField == YesNoType.yes)) | ||
3716 | { | ||
3717 | writer.WriteAttributeString("Delete", "yes"); | ||
3718 | } | ||
3719 | } | ||
3720 | if (this.readPermissionFieldSet) | ||
3721 | { | ||
3722 | if ((this.readPermissionField == YesNoType.no)) | ||
3723 | { | ||
3724 | writer.WriteAttributeString("ReadPermission", "no"); | ||
3725 | } | ||
3726 | if ((this.readPermissionField == YesNoType.yes)) | ||
3727 | { | ||
3728 | writer.WriteAttributeString("ReadPermission", "yes"); | ||
3729 | } | ||
3730 | } | ||
3731 | if (this.changePermissionFieldSet) | ||
3732 | { | ||
3733 | if ((this.changePermissionField == YesNoType.no)) | ||
3734 | { | ||
3735 | writer.WriteAttributeString("ChangePermission", "no"); | ||
3736 | } | ||
3737 | if ((this.changePermissionField == YesNoType.yes)) | ||
3738 | { | ||
3739 | writer.WriteAttributeString("ChangePermission", "yes"); | ||
3740 | } | ||
3741 | } | ||
3742 | if (this.takeOwnershipFieldSet) | ||
3743 | { | ||
3744 | if ((this.takeOwnershipField == YesNoType.no)) | ||
3745 | { | ||
3746 | writer.WriteAttributeString("TakeOwnership", "no"); | ||
3747 | } | ||
3748 | if ((this.takeOwnershipField == YesNoType.yes)) | ||
3749 | { | ||
3750 | writer.WriteAttributeString("TakeOwnership", "yes"); | ||
3751 | } | ||
3752 | } | ||
3753 | if (this.readAttributesFieldSet) | ||
3754 | { | ||
3755 | if ((this.readAttributesField == YesNoType.no)) | ||
3756 | { | ||
3757 | writer.WriteAttributeString("ReadAttributes", "no"); | ||
3758 | } | ||
3759 | if ((this.readAttributesField == YesNoType.yes)) | ||
3760 | { | ||
3761 | writer.WriteAttributeString("ReadAttributes", "yes"); | ||
3762 | } | ||
3763 | } | ||
3764 | if (this.writeAttributesFieldSet) | ||
3765 | { | ||
3766 | if ((this.writeAttributesField == YesNoType.no)) | ||
3767 | { | ||
3768 | writer.WriteAttributeString("WriteAttributes", "no"); | ||
3769 | } | ||
3770 | if ((this.writeAttributesField == YesNoType.yes)) | ||
3771 | { | ||
3772 | writer.WriteAttributeString("WriteAttributes", "yes"); | ||
3773 | } | ||
3774 | } | ||
3775 | if (this.readExtendedAttributesFieldSet) | ||
3776 | { | ||
3777 | if ((this.readExtendedAttributesField == YesNoType.no)) | ||
3778 | { | ||
3779 | writer.WriteAttributeString("ReadExtendedAttributes", "no"); | ||
3780 | } | ||
3781 | if ((this.readExtendedAttributesField == YesNoType.yes)) | ||
3782 | { | ||
3783 | writer.WriteAttributeString("ReadExtendedAttributes", "yes"); | ||
3784 | } | ||
3785 | } | ||
3786 | if (this.writeExtendedAttributesFieldSet) | ||
3787 | { | ||
3788 | if ((this.writeExtendedAttributesField == YesNoType.no)) | ||
3789 | { | ||
3790 | writer.WriteAttributeString("WriteExtendedAttributes", "no"); | ||
3791 | } | ||
3792 | if ((this.writeExtendedAttributesField == YesNoType.yes)) | ||
3793 | { | ||
3794 | writer.WriteAttributeString("WriteExtendedAttributes", "yes"); | ||
3795 | } | ||
3796 | } | ||
3797 | if (this.synchronizeFieldSet) | ||
3798 | { | ||
3799 | if ((this.synchronizeField == YesNoType.no)) | ||
3800 | { | ||
3801 | writer.WriteAttributeString("Synchronize", "no"); | ||
3802 | } | ||
3803 | if ((this.synchronizeField == YesNoType.yes)) | ||
3804 | { | ||
3805 | writer.WriteAttributeString("Synchronize", "yes"); | ||
3806 | } | ||
3807 | } | ||
3808 | if (this.createFileFieldSet) | ||
3809 | { | ||
3810 | if ((this.createFileField == YesNoType.no)) | ||
3811 | { | ||
3812 | writer.WriteAttributeString("CreateFile", "no"); | ||
3813 | } | ||
3814 | if ((this.createFileField == YesNoType.yes)) | ||
3815 | { | ||
3816 | writer.WriteAttributeString("CreateFile", "yes"); | ||
3817 | } | ||
3818 | } | ||
3819 | if (this.createChildFieldSet) | ||
3820 | { | ||
3821 | if ((this.createChildField == YesNoType.no)) | ||
3822 | { | ||
3823 | writer.WriteAttributeString("CreateChild", "no"); | ||
3824 | } | ||
3825 | if ((this.createChildField == YesNoType.yes)) | ||
3826 | { | ||
3827 | writer.WriteAttributeString("CreateChild", "yes"); | ||
3828 | } | ||
3829 | } | ||
3830 | if (this.deleteChildFieldSet) | ||
3831 | { | ||
3832 | if ((this.deleteChildField == YesNoType.no)) | ||
3833 | { | ||
3834 | writer.WriteAttributeString("DeleteChild", "no"); | ||
3835 | } | ||
3836 | if ((this.deleteChildField == YesNoType.yes)) | ||
3837 | { | ||
3838 | writer.WriteAttributeString("DeleteChild", "yes"); | ||
3839 | } | ||
3840 | } | ||
3841 | if (this.traverseFieldSet) | ||
3842 | { | ||
3843 | if ((this.traverseField == YesNoType.no)) | ||
3844 | { | ||
3845 | writer.WriteAttributeString("Traverse", "no"); | ||
3846 | } | ||
3847 | if ((this.traverseField == YesNoType.yes)) | ||
3848 | { | ||
3849 | writer.WriteAttributeString("Traverse", "yes"); | ||
3850 | } | ||
3851 | } | ||
3852 | if (this.genericAllFieldSet) | ||
3853 | { | ||
3854 | if ((this.genericAllField == YesNoType.no)) | ||
3855 | { | ||
3856 | writer.WriteAttributeString("GenericAll", "no"); | ||
3857 | } | ||
3858 | if ((this.genericAllField == YesNoType.yes)) | ||
3859 | { | ||
3860 | writer.WriteAttributeString("GenericAll", "yes"); | ||
3861 | } | ||
3862 | } | ||
3863 | if (this.genericExecuteFieldSet) | ||
3864 | { | ||
3865 | if ((this.genericExecuteField == YesNoType.no)) | ||
3866 | { | ||
3867 | writer.WriteAttributeString("GenericExecute", "no"); | ||
3868 | } | ||
3869 | if ((this.genericExecuteField == YesNoType.yes)) | ||
3870 | { | ||
3871 | writer.WriteAttributeString("GenericExecute", "yes"); | ||
3872 | } | ||
3873 | } | ||
3874 | if (this.genericWriteFieldSet) | ||
3875 | { | ||
3876 | if ((this.genericWriteField == YesNoType.no)) | ||
3877 | { | ||
3878 | writer.WriteAttributeString("GenericWrite", "no"); | ||
3879 | } | ||
3880 | if ((this.genericWriteField == YesNoType.yes)) | ||
3881 | { | ||
3882 | writer.WriteAttributeString("GenericWrite", "yes"); | ||
3883 | } | ||
3884 | } | ||
3885 | if (this.genericReadFieldSet) | ||
3886 | { | ||
3887 | if ((this.genericReadField == YesNoType.no)) | ||
3888 | { | ||
3889 | writer.WriteAttributeString("GenericRead", "no"); | ||
3890 | } | ||
3891 | if ((this.genericReadField == YesNoType.yes)) | ||
3892 | { | ||
3893 | writer.WriteAttributeString("GenericRead", "yes"); | ||
3894 | } | ||
3895 | } | ||
3896 | writer.WriteEndElement(); | ||
3897 | } | ||
3898 | |||
3899 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
3900 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
3901 | void ISetAttributes.SetAttribute(string name, string value) | ||
3902 | { | ||
3903 | if (String.IsNullOrEmpty(name)) | ||
3904 | { | ||
3905 | throw new ArgumentNullException("name"); | ||
3906 | } | ||
3907 | if (("User" == name)) | ||
3908 | { | ||
3909 | this.userField = value; | ||
3910 | this.userFieldSet = true; | ||
3911 | } | ||
3912 | if (("Read" == name)) | ||
3913 | { | ||
3914 | this.readField = Enums.ParseYesNoType(value); | ||
3915 | this.readFieldSet = true; | ||
3916 | } | ||
3917 | if (("Delete" == name)) | ||
3918 | { | ||
3919 | this.deleteField = Enums.ParseYesNoType(value); | ||
3920 | this.deleteFieldSet = true; | ||
3921 | } | ||
3922 | if (("ReadPermission" == name)) | ||
3923 | { | ||
3924 | this.readPermissionField = Enums.ParseYesNoType(value); | ||
3925 | this.readPermissionFieldSet = true; | ||
3926 | } | ||
3927 | if (("ChangePermission" == name)) | ||
3928 | { | ||
3929 | this.changePermissionField = Enums.ParseYesNoType(value); | ||
3930 | this.changePermissionFieldSet = true; | ||
3931 | } | ||
3932 | if (("TakeOwnership" == name)) | ||
3933 | { | ||
3934 | this.takeOwnershipField = Enums.ParseYesNoType(value); | ||
3935 | this.takeOwnershipFieldSet = true; | ||
3936 | } | ||
3937 | if (("ReadAttributes" == name)) | ||
3938 | { | ||
3939 | this.readAttributesField = Enums.ParseYesNoType(value); | ||
3940 | this.readAttributesFieldSet = true; | ||
3941 | } | ||
3942 | if (("WriteAttributes" == name)) | ||
3943 | { | ||
3944 | this.writeAttributesField = Enums.ParseYesNoType(value); | ||
3945 | this.writeAttributesFieldSet = true; | ||
3946 | } | ||
3947 | if (("ReadExtendedAttributes" == name)) | ||
3948 | { | ||
3949 | this.readExtendedAttributesField = Enums.ParseYesNoType(value); | ||
3950 | this.readExtendedAttributesFieldSet = true; | ||
3951 | } | ||
3952 | if (("WriteExtendedAttributes" == name)) | ||
3953 | { | ||
3954 | this.writeExtendedAttributesField = Enums.ParseYesNoType(value); | ||
3955 | this.writeExtendedAttributesFieldSet = true; | ||
3956 | } | ||
3957 | if (("Synchronize" == name)) | ||
3958 | { | ||
3959 | this.synchronizeField = Enums.ParseYesNoType(value); | ||
3960 | this.synchronizeFieldSet = true; | ||
3961 | } | ||
3962 | if (("CreateFile" == name)) | ||
3963 | { | ||
3964 | this.createFileField = Enums.ParseYesNoType(value); | ||
3965 | this.createFileFieldSet = true; | ||
3966 | } | ||
3967 | if (("CreateChild" == name)) | ||
3968 | { | ||
3969 | this.createChildField = Enums.ParseYesNoType(value); | ||
3970 | this.createChildFieldSet = true; | ||
3971 | } | ||
3972 | if (("DeleteChild" == name)) | ||
3973 | { | ||
3974 | this.deleteChildField = Enums.ParseYesNoType(value); | ||
3975 | this.deleteChildFieldSet = true; | ||
3976 | } | ||
3977 | if (("Traverse" == name)) | ||
3978 | { | ||
3979 | this.traverseField = Enums.ParseYesNoType(value); | ||
3980 | this.traverseFieldSet = true; | ||
3981 | } | ||
3982 | if (("GenericAll" == name)) | ||
3983 | { | ||
3984 | this.genericAllField = Enums.ParseYesNoType(value); | ||
3985 | this.genericAllFieldSet = true; | ||
3986 | } | ||
3987 | if (("GenericExecute" == name)) | ||
3988 | { | ||
3989 | this.genericExecuteField = Enums.ParseYesNoType(value); | ||
3990 | this.genericExecuteFieldSet = true; | ||
3991 | } | ||
3992 | if (("GenericWrite" == name)) | ||
3993 | { | ||
3994 | this.genericWriteField = Enums.ParseYesNoType(value); | ||
3995 | this.genericWriteFieldSet = true; | ||
3996 | } | ||
3997 | if (("GenericRead" == name)) | ||
3998 | { | ||
3999 | this.genericReadField = Enums.ParseYesNoType(value); | ||
4000 | this.genericReadFieldSet = true; | ||
4001 | } | ||
4002 | } | ||
4003 | } | ||
4004 | |||
4005 | /// <summary> | ||
4006 | /// Formats a file's contents at install time. The contents are formatted according to the rules of the | ||
4007 | /// </summary> | ||
4008 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
4009 | public class FormatFile : ISchemaElement, ISetAttributes | ||
4010 | { | ||
4011 | |||
4012 | private string binaryKeyField; | ||
4013 | |||
4014 | private bool binaryKeyFieldSet; | ||
4015 | |||
4016 | private ISchemaElement parentElement; | ||
4017 | |||
4018 | /// <summary> | ||
4019 | /// The id of a Binary row that contains a copy of the file. The file in the Binary table overwrites whatever | ||
4020 | /// file is installed by the parent component. | ||
4021 | /// </summary> | ||
4022 | public string BinaryKey | ||
4023 | { | ||
4024 | get | ||
4025 | { | ||
4026 | return this.binaryKeyField; | ||
4027 | } | ||
4028 | set | ||
4029 | { | ||
4030 | this.binaryKeyFieldSet = true; | ||
4031 | this.binaryKeyField = value; | ||
4032 | } | ||
4033 | } | ||
4034 | |||
4035 | public virtual ISchemaElement ParentElement | ||
4036 | { | ||
4037 | get | ||
4038 | { | ||
4039 | return this.parentElement; | ||
4040 | } | ||
4041 | set | ||
4042 | { | ||
4043 | this.parentElement = value; | ||
4044 | } | ||
4045 | } | ||
4046 | |||
4047 | /// <summary> | ||
4048 | /// Processes this element and all child elements into an XmlWriter. | ||
4049 | /// </summary> | ||
4050 | public virtual void OutputXml(XmlWriter writer) | ||
4051 | { | ||
4052 | if ((null == writer)) | ||
4053 | { | ||
4054 | throw new ArgumentNullException("writer"); | ||
4055 | } | ||
4056 | writer.WriteStartElement("FormatFile", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
4057 | if (this.binaryKeyFieldSet) | ||
4058 | { | ||
4059 | writer.WriteAttributeString("BinaryKey", this.binaryKeyField); | ||
4060 | } | ||
4061 | writer.WriteEndElement(); | ||
4062 | } | ||
4063 | |||
4064 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
4065 | void ISetAttributes.SetAttribute(string name, string value) | ||
4066 | { | ||
4067 | if (String.IsNullOrEmpty(name)) | ||
4068 | { | ||
4069 | throw new ArgumentNullException("name"); | ||
4070 | } | ||
4071 | if (("BinaryKey" == name)) | ||
4072 | { | ||
4073 | this.binaryKeyField = value; | ||
4074 | this.binaryKeyFieldSet = true; | ||
4075 | } | ||
4076 | } | ||
4077 | } | ||
4078 | |||
4079 | /// <summary> | ||
4080 | /// Finds user groups on the local machine or specified Active Directory domain. The local machine will be | ||
4081 | /// searched for the group first then fallback to looking in Active Directory. This element is not capable | ||
4082 | /// of creating new groups but can be used to add new or existing users to an existing group. | ||
4083 | /// </summary> | ||
4084 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
4085 | public class Group : ISchemaElement, ISetAttributes | ||
4086 | { | ||
4087 | |||
4088 | private string idField; | ||
4089 | |||
4090 | private bool idFieldSet; | ||
4091 | |||
4092 | private string nameField; | ||
4093 | |||
4094 | private bool nameFieldSet; | ||
4095 | |||
4096 | private string domainField; | ||
4097 | |||
4098 | private bool domainFieldSet; | ||
4099 | |||
4100 | private ISchemaElement parentElement; | ||
4101 | |||
4102 | /// <summary> | ||
4103 | /// Unique identifier in your installation package for this group. | ||
4104 | /// </summary> | ||
4105 | public string Id | ||
4106 | { | ||
4107 | get | ||
4108 | { | ||
4109 | return this.idField; | ||
4110 | } | ||
4111 | set | ||
4112 | { | ||
4113 | this.idFieldSet = true; | ||
4114 | this.idField = value; | ||
4115 | } | ||
4116 | } | ||
4117 | |||
4118 | /// <summary> | ||
4119 | /// A | ||
4120 | /// </summary> | ||
4121 | public string Name | ||
4122 | { | ||
4123 | get | ||
4124 | { | ||
4125 | return this.nameField; | ||
4126 | } | ||
4127 | set | ||
4128 | { | ||
4129 | this.nameFieldSet = true; | ||
4130 | this.nameField = value; | ||
4131 | } | ||
4132 | } | ||
4133 | |||
4134 | /// <summary> | ||
4135 | /// An optional | ||
4136 | /// </summary> | ||
4137 | public string Domain | ||
4138 | { | ||
4139 | get | ||
4140 | { | ||
4141 | return this.domainField; | ||
4142 | } | ||
4143 | set | ||
4144 | { | ||
4145 | this.domainFieldSet = true; | ||
4146 | this.domainField = value; | ||
4147 | } | ||
4148 | } | ||
4149 | |||
4150 | public virtual ISchemaElement ParentElement | ||
4151 | { | ||
4152 | get | ||
4153 | { | ||
4154 | return this.parentElement; | ||
4155 | } | ||
4156 | set | ||
4157 | { | ||
4158 | this.parentElement = value; | ||
4159 | } | ||
4160 | } | ||
4161 | |||
4162 | /// <summary> | ||
4163 | /// Processes this element and all child elements into an XmlWriter. | ||
4164 | /// </summary> | ||
4165 | public virtual void OutputXml(XmlWriter writer) | ||
4166 | { | ||
4167 | if ((null == writer)) | ||
4168 | { | ||
4169 | throw new ArgumentNullException("writer"); | ||
4170 | } | ||
4171 | writer.WriteStartElement("Group", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
4172 | if (this.idFieldSet) | ||
4173 | { | ||
4174 | writer.WriteAttributeString("Id", this.idField); | ||
4175 | } | ||
4176 | if (this.nameFieldSet) | ||
4177 | { | ||
4178 | writer.WriteAttributeString("Name", this.nameField); | ||
4179 | } | ||
4180 | if (this.domainFieldSet) | ||
4181 | { | ||
4182 | writer.WriteAttributeString("Domain", this.domainField); | ||
4183 | } | ||
4184 | writer.WriteEndElement(); | ||
4185 | } | ||
4186 | |||
4187 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
4188 | void ISetAttributes.SetAttribute(string name, string value) | ||
4189 | { | ||
4190 | if (String.IsNullOrEmpty(name)) | ||
4191 | { | ||
4192 | throw new ArgumentNullException("name"); | ||
4193 | } | ||
4194 | if (("Id" == name)) | ||
4195 | { | ||
4196 | this.idField = value; | ||
4197 | this.idFieldSet = true; | ||
4198 | } | ||
4199 | if (("Name" == name)) | ||
4200 | { | ||
4201 | this.nameField = value; | ||
4202 | this.nameFieldSet = true; | ||
4203 | } | ||
4204 | if (("Domain" == name)) | ||
4205 | { | ||
4206 | this.domainField = value; | ||
4207 | this.domainFieldSet = true; | ||
4208 | } | ||
4209 | } | ||
4210 | } | ||
4211 | |||
4212 | /// <summary> | ||
4213 | /// Used to join a user to a group | ||
4214 | /// </summary> | ||
4215 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
4216 | public class GroupRef : ISchemaElement, ISetAttributes | ||
4217 | { | ||
4218 | |||
4219 | private string idField; | ||
4220 | |||
4221 | private bool idFieldSet; | ||
4222 | |||
4223 | private ISchemaElement parentElement; | ||
4224 | |||
4225 | public string Id | ||
4226 | { | ||
4227 | get | ||
4228 | { | ||
4229 | return this.idField; | ||
4230 | } | ||
4231 | set | ||
4232 | { | ||
4233 | this.idFieldSet = true; | ||
4234 | this.idField = value; | ||
4235 | } | ||
4236 | } | ||
4237 | |||
4238 | public virtual ISchemaElement ParentElement | ||
4239 | { | ||
4240 | get | ||
4241 | { | ||
4242 | return this.parentElement; | ||
4243 | } | ||
4244 | set | ||
4245 | { | ||
4246 | this.parentElement = value; | ||
4247 | } | ||
4248 | } | ||
4249 | |||
4250 | /// <summary> | ||
4251 | /// Processes this element and all child elements into an XmlWriter. | ||
4252 | /// </summary> | ||
4253 | public virtual void OutputXml(XmlWriter writer) | ||
4254 | { | ||
4255 | if ((null == writer)) | ||
4256 | { | ||
4257 | throw new ArgumentNullException("writer"); | ||
4258 | } | ||
4259 | writer.WriteStartElement("GroupRef", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
4260 | if (this.idFieldSet) | ||
4261 | { | ||
4262 | writer.WriteAttributeString("Id", this.idField); | ||
4263 | } | ||
4264 | writer.WriteEndElement(); | ||
4265 | } | ||
4266 | |||
4267 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
4268 | void ISetAttributes.SetAttribute(string name, string value) | ||
4269 | { | ||
4270 | if (String.IsNullOrEmpty(name)) | ||
4271 | { | ||
4272 | throw new ArgumentNullException("name"); | ||
4273 | } | ||
4274 | if (("Id" == name)) | ||
4275 | { | ||
4276 | this.idField = value; | ||
4277 | this.idFieldSet = true; | ||
4278 | } | ||
4279 | } | ||
4280 | } | ||
4281 | |||
4282 | /// <summary> | ||
4283 | /// Creates a shortcut to a URL. | ||
4284 | /// </summary> | ||
4285 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
4286 | public class InternetShortcut : ISchemaElement, ISetAttributes | ||
4287 | { | ||
4288 | |||
4289 | private string idField; | ||
4290 | |||
4291 | private bool idFieldSet; | ||
4292 | |||
4293 | private string directoryField; | ||
4294 | |||
4295 | private bool directoryFieldSet; | ||
4296 | |||
4297 | private string nameField; | ||
4298 | |||
4299 | private bool nameFieldSet; | ||
4300 | |||
4301 | private string targetField; | ||
4302 | |||
4303 | private bool targetFieldSet; | ||
4304 | |||
4305 | private TypeType typeField; | ||
4306 | |||
4307 | private bool typeFieldSet; | ||
4308 | |||
4309 | private string iconFileField; | ||
4310 | |||
4311 | private bool iconFileFieldSet; | ||
4312 | |||
4313 | private int iconIndexField; | ||
4314 | |||
4315 | private bool iconIndexFieldSet; | ||
4316 | |||
4317 | private ISchemaElement parentElement; | ||
4318 | |||
4319 | /// <summary> | ||
4320 | /// Unique identifier in your installation package for this Internet shortcut. | ||
4321 | /// </summary> | ||
4322 | public string Id | ||
4323 | { | ||
4324 | get | ||
4325 | { | ||
4326 | return this.idField; | ||
4327 | } | ||
4328 | set | ||
4329 | { | ||
4330 | this.idFieldSet = true; | ||
4331 | this.idField = value; | ||
4332 | } | ||
4333 | } | ||
4334 | |||
4335 | /// <summary> | ||
4336 | /// Identifier reference to Directory element where shortcut is to be created. This attribute's value defaults to the parent Component directory. | ||
4337 | /// </summary> | ||
4338 | public string Directory | ||
4339 | { | ||
4340 | get | ||
4341 | { | ||
4342 | return this.directoryField; | ||
4343 | } | ||
4344 | set | ||
4345 | { | ||
4346 | this.directoryFieldSet = true; | ||
4347 | this.directoryField = value; | ||
4348 | } | ||
4349 | } | ||
4350 | |||
4351 | /// <summary> | ||
4352 | /// The name of the shortcut file, which is visible to the user. (The .lnk | ||
4353 | /// extension is added automatically and by default, is not shown to the user.) | ||
4354 | /// </summary> | ||
4355 | public string Name | ||
4356 | { | ||
4357 | get | ||
4358 | { | ||
4359 | return this.nameField; | ||
4360 | } | ||
4361 | set | ||
4362 | { | ||
4363 | this.nameFieldSet = true; | ||
4364 | this.nameField = value; | ||
4365 | } | ||
4366 | } | ||
4367 | |||
4368 | /// <summary> | ||
4369 | /// URL that should be opened when the user selects the shortcut. Windows | ||
4370 | /// opens the URL in the appropriate handler for the protocol specified | ||
4371 | /// in the URL. Note that this is a formatted field, so you can use | ||
4372 | /// [#fileId] syntax to refer to a file being installed (using the file: | ||
4373 | /// protocol). | ||
4374 | /// </summary> | ||
4375 | public string Target | ||
4376 | { | ||
4377 | get | ||
4378 | { | ||
4379 | return this.targetField; | ||
4380 | } | ||
4381 | set | ||
4382 | { | ||
4383 | this.targetFieldSet = true; | ||
4384 | this.targetField = value; | ||
4385 | } | ||
4386 | } | ||
4387 | |||
4388 | /// <summary> | ||
4389 | /// Which type of shortcut should be created. | ||
4390 | /// </summary> | ||
4391 | public TypeType Type | ||
4392 | { | ||
4393 | get | ||
4394 | { | ||
4395 | return this.typeField; | ||
4396 | } | ||
4397 | set | ||
4398 | { | ||
4399 | this.typeFieldSet = true; | ||
4400 | this.typeField = value; | ||
4401 | } | ||
4402 | } | ||
4403 | |||
4404 | /// <summary> | ||
4405 | /// Icon file that should be displayed. Note that this is a formatted field, so you can use | ||
4406 | /// [#fileId] syntax to refer to a file being installed (using the file: | ||
4407 | /// protocol). | ||
4408 | /// </summary> | ||
4409 | public string IconFile | ||
4410 | { | ||
4411 | get | ||
4412 | { | ||
4413 | return this.iconFileField; | ||
4414 | } | ||
4415 | set | ||
4416 | { | ||
4417 | this.iconFileFieldSet = true; | ||
4418 | this.iconFileField = value; | ||
4419 | } | ||
4420 | } | ||
4421 | |||
4422 | /// <summary> | ||
4423 | /// Index of the icon being referenced | ||
4424 | /// </summary> | ||
4425 | public int IconIndex | ||
4426 | { | ||
4427 | get | ||
4428 | { | ||
4429 | return this.iconIndexField; | ||
4430 | } | ||
4431 | set | ||
4432 | { | ||
4433 | this.iconIndexFieldSet = true; | ||
4434 | this.iconIndexField = value; | ||
4435 | } | ||
4436 | } | ||
4437 | |||
4438 | public virtual ISchemaElement ParentElement | ||
4439 | { | ||
4440 | get | ||
4441 | { | ||
4442 | return this.parentElement; | ||
4443 | } | ||
4444 | set | ||
4445 | { | ||
4446 | this.parentElement = value; | ||
4447 | } | ||
4448 | } | ||
4449 | |||
4450 | /// <summary> | ||
4451 | /// Parses a TypeType from a string. | ||
4452 | /// </summary> | ||
4453 | public static TypeType ParseTypeType(string value) | ||
4454 | { | ||
4455 | TypeType parsedValue; | ||
4456 | InternetShortcut.TryParseTypeType(value, out parsedValue); | ||
4457 | return parsedValue; | ||
4458 | } | ||
4459 | |||
4460 | /// <summary> | ||
4461 | /// Tries to parse a TypeType from a string. | ||
4462 | /// </summary> | ||
4463 | public static bool TryParseTypeType(string value, out TypeType parsedValue) | ||
4464 | { | ||
4465 | parsedValue = TypeType.NotSet; | ||
4466 | if (string.IsNullOrEmpty(value)) | ||
4467 | { | ||
4468 | return false; | ||
4469 | } | ||
4470 | if (("url" == value)) | ||
4471 | { | ||
4472 | parsedValue = TypeType.url; | ||
4473 | } | ||
4474 | else | ||
4475 | { | ||
4476 | if (("link" == value)) | ||
4477 | { | ||
4478 | parsedValue = TypeType.link; | ||
4479 | } | ||
4480 | else | ||
4481 | { | ||
4482 | parsedValue = TypeType.IllegalValue; | ||
4483 | return false; | ||
4484 | } | ||
4485 | } | ||
4486 | return true; | ||
4487 | } | ||
4488 | |||
4489 | /// <summary> | ||
4490 | /// Processes this element and all child elements into an XmlWriter. | ||
4491 | /// </summary> | ||
4492 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
4493 | public virtual void OutputXml(XmlWriter writer) | ||
4494 | { | ||
4495 | if ((null == writer)) | ||
4496 | { | ||
4497 | throw new ArgumentNullException("writer"); | ||
4498 | } | ||
4499 | writer.WriteStartElement("InternetShortcut", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
4500 | if (this.idFieldSet) | ||
4501 | { | ||
4502 | writer.WriteAttributeString("Id", this.idField); | ||
4503 | } | ||
4504 | if (this.directoryFieldSet) | ||
4505 | { | ||
4506 | writer.WriteAttributeString("Directory", this.directoryField); | ||
4507 | } | ||
4508 | if (this.nameFieldSet) | ||
4509 | { | ||
4510 | writer.WriteAttributeString("Name", this.nameField); | ||
4511 | } | ||
4512 | if (this.targetFieldSet) | ||
4513 | { | ||
4514 | writer.WriteAttributeString("Target", this.targetField); | ||
4515 | } | ||
4516 | if (this.typeFieldSet) | ||
4517 | { | ||
4518 | if ((this.typeField == TypeType.url)) | ||
4519 | { | ||
4520 | writer.WriteAttributeString("Type", "url"); | ||
4521 | } | ||
4522 | if ((this.typeField == TypeType.link)) | ||
4523 | { | ||
4524 | writer.WriteAttributeString("Type", "link"); | ||
4525 | } | ||
4526 | } | ||
4527 | if (this.iconFileFieldSet) | ||
4528 | { | ||
4529 | writer.WriteAttributeString("IconFile", this.iconFileField); | ||
4530 | } | ||
4531 | if (this.iconIndexFieldSet) | ||
4532 | { | ||
4533 | writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); | ||
4534 | } | ||
4535 | writer.WriteEndElement(); | ||
4536 | } | ||
4537 | |||
4538 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
4539 | void ISetAttributes.SetAttribute(string name, string value) | ||
4540 | { | ||
4541 | if (String.IsNullOrEmpty(name)) | ||
4542 | { | ||
4543 | throw new ArgumentNullException("name"); | ||
4544 | } | ||
4545 | if (("Id" == name)) | ||
4546 | { | ||
4547 | this.idField = value; | ||
4548 | this.idFieldSet = true; | ||
4549 | } | ||
4550 | if (("Directory" == name)) | ||
4551 | { | ||
4552 | this.directoryField = value; | ||
4553 | this.directoryFieldSet = true; | ||
4554 | } | ||
4555 | if (("Name" == name)) | ||
4556 | { | ||
4557 | this.nameField = value; | ||
4558 | this.nameFieldSet = true; | ||
4559 | } | ||
4560 | if (("Target" == name)) | ||
4561 | { | ||
4562 | this.targetField = value; | ||
4563 | this.targetFieldSet = true; | ||
4564 | } | ||
4565 | if (("Type" == name)) | ||
4566 | { | ||
4567 | this.typeField = InternetShortcut.ParseTypeType(value); | ||
4568 | this.typeFieldSet = true; | ||
4569 | } | ||
4570 | if (("IconFile" == name)) | ||
4571 | { | ||
4572 | this.iconFileField = value; | ||
4573 | this.iconFileFieldSet = true; | ||
4574 | } | ||
4575 | if (("IconIndex" == name)) | ||
4576 | { | ||
4577 | this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
4578 | this.iconIndexFieldSet = true; | ||
4579 | } | ||
4580 | } | ||
4581 | |||
4582 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
4583 | public enum TypeType | ||
4584 | { | ||
4585 | |||
4586 | IllegalValue = int.MaxValue, | ||
4587 | |||
4588 | NotSet = -1, | ||
4589 | |||
4590 | /// <summary> | ||
4591 | /// Creates .url files using IUniformResourceLocatorW. | ||
4592 | /// </summary> | ||
4593 | url, | ||
4594 | |||
4595 | /// <summary> | ||
4596 | /// Creates .lnk files using IShellLinkW (default). | ||
4597 | /// </summary> | ||
4598 | link, | ||
4599 | } | ||
4600 | } | ||
4601 | |||
4602 | /// <summary> | ||
4603 | /// Used to create performance categories and configure performance counters. | ||
4604 | /// </summary> | ||
4605 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
4606 | public class PerformanceCategory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes | ||
4607 | { | ||
4608 | |||
4609 | private ElementCollection children; | ||
4610 | |||
4611 | private string idField; | ||
4612 | |||
4613 | private bool idFieldSet; | ||
4614 | |||
4615 | private string nameField; | ||
4616 | |||
4617 | private bool nameFieldSet; | ||
4618 | |||
4619 | private string helpField; | ||
4620 | |||
4621 | private bool helpFieldSet; | ||
4622 | |||
4623 | private YesNoType multiInstanceField; | ||
4624 | |||
4625 | private bool multiInstanceFieldSet; | ||
4626 | |||
4627 | private string libraryField; | ||
4628 | |||
4629 | private bool libraryFieldSet; | ||
4630 | |||
4631 | private string openField; | ||
4632 | |||
4633 | private bool openFieldSet; | ||
4634 | |||
4635 | private string closeField; | ||
4636 | |||
4637 | private bool closeFieldSet; | ||
4638 | |||
4639 | private string collectField; | ||
4640 | |||
4641 | private bool collectFieldSet; | ||
4642 | |||
4643 | private PerformanceCounterLanguageType defaultLanguageField; | ||
4644 | |||
4645 | private bool defaultLanguageFieldSet; | ||
4646 | |||
4647 | private ISchemaElement parentElement; | ||
4648 | |||
4649 | public PerformanceCategory() | ||
4650 | { | ||
4651 | ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); | ||
4652 | childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PerformanceCounter))); | ||
4653 | this.children = childCollection0; | ||
4654 | } | ||
4655 | |||
4656 | public virtual IEnumerable Children | ||
4657 | { | ||
4658 | get | ||
4659 | { | ||
4660 | return this.children; | ||
4661 | } | ||
4662 | } | ||
4663 | |||
4664 | [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] | ||
4665 | public virtual IEnumerable this[System.Type childType] | ||
4666 | { | ||
4667 | get | ||
4668 | { | ||
4669 | return this.children.Filter(childType); | ||
4670 | } | ||
4671 | } | ||
4672 | |||
4673 | /// <summary> | ||
4674 | /// Unique identifier in your installation package for this performance counter category. | ||
4675 | /// </summary> | ||
4676 | public string Id | ||
4677 | { | ||
4678 | get | ||
4679 | { | ||
4680 | return this.idField; | ||
4681 | } | ||
4682 | set | ||
4683 | { | ||
4684 | this.idFieldSet = true; | ||
4685 | this.idField = value; | ||
4686 | } | ||
4687 | } | ||
4688 | |||
4689 | /// <summary> | ||
4690 | /// Name for the performance counter category. If this attribute is not provided the Id attribute is used as the name of the performance counter category. | ||
4691 | /// </summary> | ||
4692 | public string Name | ||
4693 | { | ||
4694 | get | ||
4695 | { | ||
4696 | return this.nameField; | ||
4697 | } | ||
4698 | set | ||
4699 | { | ||
4700 | this.nameFieldSet = true; | ||
4701 | this.nameField = value; | ||
4702 | } | ||
4703 | } | ||
4704 | |||
4705 | /// <summary> | ||
4706 | /// Optional help text for the performance counter category. | ||
4707 | /// </summary> | ||
4708 | public string Help | ||
4709 | { | ||
4710 | get | ||
4711 | { | ||
4712 | return this.helpField; | ||
4713 | } | ||
4714 | set | ||
4715 | { | ||
4716 | this.helpFieldSet = true; | ||
4717 | this.helpField = value; | ||
4718 | } | ||
4719 | } | ||
4720 | |||
4721 | /// <summary> | ||
4722 | /// Flag that specifies whether the performance counter category is multi or single instanced. Default is single instance. | ||
4723 | /// </summary> | ||
4724 | public YesNoType MultiInstance | ||
4725 | { | ||
4726 | get | ||
4727 | { | ||
4728 | return this.multiInstanceField; | ||
4729 | } | ||
4730 | set | ||
4731 | { | ||
4732 | this.multiInstanceFieldSet = true; | ||
4733 | this.multiInstanceField = value; | ||
4734 | } | ||
4735 | } | ||
4736 | |||
4737 | /// <summary> | ||
4738 | /// DLL that contains the performance counter. The default is "netfxperf.dll" which should be used for all managed code performance counters. | ||
4739 | /// </summary> | ||
4740 | public string Library | ||
4741 | { | ||
4742 | get | ||
4743 | { | ||
4744 | return this.libraryField; | ||
4745 | } | ||
4746 | set | ||
4747 | { | ||
4748 | this.libraryFieldSet = true; | ||
4749 | this.libraryField = value; | ||
4750 | } | ||
4751 | } | ||
4752 | |||
4753 | /// <summary> | ||
4754 | /// Function entry point in to the Library DLL called when opening the performance counter. The default is "OpenPerformanceData" which should be used for all managed code performance counters. | ||
4755 | /// </summary> | ||
4756 | public string Open | ||
4757 | { | ||
4758 | get | ||
4759 | { | ||
4760 | return this.openField; | ||
4761 | } | ||
4762 | set | ||
4763 | { | ||
4764 | this.openFieldSet = true; | ||
4765 | this.openField = value; | ||
4766 | } | ||
4767 | } | ||
4768 | |||
4769 | /// <summary> | ||
4770 | /// Function entry point in to the Library DLL called when closing the performance counter. The default is "ClosePerformanceData" which should be used for all managed code performance counters. | ||
4771 | /// </summary> | ||
4772 | public string Close | ||
4773 | { | ||
4774 | get | ||
4775 | { | ||
4776 | return this.closeField; | ||
4777 | } | ||
4778 | set | ||
4779 | { | ||
4780 | this.closeFieldSet = true; | ||
4781 | this.closeField = value; | ||
4782 | } | ||
4783 | } | ||
4784 | |||
4785 | /// <summary> | ||
4786 | /// Function entry point in to the Library DLL called when collecting data from the performance counter. The default is "CollectPerformanceData" which should be used for all managed code performance counters. | ||
4787 | /// </summary> | ||
4788 | public string Collect | ||
4789 | { | ||
4790 | get | ||
4791 | { | ||
4792 | return this.collectField; | ||
4793 | } | ||
4794 | set | ||
4795 | { | ||
4796 | this.collectFieldSet = true; | ||
4797 | this.collectField = value; | ||
4798 | } | ||
4799 | } | ||
4800 | |||
4801 | /// <summary> | ||
4802 | /// Default language for the performance category and contained counters' names and help text. | ||
4803 | /// </summary> | ||
4804 | public PerformanceCounterLanguageType DefaultLanguage | ||
4805 | { | ||
4806 | get | ||
4807 | { | ||
4808 | return this.defaultLanguageField; | ||
4809 | } | ||
4810 | set | ||
4811 | { | ||
4812 | this.defaultLanguageFieldSet = true; | ||
4813 | this.defaultLanguageField = value; | ||
4814 | } | ||
4815 | } | ||
4816 | |||
4817 | public virtual ISchemaElement ParentElement | ||
4818 | { | ||
4819 | get | ||
4820 | { | ||
4821 | return this.parentElement; | ||
4822 | } | ||
4823 | set | ||
4824 | { | ||
4825 | this.parentElement = value; | ||
4826 | } | ||
4827 | } | ||
4828 | |||
4829 | public virtual void AddChild(ISchemaElement child) | ||
4830 | { | ||
4831 | if ((null == child)) | ||
4832 | { | ||
4833 | throw new ArgumentNullException("child"); | ||
4834 | } | ||
4835 | this.children.AddElement(child); | ||
4836 | child.ParentElement = this; | ||
4837 | } | ||
4838 | |||
4839 | public virtual void RemoveChild(ISchemaElement child) | ||
4840 | { | ||
4841 | if ((null == child)) | ||
4842 | { | ||
4843 | throw new ArgumentNullException("child"); | ||
4844 | } | ||
4845 | this.children.RemoveElement(child); | ||
4846 | child.ParentElement = null; | ||
4847 | } | ||
4848 | |||
4849 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
4850 | ISchemaElement ICreateChildren.CreateChild(string childName) | ||
4851 | { | ||
4852 | if (String.IsNullOrEmpty(childName)) | ||
4853 | { | ||
4854 | throw new ArgumentNullException("childName"); | ||
4855 | } | ||
4856 | ISchemaElement childValue = null; | ||
4857 | if (("PerformanceCounter" == childName)) | ||
4858 | { | ||
4859 | childValue = new PerformanceCounter(); | ||
4860 | } | ||
4861 | if ((null == childValue)) | ||
4862 | { | ||
4863 | throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); | ||
4864 | } | ||
4865 | return childValue; | ||
4866 | } | ||
4867 | |||
4868 | /// <summary> | ||
4869 | /// Processes this element and all child elements into an XmlWriter. | ||
4870 | /// </summary> | ||
4871 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
4872 | public virtual void OutputXml(XmlWriter writer) | ||
4873 | { | ||
4874 | if ((null == writer)) | ||
4875 | { | ||
4876 | throw new ArgumentNullException("writer"); | ||
4877 | } | ||
4878 | writer.WriteStartElement("PerformanceCategory", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
4879 | if (this.idFieldSet) | ||
4880 | { | ||
4881 | writer.WriteAttributeString("Id", this.idField); | ||
4882 | } | ||
4883 | if (this.nameFieldSet) | ||
4884 | { | ||
4885 | writer.WriteAttributeString("Name", this.nameField); | ||
4886 | } | ||
4887 | if (this.helpFieldSet) | ||
4888 | { | ||
4889 | writer.WriteAttributeString("Help", this.helpField); | ||
4890 | } | ||
4891 | if (this.multiInstanceFieldSet) | ||
4892 | { | ||
4893 | if ((this.multiInstanceField == YesNoType.no)) | ||
4894 | { | ||
4895 | writer.WriteAttributeString("MultiInstance", "no"); | ||
4896 | } | ||
4897 | if ((this.multiInstanceField == YesNoType.yes)) | ||
4898 | { | ||
4899 | writer.WriteAttributeString("MultiInstance", "yes"); | ||
4900 | } | ||
4901 | } | ||
4902 | if (this.libraryFieldSet) | ||
4903 | { | ||
4904 | writer.WriteAttributeString("Library", this.libraryField); | ||
4905 | } | ||
4906 | if (this.openFieldSet) | ||
4907 | { | ||
4908 | writer.WriteAttributeString("Open", this.openField); | ||
4909 | } | ||
4910 | if (this.closeFieldSet) | ||
4911 | { | ||
4912 | writer.WriteAttributeString("Close", this.closeField); | ||
4913 | } | ||
4914 | if (this.collectFieldSet) | ||
4915 | { | ||
4916 | writer.WriteAttributeString("Collect", this.collectField); | ||
4917 | } | ||
4918 | if (this.defaultLanguageFieldSet) | ||
4919 | { | ||
4920 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.afrikaans)) | ||
4921 | { | ||
4922 | writer.WriteAttributeString("DefaultLanguage", "afrikaans"); | ||
4923 | } | ||
4924 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.albanian)) | ||
4925 | { | ||
4926 | writer.WriteAttributeString("DefaultLanguage", "albanian"); | ||
4927 | } | ||
4928 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.arabic)) | ||
4929 | { | ||
4930 | writer.WriteAttributeString("DefaultLanguage", "arabic"); | ||
4931 | } | ||
4932 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.armenian)) | ||
4933 | { | ||
4934 | writer.WriteAttributeString("DefaultLanguage", "armenian"); | ||
4935 | } | ||
4936 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.assamese)) | ||
4937 | { | ||
4938 | writer.WriteAttributeString("DefaultLanguage", "assamese"); | ||
4939 | } | ||
4940 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.azeri)) | ||
4941 | { | ||
4942 | writer.WriteAttributeString("DefaultLanguage", "azeri"); | ||
4943 | } | ||
4944 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.basque)) | ||
4945 | { | ||
4946 | writer.WriteAttributeString("DefaultLanguage", "basque"); | ||
4947 | } | ||
4948 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.belarusian)) | ||
4949 | { | ||
4950 | writer.WriteAttributeString("DefaultLanguage", "belarusian"); | ||
4951 | } | ||
4952 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.bengali)) | ||
4953 | { | ||
4954 | writer.WriteAttributeString("DefaultLanguage", "bengali"); | ||
4955 | } | ||
4956 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.bulgarian)) | ||
4957 | { | ||
4958 | writer.WriteAttributeString("DefaultLanguage", "bulgarian"); | ||
4959 | } | ||
4960 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.catalan)) | ||
4961 | { | ||
4962 | writer.WriteAttributeString("DefaultLanguage", "catalan"); | ||
4963 | } | ||
4964 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.chinese)) | ||
4965 | { | ||
4966 | writer.WriteAttributeString("DefaultLanguage", "chinese"); | ||
4967 | } | ||
4968 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.croatian)) | ||
4969 | { | ||
4970 | writer.WriteAttributeString("DefaultLanguage", "croatian"); | ||
4971 | } | ||
4972 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.czech)) | ||
4973 | { | ||
4974 | writer.WriteAttributeString("DefaultLanguage", "czech"); | ||
4975 | } | ||
4976 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.danish)) | ||
4977 | { | ||
4978 | writer.WriteAttributeString("DefaultLanguage", "danish"); | ||
4979 | } | ||
4980 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.divehi)) | ||
4981 | { | ||
4982 | writer.WriteAttributeString("DefaultLanguage", "divehi"); | ||
4983 | } | ||
4984 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.dutch)) | ||
4985 | { | ||
4986 | writer.WriteAttributeString("DefaultLanguage", "dutch"); | ||
4987 | } | ||
4988 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.english)) | ||
4989 | { | ||
4990 | writer.WriteAttributeString("DefaultLanguage", "english"); | ||
4991 | } | ||
4992 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.estonian)) | ||
4993 | { | ||
4994 | writer.WriteAttributeString("DefaultLanguage", "estonian"); | ||
4995 | } | ||
4996 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.faeroese)) | ||
4997 | { | ||
4998 | writer.WriteAttributeString("DefaultLanguage", "faeroese"); | ||
4999 | } | ||
5000 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.farsi)) | ||
5001 | { | ||
5002 | writer.WriteAttributeString("DefaultLanguage", "farsi"); | ||
5003 | } | ||
5004 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.finnish)) | ||
5005 | { | ||
5006 | writer.WriteAttributeString("DefaultLanguage", "finnish"); | ||
5007 | } | ||
5008 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.french)) | ||
5009 | { | ||
5010 | writer.WriteAttributeString("DefaultLanguage", "french"); | ||
5011 | } | ||
5012 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.galician)) | ||
5013 | { | ||
5014 | writer.WriteAttributeString("DefaultLanguage", "galician"); | ||
5015 | } | ||
5016 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.georgian)) | ||
5017 | { | ||
5018 | writer.WriteAttributeString("DefaultLanguage", "georgian"); | ||
5019 | } | ||
5020 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.german)) | ||
5021 | { | ||
5022 | writer.WriteAttributeString("DefaultLanguage", "german"); | ||
5023 | } | ||
5024 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.greek)) | ||
5025 | { | ||
5026 | writer.WriteAttributeString("DefaultLanguage", "greek"); | ||
5027 | } | ||
5028 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.gujarati)) | ||
5029 | { | ||
5030 | writer.WriteAttributeString("DefaultLanguage", "gujarati"); | ||
5031 | } | ||
5032 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.hebrew)) | ||
5033 | { | ||
5034 | writer.WriteAttributeString("DefaultLanguage", "hebrew"); | ||
5035 | } | ||
5036 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.hindi)) | ||
5037 | { | ||
5038 | writer.WriteAttributeString("DefaultLanguage", "hindi"); | ||
5039 | } | ||
5040 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.hungarian)) | ||
5041 | { | ||
5042 | writer.WriteAttributeString("DefaultLanguage", "hungarian"); | ||
5043 | } | ||
5044 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.icelandic)) | ||
5045 | { | ||
5046 | writer.WriteAttributeString("DefaultLanguage", "icelandic"); | ||
5047 | } | ||
5048 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.indonesian)) | ||
5049 | { | ||
5050 | writer.WriteAttributeString("DefaultLanguage", "indonesian"); | ||
5051 | } | ||
5052 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.italian)) | ||
5053 | { | ||
5054 | writer.WriteAttributeString("DefaultLanguage", "italian"); | ||
5055 | } | ||
5056 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.japanese)) | ||
5057 | { | ||
5058 | writer.WriteAttributeString("DefaultLanguage", "japanese"); | ||
5059 | } | ||
5060 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.kannada)) | ||
5061 | { | ||
5062 | writer.WriteAttributeString("DefaultLanguage", "kannada"); | ||
5063 | } | ||
5064 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.kashmiri)) | ||
5065 | { | ||
5066 | writer.WriteAttributeString("DefaultLanguage", "kashmiri"); | ||
5067 | } | ||
5068 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.kazak)) | ||
5069 | { | ||
5070 | writer.WriteAttributeString("DefaultLanguage", "kazak"); | ||
5071 | } | ||
5072 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.konkani)) | ||
5073 | { | ||
5074 | writer.WriteAttributeString("DefaultLanguage", "konkani"); | ||
5075 | } | ||
5076 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.korean)) | ||
5077 | { | ||
5078 | writer.WriteAttributeString("DefaultLanguage", "korean"); | ||
5079 | } | ||
5080 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.kyrgyz)) | ||
5081 | { | ||
5082 | writer.WriteAttributeString("DefaultLanguage", "kyrgyz"); | ||
5083 | } | ||
5084 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.latvian)) | ||
5085 | { | ||
5086 | writer.WriteAttributeString("DefaultLanguage", "latvian"); | ||
5087 | } | ||
5088 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.lithuanian)) | ||
5089 | { | ||
5090 | writer.WriteAttributeString("DefaultLanguage", "lithuanian"); | ||
5091 | } | ||
5092 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.macedonian)) | ||
5093 | { | ||
5094 | writer.WriteAttributeString("DefaultLanguage", "macedonian"); | ||
5095 | } | ||
5096 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.malay)) | ||
5097 | { | ||
5098 | writer.WriteAttributeString("DefaultLanguage", "malay"); | ||
5099 | } | ||
5100 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.malayalam)) | ||
5101 | { | ||
5102 | writer.WriteAttributeString("DefaultLanguage", "malayalam"); | ||
5103 | } | ||
5104 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.manipuri)) | ||
5105 | { | ||
5106 | writer.WriteAttributeString("DefaultLanguage", "manipuri"); | ||
5107 | } | ||
5108 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.marathi)) | ||
5109 | { | ||
5110 | writer.WriteAttributeString("DefaultLanguage", "marathi"); | ||
5111 | } | ||
5112 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.mongolian)) | ||
5113 | { | ||
5114 | writer.WriteAttributeString("DefaultLanguage", "mongolian"); | ||
5115 | } | ||
5116 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.nepali)) | ||
5117 | { | ||
5118 | writer.WriteAttributeString("DefaultLanguage", "nepali"); | ||
5119 | } | ||
5120 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.norwegian)) | ||
5121 | { | ||
5122 | writer.WriteAttributeString("DefaultLanguage", "norwegian"); | ||
5123 | } | ||
5124 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.oriya)) | ||
5125 | { | ||
5126 | writer.WriteAttributeString("DefaultLanguage", "oriya"); | ||
5127 | } | ||
5128 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.polish)) | ||
5129 | { | ||
5130 | writer.WriteAttributeString("DefaultLanguage", "polish"); | ||
5131 | } | ||
5132 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.portuguese)) | ||
5133 | { | ||
5134 | writer.WriteAttributeString("DefaultLanguage", "portuguese"); | ||
5135 | } | ||
5136 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.punjabi)) | ||
5137 | { | ||
5138 | writer.WriteAttributeString("DefaultLanguage", "punjabi"); | ||
5139 | } | ||
5140 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.romanian)) | ||
5141 | { | ||
5142 | writer.WriteAttributeString("DefaultLanguage", "romanian"); | ||
5143 | } | ||
5144 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.russian)) | ||
5145 | { | ||
5146 | writer.WriteAttributeString("DefaultLanguage", "russian"); | ||
5147 | } | ||
5148 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.sanskrit)) | ||
5149 | { | ||
5150 | writer.WriteAttributeString("DefaultLanguage", "sanskrit"); | ||
5151 | } | ||
5152 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.serbian)) | ||
5153 | { | ||
5154 | writer.WriteAttributeString("DefaultLanguage", "serbian"); | ||
5155 | } | ||
5156 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.sindhi)) | ||
5157 | { | ||
5158 | writer.WriteAttributeString("DefaultLanguage", "sindhi"); | ||
5159 | } | ||
5160 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovak)) | ||
5161 | { | ||
5162 | writer.WriteAttributeString("DefaultLanguage", "slovak"); | ||
5163 | } | ||
5164 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovenian)) | ||
5165 | { | ||
5166 | writer.WriteAttributeString("DefaultLanguage", "slovenian"); | ||
5167 | } | ||
5168 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.spanish)) | ||
5169 | { | ||
5170 | writer.WriteAttributeString("DefaultLanguage", "spanish"); | ||
5171 | } | ||
5172 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.swahili)) | ||
5173 | { | ||
5174 | writer.WriteAttributeString("DefaultLanguage", "swahili"); | ||
5175 | } | ||
5176 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.swedish)) | ||
5177 | { | ||
5178 | writer.WriteAttributeString("DefaultLanguage", "swedish"); | ||
5179 | } | ||
5180 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.syriac)) | ||
5181 | { | ||
5182 | writer.WriteAttributeString("DefaultLanguage", "syriac"); | ||
5183 | } | ||
5184 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.tamil)) | ||
5185 | { | ||
5186 | writer.WriteAttributeString("DefaultLanguage", "tamil"); | ||
5187 | } | ||
5188 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.tatar)) | ||
5189 | { | ||
5190 | writer.WriteAttributeString("DefaultLanguage", "tatar"); | ||
5191 | } | ||
5192 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.telugu)) | ||
5193 | { | ||
5194 | writer.WriteAttributeString("DefaultLanguage", "telugu"); | ||
5195 | } | ||
5196 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.thai)) | ||
5197 | { | ||
5198 | writer.WriteAttributeString("DefaultLanguage", "thai"); | ||
5199 | } | ||
5200 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.turkish)) | ||
5201 | { | ||
5202 | writer.WriteAttributeString("DefaultLanguage", "turkish"); | ||
5203 | } | ||
5204 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.ukrainian)) | ||
5205 | { | ||
5206 | writer.WriteAttributeString("DefaultLanguage", "ukrainian"); | ||
5207 | } | ||
5208 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.urdu)) | ||
5209 | { | ||
5210 | writer.WriteAttributeString("DefaultLanguage", "urdu"); | ||
5211 | } | ||
5212 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.uzbek)) | ||
5213 | { | ||
5214 | writer.WriteAttributeString("DefaultLanguage", "uzbek"); | ||
5215 | } | ||
5216 | if ((this.defaultLanguageField == PerformanceCounterLanguageType.vietnamese)) | ||
5217 | { | ||
5218 | writer.WriteAttributeString("DefaultLanguage", "vietnamese"); | ||
5219 | } | ||
5220 | } | ||
5221 | for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) | ||
5222 | { | ||
5223 | ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); | ||
5224 | childElement.OutputXml(writer); | ||
5225 | } | ||
5226 | writer.WriteEndElement(); | ||
5227 | } | ||
5228 | |||
5229 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
5230 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
5231 | void ISetAttributes.SetAttribute(string name, string value) | ||
5232 | { | ||
5233 | if (String.IsNullOrEmpty(name)) | ||
5234 | { | ||
5235 | throw new ArgumentNullException("name"); | ||
5236 | } | ||
5237 | if (("Id" == name)) | ||
5238 | { | ||
5239 | this.idField = value; | ||
5240 | this.idFieldSet = true; | ||
5241 | } | ||
5242 | if (("Name" == name)) | ||
5243 | { | ||
5244 | this.nameField = value; | ||
5245 | this.nameFieldSet = true; | ||
5246 | } | ||
5247 | if (("Help" == name)) | ||
5248 | { | ||
5249 | this.helpField = value; | ||
5250 | this.helpFieldSet = true; | ||
5251 | } | ||
5252 | if (("MultiInstance" == name)) | ||
5253 | { | ||
5254 | this.multiInstanceField = Enums.ParseYesNoType(value); | ||
5255 | this.multiInstanceFieldSet = true; | ||
5256 | } | ||
5257 | if (("Library" == name)) | ||
5258 | { | ||
5259 | this.libraryField = value; | ||
5260 | this.libraryFieldSet = true; | ||
5261 | } | ||
5262 | if (("Open" == name)) | ||
5263 | { | ||
5264 | this.openField = value; | ||
5265 | this.openFieldSet = true; | ||
5266 | } | ||
5267 | if (("Close" == name)) | ||
5268 | { | ||
5269 | this.closeField = value; | ||
5270 | this.closeFieldSet = true; | ||
5271 | } | ||
5272 | if (("Collect" == name)) | ||
5273 | { | ||
5274 | this.collectField = value; | ||
5275 | this.collectFieldSet = true; | ||
5276 | } | ||
5277 | if (("DefaultLanguage" == name)) | ||
5278 | { | ||
5279 | this.defaultLanguageField = Enums.ParsePerformanceCounterLanguageType(value); | ||
5280 | this.defaultLanguageFieldSet = true; | ||
5281 | } | ||
5282 | } | ||
5283 | } | ||
5284 | |||
5285 | /// <summary> | ||
5286 | /// Creates a performance counter in a performance category. | ||
5287 | /// </summary> | ||
5288 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
5289 | public class PerformanceCounter : ISchemaElement, ISetAttributes | ||
5290 | { | ||
5291 | |||
5292 | private string nameField; | ||
5293 | |||
5294 | private bool nameFieldSet; | ||
5295 | |||
5296 | private string helpField; | ||
5297 | |||
5298 | private bool helpFieldSet; | ||
5299 | |||
5300 | private PerformanceCounterTypesType typeField; | ||
5301 | |||
5302 | private bool typeFieldSet; | ||
5303 | |||
5304 | private PerformanceCounterLanguageType languageField; | ||
5305 | |||
5306 | private bool languageFieldSet; | ||
5307 | |||
5308 | private ISchemaElement parentElement; | ||
5309 | |||
5310 | /// <summary> | ||
5311 | /// Name for the performance counter. | ||
5312 | /// </summary> | ||
5313 | public string Name | ||
5314 | { | ||
5315 | get | ||
5316 | { | ||
5317 | return this.nameField; | ||
5318 | } | ||
5319 | set | ||
5320 | { | ||
5321 | this.nameFieldSet = true; | ||
5322 | this.nameField = value; | ||
5323 | } | ||
5324 | } | ||
5325 | |||
5326 | /// <summary> | ||
5327 | /// Optional help text for the performance counter. | ||
5328 | /// </summary> | ||
5329 | public string Help | ||
5330 | { | ||
5331 | get | ||
5332 | { | ||
5333 | return this.helpField; | ||
5334 | } | ||
5335 | set | ||
5336 | { | ||
5337 | this.helpFieldSet = true; | ||
5338 | this.helpField = value; | ||
5339 | } | ||
5340 | } | ||
5341 | |||
5342 | /// <summary> | ||
5343 | /// Type of the performance counter. | ||
5344 | /// </summary> | ||
5345 | public PerformanceCounterTypesType Type | ||
5346 | { | ||
5347 | get | ||
5348 | { | ||
5349 | return this.typeField; | ||
5350 | } | ||
5351 | set | ||
5352 | { | ||
5353 | this.typeFieldSet = true; | ||
5354 | this.typeField = value; | ||
5355 | } | ||
5356 | } | ||
5357 | |||
5358 | /// <summary> | ||
5359 | /// Language for the peformance counter name and help. The default is to use the parent PerformanceCategory element's DefaultLanguage attribute. | ||
5360 | /// </summary> | ||
5361 | public PerformanceCounterLanguageType Language | ||
5362 | { | ||
5363 | get | ||
5364 | { | ||
5365 | return this.languageField; | ||
5366 | } | ||
5367 | set | ||
5368 | { | ||
5369 | this.languageFieldSet = true; | ||
5370 | this.languageField = value; | ||
5371 | } | ||
5372 | } | ||
5373 | |||
5374 | public virtual ISchemaElement ParentElement | ||
5375 | { | ||
5376 | get | ||
5377 | { | ||
5378 | return this.parentElement; | ||
5379 | } | ||
5380 | set | ||
5381 | { | ||
5382 | this.parentElement = value; | ||
5383 | } | ||
5384 | } | ||
5385 | |||
5386 | /// <summary> | ||
5387 | /// Processes this element and all child elements into an XmlWriter. | ||
5388 | /// </summary> | ||
5389 | public virtual void OutputXml(XmlWriter writer) | ||
5390 | { | ||
5391 | if ((null == writer)) | ||
5392 | { | ||
5393 | throw new ArgumentNullException("writer"); | ||
5394 | } | ||
5395 | writer.WriteStartElement("PerformanceCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
5396 | if (this.nameFieldSet) | ||
5397 | { | ||
5398 | writer.WriteAttributeString("Name", this.nameField); | ||
5399 | } | ||
5400 | if (this.helpFieldSet) | ||
5401 | { | ||
5402 | writer.WriteAttributeString("Help", this.helpField); | ||
5403 | } | ||
5404 | if (this.typeFieldSet) | ||
5405 | { | ||
5406 | if ((this.typeField == PerformanceCounterTypesType.averageBase)) | ||
5407 | { | ||
5408 | writer.WriteAttributeString("Type", "averageBase"); | ||
5409 | } | ||
5410 | if ((this.typeField == PerformanceCounterTypesType.averageCount64)) | ||
5411 | { | ||
5412 | writer.WriteAttributeString("Type", "averageCount64"); | ||
5413 | } | ||
5414 | if ((this.typeField == PerformanceCounterTypesType.averageTimer32)) | ||
5415 | { | ||
5416 | writer.WriteAttributeString("Type", "averageTimer32"); | ||
5417 | } | ||
5418 | if ((this.typeField == PerformanceCounterTypesType.counterDelta32)) | ||
5419 | { | ||
5420 | writer.WriteAttributeString("Type", "counterDelta32"); | ||
5421 | } | ||
5422 | if ((this.typeField == PerformanceCounterTypesType.counterTimerInverse)) | ||
5423 | { | ||
5424 | writer.WriteAttributeString("Type", "counterTimerInverse"); | ||
5425 | } | ||
5426 | if ((this.typeField == PerformanceCounterTypesType.sampleFraction)) | ||
5427 | { | ||
5428 | writer.WriteAttributeString("Type", "sampleFraction"); | ||
5429 | } | ||
5430 | if ((this.typeField == PerformanceCounterTypesType.timer100Ns)) | ||
5431 | { | ||
5432 | writer.WriteAttributeString("Type", "timer100Ns"); | ||
5433 | } | ||
5434 | if ((this.typeField == PerformanceCounterTypesType.counterTimer)) | ||
5435 | { | ||
5436 | writer.WriteAttributeString("Type", "counterTimer"); | ||
5437 | } | ||
5438 | if ((this.typeField == PerformanceCounterTypesType.rawFraction)) | ||
5439 | { | ||
5440 | writer.WriteAttributeString("Type", "rawFraction"); | ||
5441 | } | ||
5442 | if ((this.typeField == PerformanceCounterTypesType.timer100NsInverse)) | ||
5443 | { | ||
5444 | writer.WriteAttributeString("Type", "timer100NsInverse"); | ||
5445 | } | ||
5446 | if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer)) | ||
5447 | { | ||
5448 | writer.WriteAttributeString("Type", "counterMultiTimer"); | ||
5449 | } | ||
5450 | if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100Ns)) | ||
5451 | { | ||
5452 | writer.WriteAttributeString("Type", "counterMultiTimer100Ns"); | ||
5453 | } | ||
5454 | if ((this.typeField == PerformanceCounterTypesType.counterMultiTimerInverse)) | ||
5455 | { | ||
5456 | writer.WriteAttributeString("Type", "counterMultiTimerInverse"); | ||
5457 | } | ||
5458 | if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100NsInverse)) | ||
5459 | { | ||
5460 | writer.WriteAttributeString("Type", "counterMultiTimer100NsInverse"); | ||
5461 | } | ||
5462 | if ((this.typeField == PerformanceCounterTypesType.elapsedTime)) | ||
5463 | { | ||
5464 | writer.WriteAttributeString("Type", "elapsedTime"); | ||
5465 | } | ||
5466 | if ((this.typeField == PerformanceCounterTypesType.sampleBase)) | ||
5467 | { | ||
5468 | writer.WriteAttributeString("Type", "sampleBase"); | ||
5469 | } | ||
5470 | if ((this.typeField == PerformanceCounterTypesType.rawBase)) | ||
5471 | { | ||
5472 | writer.WriteAttributeString("Type", "rawBase"); | ||
5473 | } | ||
5474 | if ((this.typeField == PerformanceCounterTypesType.counterMultiBase)) | ||
5475 | { | ||
5476 | writer.WriteAttributeString("Type", "counterMultiBase"); | ||
5477 | } | ||
5478 | if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond64)) | ||
5479 | { | ||
5480 | writer.WriteAttributeString("Type", "rateOfCountsPerSecond64"); | ||
5481 | } | ||
5482 | if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond32)) | ||
5483 | { | ||
5484 | writer.WriteAttributeString("Type", "rateOfCountsPerSecond32"); | ||
5485 | } | ||
5486 | if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval64)) | ||
5487 | { | ||
5488 | writer.WriteAttributeString("Type", "countPerTimeInterval64"); | ||
5489 | } | ||
5490 | if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval32)) | ||
5491 | { | ||
5492 | writer.WriteAttributeString("Type", "countPerTimeInterval32"); | ||
5493 | } | ||
5494 | if ((this.typeField == PerformanceCounterTypesType.sampleCounter)) | ||
5495 | { | ||
5496 | writer.WriteAttributeString("Type", "sampleCounter"); | ||
5497 | } | ||
5498 | if ((this.typeField == PerformanceCounterTypesType.counterDelta64)) | ||
5499 | { | ||
5500 | writer.WriteAttributeString("Type", "counterDelta64"); | ||
5501 | } | ||
5502 | if ((this.typeField == PerformanceCounterTypesType.numberOfItems64)) | ||
5503 | { | ||
5504 | writer.WriteAttributeString("Type", "numberOfItems64"); | ||
5505 | } | ||
5506 | if ((this.typeField == PerformanceCounterTypesType.numberOfItems32)) | ||
5507 | { | ||
5508 | writer.WriteAttributeString("Type", "numberOfItems32"); | ||
5509 | } | ||
5510 | if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX64)) | ||
5511 | { | ||
5512 | writer.WriteAttributeString("Type", "numberOfItemsHEX64"); | ||
5513 | } | ||
5514 | if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX32)) | ||
5515 | { | ||
5516 | writer.WriteAttributeString("Type", "numberOfItemsHEX32"); | ||
5517 | } | ||
5518 | } | ||
5519 | if (this.languageFieldSet) | ||
5520 | { | ||
5521 | if ((this.languageField == PerformanceCounterLanguageType.afrikaans)) | ||
5522 | { | ||
5523 | writer.WriteAttributeString("Language", "afrikaans"); | ||
5524 | } | ||
5525 | if ((this.languageField == PerformanceCounterLanguageType.albanian)) | ||
5526 | { | ||
5527 | writer.WriteAttributeString("Language", "albanian"); | ||
5528 | } | ||
5529 | if ((this.languageField == PerformanceCounterLanguageType.arabic)) | ||
5530 | { | ||
5531 | writer.WriteAttributeString("Language", "arabic"); | ||
5532 | } | ||
5533 | if ((this.languageField == PerformanceCounterLanguageType.armenian)) | ||
5534 | { | ||
5535 | writer.WriteAttributeString("Language", "armenian"); | ||
5536 | } | ||
5537 | if ((this.languageField == PerformanceCounterLanguageType.assamese)) | ||
5538 | { | ||
5539 | writer.WriteAttributeString("Language", "assamese"); | ||
5540 | } | ||
5541 | if ((this.languageField == PerformanceCounterLanguageType.azeri)) | ||
5542 | { | ||
5543 | writer.WriteAttributeString("Language", "azeri"); | ||
5544 | } | ||
5545 | if ((this.languageField == PerformanceCounterLanguageType.basque)) | ||
5546 | { | ||
5547 | writer.WriteAttributeString("Language", "basque"); | ||
5548 | } | ||
5549 | if ((this.languageField == PerformanceCounterLanguageType.belarusian)) | ||
5550 | { | ||
5551 | writer.WriteAttributeString("Language", "belarusian"); | ||
5552 | } | ||
5553 | if ((this.languageField == PerformanceCounterLanguageType.bengali)) | ||
5554 | { | ||
5555 | writer.WriteAttributeString("Language", "bengali"); | ||
5556 | } | ||
5557 | if ((this.languageField == PerformanceCounterLanguageType.bulgarian)) | ||
5558 | { | ||
5559 | writer.WriteAttributeString("Language", "bulgarian"); | ||
5560 | } | ||
5561 | if ((this.languageField == PerformanceCounterLanguageType.catalan)) | ||
5562 | { | ||
5563 | writer.WriteAttributeString("Language", "catalan"); | ||
5564 | } | ||
5565 | if ((this.languageField == PerformanceCounterLanguageType.chinese)) | ||
5566 | { | ||
5567 | writer.WriteAttributeString("Language", "chinese"); | ||
5568 | } | ||
5569 | if ((this.languageField == PerformanceCounterLanguageType.croatian)) | ||
5570 | { | ||
5571 | writer.WriteAttributeString("Language", "croatian"); | ||
5572 | } | ||
5573 | if ((this.languageField == PerformanceCounterLanguageType.czech)) | ||
5574 | { | ||
5575 | writer.WriteAttributeString("Language", "czech"); | ||
5576 | } | ||
5577 | if ((this.languageField == PerformanceCounterLanguageType.danish)) | ||
5578 | { | ||
5579 | writer.WriteAttributeString("Language", "danish"); | ||
5580 | } | ||
5581 | if ((this.languageField == PerformanceCounterLanguageType.divehi)) | ||
5582 | { | ||
5583 | writer.WriteAttributeString("Language", "divehi"); | ||
5584 | } | ||
5585 | if ((this.languageField == PerformanceCounterLanguageType.dutch)) | ||
5586 | { | ||
5587 | writer.WriteAttributeString("Language", "dutch"); | ||
5588 | } | ||
5589 | if ((this.languageField == PerformanceCounterLanguageType.english)) | ||
5590 | { | ||
5591 | writer.WriteAttributeString("Language", "english"); | ||
5592 | } | ||
5593 | if ((this.languageField == PerformanceCounterLanguageType.estonian)) | ||
5594 | { | ||
5595 | writer.WriteAttributeString("Language", "estonian"); | ||
5596 | } | ||
5597 | if ((this.languageField == PerformanceCounterLanguageType.faeroese)) | ||
5598 | { | ||
5599 | writer.WriteAttributeString("Language", "faeroese"); | ||
5600 | } | ||
5601 | if ((this.languageField == PerformanceCounterLanguageType.farsi)) | ||
5602 | { | ||
5603 | writer.WriteAttributeString("Language", "farsi"); | ||
5604 | } | ||
5605 | if ((this.languageField == PerformanceCounterLanguageType.finnish)) | ||
5606 | { | ||
5607 | writer.WriteAttributeString("Language", "finnish"); | ||
5608 | } | ||
5609 | if ((this.languageField == PerformanceCounterLanguageType.french)) | ||
5610 | { | ||
5611 | writer.WriteAttributeString("Language", "french"); | ||
5612 | } | ||
5613 | if ((this.languageField == PerformanceCounterLanguageType.galician)) | ||
5614 | { | ||
5615 | writer.WriteAttributeString("Language", "galician"); | ||
5616 | } | ||
5617 | if ((this.languageField == PerformanceCounterLanguageType.georgian)) | ||
5618 | { | ||
5619 | writer.WriteAttributeString("Language", "georgian"); | ||
5620 | } | ||
5621 | if ((this.languageField == PerformanceCounterLanguageType.german)) | ||
5622 | { | ||
5623 | writer.WriteAttributeString("Language", "german"); | ||
5624 | } | ||
5625 | if ((this.languageField == PerformanceCounterLanguageType.greek)) | ||
5626 | { | ||
5627 | writer.WriteAttributeString("Language", "greek"); | ||
5628 | } | ||
5629 | if ((this.languageField == PerformanceCounterLanguageType.gujarati)) | ||
5630 | { | ||
5631 | writer.WriteAttributeString("Language", "gujarati"); | ||
5632 | } | ||
5633 | if ((this.languageField == PerformanceCounterLanguageType.hebrew)) | ||
5634 | { | ||
5635 | writer.WriteAttributeString("Language", "hebrew"); | ||
5636 | } | ||
5637 | if ((this.languageField == PerformanceCounterLanguageType.hindi)) | ||
5638 | { | ||
5639 | writer.WriteAttributeString("Language", "hindi"); | ||
5640 | } | ||
5641 | if ((this.languageField == PerformanceCounterLanguageType.hungarian)) | ||
5642 | { | ||
5643 | writer.WriteAttributeString("Language", "hungarian"); | ||
5644 | } | ||
5645 | if ((this.languageField == PerformanceCounterLanguageType.icelandic)) | ||
5646 | { | ||
5647 | writer.WriteAttributeString("Language", "icelandic"); | ||
5648 | } | ||
5649 | if ((this.languageField == PerformanceCounterLanguageType.indonesian)) | ||
5650 | { | ||
5651 | writer.WriteAttributeString("Language", "indonesian"); | ||
5652 | } | ||
5653 | if ((this.languageField == PerformanceCounterLanguageType.italian)) | ||
5654 | { | ||
5655 | writer.WriteAttributeString("Language", "italian"); | ||
5656 | } | ||
5657 | if ((this.languageField == PerformanceCounterLanguageType.japanese)) | ||
5658 | { | ||
5659 | writer.WriteAttributeString("Language", "japanese"); | ||
5660 | } | ||
5661 | if ((this.languageField == PerformanceCounterLanguageType.kannada)) | ||
5662 | { | ||
5663 | writer.WriteAttributeString("Language", "kannada"); | ||
5664 | } | ||
5665 | if ((this.languageField == PerformanceCounterLanguageType.kashmiri)) | ||
5666 | { | ||
5667 | writer.WriteAttributeString("Language", "kashmiri"); | ||
5668 | } | ||
5669 | if ((this.languageField == PerformanceCounterLanguageType.kazak)) | ||
5670 | { | ||
5671 | writer.WriteAttributeString("Language", "kazak"); | ||
5672 | } | ||
5673 | if ((this.languageField == PerformanceCounterLanguageType.konkani)) | ||
5674 | { | ||
5675 | writer.WriteAttributeString("Language", "konkani"); | ||
5676 | } | ||
5677 | if ((this.languageField == PerformanceCounterLanguageType.korean)) | ||
5678 | { | ||
5679 | writer.WriteAttributeString("Language", "korean"); | ||
5680 | } | ||
5681 | if ((this.languageField == PerformanceCounterLanguageType.kyrgyz)) | ||
5682 | { | ||
5683 | writer.WriteAttributeString("Language", "kyrgyz"); | ||
5684 | } | ||
5685 | if ((this.languageField == PerformanceCounterLanguageType.latvian)) | ||
5686 | { | ||
5687 | writer.WriteAttributeString("Language", "latvian"); | ||
5688 | } | ||
5689 | if ((this.languageField == PerformanceCounterLanguageType.lithuanian)) | ||
5690 | { | ||
5691 | writer.WriteAttributeString("Language", "lithuanian"); | ||
5692 | } | ||
5693 | if ((this.languageField == PerformanceCounterLanguageType.macedonian)) | ||
5694 | { | ||
5695 | writer.WriteAttributeString("Language", "macedonian"); | ||
5696 | } | ||
5697 | if ((this.languageField == PerformanceCounterLanguageType.malay)) | ||
5698 | { | ||
5699 | writer.WriteAttributeString("Language", "malay"); | ||
5700 | } | ||
5701 | if ((this.languageField == PerformanceCounterLanguageType.malayalam)) | ||
5702 | { | ||
5703 | writer.WriteAttributeString("Language", "malayalam"); | ||
5704 | } | ||
5705 | if ((this.languageField == PerformanceCounterLanguageType.manipuri)) | ||
5706 | { | ||
5707 | writer.WriteAttributeString("Language", "manipuri"); | ||
5708 | } | ||
5709 | if ((this.languageField == PerformanceCounterLanguageType.marathi)) | ||
5710 | { | ||
5711 | writer.WriteAttributeString("Language", "marathi"); | ||
5712 | } | ||
5713 | if ((this.languageField == PerformanceCounterLanguageType.mongolian)) | ||
5714 | { | ||
5715 | writer.WriteAttributeString("Language", "mongolian"); | ||
5716 | } | ||
5717 | if ((this.languageField == PerformanceCounterLanguageType.nepali)) | ||
5718 | { | ||
5719 | writer.WriteAttributeString("Language", "nepali"); | ||
5720 | } | ||
5721 | if ((this.languageField == PerformanceCounterLanguageType.norwegian)) | ||
5722 | { | ||
5723 | writer.WriteAttributeString("Language", "norwegian"); | ||
5724 | } | ||
5725 | if ((this.languageField == PerformanceCounterLanguageType.oriya)) | ||
5726 | { | ||
5727 | writer.WriteAttributeString("Language", "oriya"); | ||
5728 | } | ||
5729 | if ((this.languageField == PerformanceCounterLanguageType.polish)) | ||
5730 | { | ||
5731 | writer.WriteAttributeString("Language", "polish"); | ||
5732 | } | ||
5733 | if ((this.languageField == PerformanceCounterLanguageType.portuguese)) | ||
5734 | { | ||
5735 | writer.WriteAttributeString("Language", "portuguese"); | ||
5736 | } | ||
5737 | if ((this.languageField == PerformanceCounterLanguageType.punjabi)) | ||
5738 | { | ||
5739 | writer.WriteAttributeString("Language", "punjabi"); | ||
5740 | } | ||
5741 | if ((this.languageField == PerformanceCounterLanguageType.romanian)) | ||
5742 | { | ||
5743 | writer.WriteAttributeString("Language", "romanian"); | ||
5744 | } | ||
5745 | if ((this.languageField == PerformanceCounterLanguageType.russian)) | ||
5746 | { | ||
5747 | writer.WriteAttributeString("Language", "russian"); | ||
5748 | } | ||
5749 | if ((this.languageField == PerformanceCounterLanguageType.sanskrit)) | ||
5750 | { | ||
5751 | writer.WriteAttributeString("Language", "sanskrit"); | ||
5752 | } | ||
5753 | if ((this.languageField == PerformanceCounterLanguageType.serbian)) | ||
5754 | { | ||
5755 | writer.WriteAttributeString("Language", "serbian"); | ||
5756 | } | ||
5757 | if ((this.languageField == PerformanceCounterLanguageType.sindhi)) | ||
5758 | { | ||
5759 | writer.WriteAttributeString("Language", "sindhi"); | ||
5760 | } | ||
5761 | if ((this.languageField == PerformanceCounterLanguageType.slovak)) | ||
5762 | { | ||
5763 | writer.WriteAttributeString("Language", "slovak"); | ||
5764 | } | ||
5765 | if ((this.languageField == PerformanceCounterLanguageType.slovenian)) | ||
5766 | { | ||
5767 | writer.WriteAttributeString("Language", "slovenian"); | ||
5768 | } | ||
5769 | if ((this.languageField == PerformanceCounterLanguageType.spanish)) | ||
5770 | { | ||
5771 | writer.WriteAttributeString("Language", "spanish"); | ||
5772 | } | ||
5773 | if ((this.languageField == PerformanceCounterLanguageType.swahili)) | ||
5774 | { | ||
5775 | writer.WriteAttributeString("Language", "swahili"); | ||
5776 | } | ||
5777 | if ((this.languageField == PerformanceCounterLanguageType.swedish)) | ||
5778 | { | ||
5779 | writer.WriteAttributeString("Language", "swedish"); | ||
5780 | } | ||
5781 | if ((this.languageField == PerformanceCounterLanguageType.syriac)) | ||
5782 | { | ||
5783 | writer.WriteAttributeString("Language", "syriac"); | ||
5784 | } | ||
5785 | if ((this.languageField == PerformanceCounterLanguageType.tamil)) | ||
5786 | { | ||
5787 | writer.WriteAttributeString("Language", "tamil"); | ||
5788 | } | ||
5789 | if ((this.languageField == PerformanceCounterLanguageType.tatar)) | ||
5790 | { | ||
5791 | writer.WriteAttributeString("Language", "tatar"); | ||
5792 | } | ||
5793 | if ((this.languageField == PerformanceCounterLanguageType.telugu)) | ||
5794 | { | ||
5795 | writer.WriteAttributeString("Language", "telugu"); | ||
5796 | } | ||
5797 | if ((this.languageField == PerformanceCounterLanguageType.thai)) | ||
5798 | { | ||
5799 | writer.WriteAttributeString("Language", "thai"); | ||
5800 | } | ||
5801 | if ((this.languageField == PerformanceCounterLanguageType.turkish)) | ||
5802 | { | ||
5803 | writer.WriteAttributeString("Language", "turkish"); | ||
5804 | } | ||
5805 | if ((this.languageField == PerformanceCounterLanguageType.ukrainian)) | ||
5806 | { | ||
5807 | writer.WriteAttributeString("Language", "ukrainian"); | ||
5808 | } | ||
5809 | if ((this.languageField == PerformanceCounterLanguageType.urdu)) | ||
5810 | { | ||
5811 | writer.WriteAttributeString("Language", "urdu"); | ||
5812 | } | ||
5813 | if ((this.languageField == PerformanceCounterLanguageType.uzbek)) | ||
5814 | { | ||
5815 | writer.WriteAttributeString("Language", "uzbek"); | ||
5816 | } | ||
5817 | if ((this.languageField == PerformanceCounterLanguageType.vietnamese)) | ||
5818 | { | ||
5819 | writer.WriteAttributeString("Language", "vietnamese"); | ||
5820 | } | ||
5821 | } | ||
5822 | writer.WriteEndElement(); | ||
5823 | } | ||
5824 | |||
5825 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
5826 | void ISetAttributes.SetAttribute(string name, string value) | ||
5827 | { | ||
5828 | if (String.IsNullOrEmpty(name)) | ||
5829 | { | ||
5830 | throw new ArgumentNullException("name"); | ||
5831 | } | ||
5832 | if (("Name" == name)) | ||
5833 | { | ||
5834 | this.nameField = value; | ||
5835 | this.nameFieldSet = true; | ||
5836 | } | ||
5837 | if (("Help" == name)) | ||
5838 | { | ||
5839 | this.helpField = value; | ||
5840 | this.helpFieldSet = true; | ||
5841 | } | ||
5842 | if (("Type" == name)) | ||
5843 | { | ||
5844 | this.typeField = Enums.ParsePerformanceCounterTypesType(value); | ||
5845 | this.typeFieldSet = true; | ||
5846 | } | ||
5847 | if (("Language" == name)) | ||
5848 | { | ||
5849 | this.languageField = Enums.ParsePerformanceCounterLanguageType(value); | ||
5850 | this.languageFieldSet = true; | ||
5851 | } | ||
5852 | } | ||
5853 | } | ||
5854 | |||
5855 | /// <summary> | ||
5856 | /// Used to install Perfmon counters. | ||
5857 | /// </summary> | ||
5858 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
5859 | public class PerfCounter : ISchemaElement, ISetAttributes | ||
5860 | { | ||
5861 | |||
5862 | private string nameField; | ||
5863 | |||
5864 | private bool nameFieldSet; | ||
5865 | |||
5866 | private ISchemaElement parentElement; | ||
5867 | |||
5868 | public string Name | ||
5869 | { | ||
5870 | get | ||
5871 | { | ||
5872 | return this.nameField; | ||
5873 | } | ||
5874 | set | ||
5875 | { | ||
5876 | this.nameFieldSet = true; | ||
5877 | this.nameField = value; | ||
5878 | } | ||
5879 | } | ||
5880 | |||
5881 | public virtual ISchemaElement ParentElement | ||
5882 | { | ||
5883 | get | ||
5884 | { | ||
5885 | return this.parentElement; | ||
5886 | } | ||
5887 | set | ||
5888 | { | ||
5889 | this.parentElement = value; | ||
5890 | } | ||
5891 | } | ||
5892 | |||
5893 | /// <summary> | ||
5894 | /// Processes this element and all child elements into an XmlWriter. | ||
5895 | /// </summary> | ||
5896 | public virtual void OutputXml(XmlWriter writer) | ||
5897 | { | ||
5898 | if ((null == writer)) | ||
5899 | { | ||
5900 | throw new ArgumentNullException("writer"); | ||
5901 | } | ||
5902 | writer.WriteStartElement("PerfCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
5903 | if (this.nameFieldSet) | ||
5904 | { | ||
5905 | writer.WriteAttributeString("Name", this.nameField); | ||
5906 | } | ||
5907 | writer.WriteEndElement(); | ||
5908 | } | ||
5909 | |||
5910 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
5911 | void ISetAttributes.SetAttribute(string name, string value) | ||
5912 | { | ||
5913 | if (String.IsNullOrEmpty(name)) | ||
5914 | { | ||
5915 | throw new ArgumentNullException("name"); | ||
5916 | } | ||
5917 | if (("Name" == name)) | ||
5918 | { | ||
5919 | this.nameField = value; | ||
5920 | this.nameFieldSet = true; | ||
5921 | } | ||
5922 | } | ||
5923 | } | ||
5924 | |||
5925 | /// <summary> | ||
5926 | /// Used to install Perfmon Counter Manifests. | ||
5927 | /// Note that this functionality cannot be used with major upgrades that are scheduled after the InstallExecute, | ||
5928 | /// InstallExecuteAgain, or InstallFinalize actions. For more information on major upgrade scheduling, see | ||
5929 | /// </summary> | ||
5930 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
5931 | public class PerfCounterManifest : ISchemaElement, ISetAttributes | ||
5932 | { | ||
5933 | |||
5934 | private string resourceFileDirectoryField; | ||
5935 | |||
5936 | private bool resourceFileDirectoryFieldSet; | ||
5937 | |||
5938 | private ISchemaElement parentElement; | ||
5939 | |||
5940 | /// <summary> | ||
5941 | /// The directory that holds the resource file of the providers in the perfmon counter manifest. Often the resource file path cannot be determined until setup time. Put the directory here and during perfmon manifest registrtion the path will be updated in the registry. If not specified, Perfmon will look for the resource file in the same directory of the perfmon counter manifest file. | ||
5942 | /// </summary> | ||
5943 | public string ResourceFileDirectory | ||
5944 | { | ||
5945 | get | ||
5946 | { | ||
5947 | return this.resourceFileDirectoryField; | ||
5948 | } | ||
5949 | set | ||
5950 | { | ||
5951 | this.resourceFileDirectoryFieldSet = true; | ||
5952 | this.resourceFileDirectoryField = value; | ||
5953 | } | ||
5954 | } | ||
5955 | |||
5956 | public virtual ISchemaElement ParentElement | ||
5957 | { | ||
5958 | get | ||
5959 | { | ||
5960 | return this.parentElement; | ||
5961 | } | ||
5962 | set | ||
5963 | { | ||
5964 | this.parentElement = value; | ||
5965 | } | ||
5966 | } | ||
5967 | |||
5968 | /// <summary> | ||
5969 | /// Processes this element and all child elements into an XmlWriter. | ||
5970 | /// </summary> | ||
5971 | public virtual void OutputXml(XmlWriter writer) | ||
5972 | { | ||
5973 | if ((null == writer)) | ||
5974 | { | ||
5975 | throw new ArgumentNullException("writer"); | ||
5976 | } | ||
5977 | writer.WriteStartElement("PerfCounterManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
5978 | if (this.resourceFileDirectoryFieldSet) | ||
5979 | { | ||
5980 | writer.WriteAttributeString("ResourceFileDirectory", this.resourceFileDirectoryField); | ||
5981 | } | ||
5982 | writer.WriteEndElement(); | ||
5983 | } | ||
5984 | |||
5985 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
5986 | void ISetAttributes.SetAttribute(string name, string value) | ||
5987 | { | ||
5988 | if (String.IsNullOrEmpty(name)) | ||
5989 | { | ||
5990 | throw new ArgumentNullException("name"); | ||
5991 | } | ||
5992 | if (("ResourceFileDirectory" == name)) | ||
5993 | { | ||
5994 | this.resourceFileDirectoryField = value; | ||
5995 | this.resourceFileDirectoryFieldSet = true; | ||
5996 | } | ||
5997 | } | ||
5998 | } | ||
5999 | |||
6000 | /// <summary> | ||
6001 | /// Used to install Event Manifests. | ||
6002 | /// </summary> | ||
6003 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
6004 | public class EventManifest : ISchemaElement, ISetAttributes | ||
6005 | { | ||
6006 | |||
6007 | private string messageFileField; | ||
6008 | |||
6009 | private bool messageFileFieldSet; | ||
6010 | |||
6011 | private string parameterFileField; | ||
6012 | |||
6013 | private bool parameterFileFieldSet; | ||
6014 | |||
6015 | private string resourceFileField; | ||
6016 | |||
6017 | private bool resourceFileFieldSet; | ||
6018 | |||
6019 | private ISchemaElement parentElement; | ||
6020 | |||
6021 | /// <summary> | ||
6022 | /// The message file (including path) of all the providers in the event manifest. Often the message file path cannot be determined until setup time. Put your MessageFile here and the messageFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. | ||
6023 | /// </summary> | ||
6024 | public string MessageFile | ||
6025 | { | ||
6026 | get | ||
6027 | { | ||
6028 | return this.messageFileField; | ||
6029 | } | ||
6030 | set | ||
6031 | { | ||
6032 | this.messageFileFieldSet = true; | ||
6033 | this.messageFileField = value; | ||
6034 | } | ||
6035 | } | ||
6036 | |||
6037 | /// <summary> | ||
6038 | /// The parameter file (including path) of all the providers in the event manifest. Often the parameter file path cannot be determined until setup time. Put your ParameterFile here and the parameterFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. | ||
6039 | /// </summary> | ||
6040 | public string ParameterFile | ||
6041 | { | ||
6042 | get | ||
6043 | { | ||
6044 | return this.parameterFileField; | ||
6045 | } | ||
6046 | set | ||
6047 | { | ||
6048 | this.parameterFileFieldSet = true; | ||
6049 | this.parameterFileField = value; | ||
6050 | } | ||
6051 | } | ||
6052 | |||
6053 | /// <summary> | ||
6054 | /// The resource file (including path) of all the providers in the event manifest. Often the resource file path cannot be determined until setup time. Put your ResourceFile here and the resourceFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. | ||
6055 | /// </summary> | ||
6056 | public string ResourceFile | ||
6057 | { | ||
6058 | get | ||
6059 | { | ||
6060 | return this.resourceFileField; | ||
6061 | } | ||
6062 | set | ||
6063 | { | ||
6064 | this.resourceFileFieldSet = true; | ||
6065 | this.resourceFileField = value; | ||
6066 | } | ||
6067 | } | ||
6068 | |||
6069 | public virtual ISchemaElement ParentElement | ||
6070 | { | ||
6071 | get | ||
6072 | { | ||
6073 | return this.parentElement; | ||
6074 | } | ||
6075 | set | ||
6076 | { | ||
6077 | this.parentElement = value; | ||
6078 | } | ||
6079 | } | ||
6080 | |||
6081 | /// <summary> | ||
6082 | /// Processes this element and all child elements into an XmlWriter. | ||
6083 | /// </summary> | ||
6084 | public virtual void OutputXml(XmlWriter writer) | ||
6085 | { | ||
6086 | if ((null == writer)) | ||
6087 | { | ||
6088 | throw new ArgumentNullException("writer"); | ||
6089 | } | ||
6090 | writer.WriteStartElement("EventManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
6091 | if (this.messageFileFieldSet) | ||
6092 | { | ||
6093 | writer.WriteAttributeString("MessageFile", this.messageFileField); | ||
6094 | } | ||
6095 | if (this.parameterFileFieldSet) | ||
6096 | { | ||
6097 | writer.WriteAttributeString("ParameterFile", this.parameterFileField); | ||
6098 | } | ||
6099 | if (this.resourceFileFieldSet) | ||
6100 | { | ||
6101 | writer.WriteAttributeString("ResourceFile", this.resourceFileField); | ||
6102 | } | ||
6103 | writer.WriteEndElement(); | ||
6104 | } | ||
6105 | |||
6106 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
6107 | void ISetAttributes.SetAttribute(string name, string value) | ||
6108 | { | ||
6109 | if (String.IsNullOrEmpty(name)) | ||
6110 | { | ||
6111 | throw new ArgumentNullException("name"); | ||
6112 | } | ||
6113 | if (("MessageFile" == name)) | ||
6114 | { | ||
6115 | this.messageFileField = value; | ||
6116 | this.messageFileFieldSet = true; | ||
6117 | } | ||
6118 | if (("ParameterFile" == name)) | ||
6119 | { | ||
6120 | this.parameterFileField = value; | ||
6121 | this.parameterFileFieldSet = true; | ||
6122 | } | ||
6123 | if (("ResourceFile" == name)) | ||
6124 | { | ||
6125 | this.resourceFileField = value; | ||
6126 | this.resourceFileFieldSet = true; | ||
6127 | } | ||
6128 | } | ||
6129 | } | ||
6130 | |||
6131 | /// <summary> | ||
6132 | /// Sets ACLs on File, Registry, CreateFolder, or ServiceInstall. When under a Registry element, this cannot be used | ||
6133 | /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. | ||
6134 | /// The table and key are taken from the parent element. | ||
6135 | /// </summary> | ||
6136 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
6137 | public class PermissionEx : ISchemaElement, ISetAttributes | ||
6138 | { | ||
6139 | |||
6140 | private string domainField; | ||
6141 | |||
6142 | private bool domainFieldSet; | ||
6143 | |||
6144 | private string userField; | ||
6145 | |||
6146 | private bool userFieldSet; | ||
6147 | |||
6148 | private YesNoType readField; | ||
6149 | |||
6150 | private bool readFieldSet; | ||
6151 | |||
6152 | private YesNoType deleteField; | ||
6153 | |||
6154 | private bool deleteFieldSet; | ||
6155 | |||
6156 | private YesNoType readPermissionField; | ||
6157 | |||
6158 | private bool readPermissionFieldSet; | ||
6159 | |||
6160 | private YesNoType changePermissionField; | ||
6161 | |||
6162 | private bool changePermissionFieldSet; | ||
6163 | |||
6164 | private YesNoType takeOwnershipField; | ||
6165 | |||
6166 | private bool takeOwnershipFieldSet; | ||
6167 | |||
6168 | private YesNoType readAttributesField; | ||
6169 | |||
6170 | private bool readAttributesFieldSet; | ||
6171 | |||
6172 | private YesNoType writeAttributesField; | ||
6173 | |||
6174 | private bool writeAttributesFieldSet; | ||
6175 | |||
6176 | private YesNoType readExtendedAttributesField; | ||
6177 | |||
6178 | private bool readExtendedAttributesFieldSet; | ||
6179 | |||
6180 | private YesNoType writeExtendedAttributesField; | ||
6181 | |||
6182 | private bool writeExtendedAttributesFieldSet; | ||
6183 | |||
6184 | private YesNoType synchronizeField; | ||
6185 | |||
6186 | private bool synchronizeFieldSet; | ||
6187 | |||
6188 | private YesNoType createFileField; | ||
6189 | |||
6190 | private bool createFileFieldSet; | ||
6191 | |||
6192 | private YesNoType createChildField; | ||
6193 | |||
6194 | private bool createChildFieldSet; | ||
6195 | |||
6196 | private YesNoType deleteChildField; | ||
6197 | |||
6198 | private bool deleteChildFieldSet; | ||
6199 | |||
6200 | private YesNoType traverseField; | ||
6201 | |||
6202 | private bool traverseFieldSet; | ||
6203 | |||
6204 | private YesNoType appendField; | ||
6205 | |||
6206 | private bool appendFieldSet; | ||
6207 | |||
6208 | private YesNoType executeField; | ||
6209 | |||
6210 | private bool executeFieldSet; | ||
6211 | |||
6212 | private YesNoType writeField; | ||
6213 | |||
6214 | private bool writeFieldSet; | ||
6215 | |||
6216 | private YesNoType createSubkeysField; | ||
6217 | |||
6218 | private bool createSubkeysFieldSet; | ||
6219 | |||
6220 | private YesNoType enumerateSubkeysField; | ||
6221 | |||
6222 | private bool enumerateSubkeysFieldSet; | ||
6223 | |||
6224 | private YesNoType notifyField; | ||
6225 | |||
6226 | private bool notifyFieldSet; | ||
6227 | |||
6228 | private YesNoType createLinkField; | ||
6229 | |||
6230 | private bool createLinkFieldSet; | ||
6231 | |||
6232 | private YesNoType genericAllField; | ||
6233 | |||
6234 | private bool genericAllFieldSet; | ||
6235 | |||
6236 | private YesNoType genericExecuteField; | ||
6237 | |||
6238 | private bool genericExecuteFieldSet; | ||
6239 | |||
6240 | private YesNoType genericWriteField; | ||
6241 | |||
6242 | private bool genericWriteFieldSet; | ||
6243 | |||
6244 | private YesNoType genericReadField; | ||
6245 | |||
6246 | private bool genericReadFieldSet; | ||
6247 | |||
6248 | private YesNoType serviceQueryConfigField; | ||
6249 | |||
6250 | private bool serviceQueryConfigFieldSet; | ||
6251 | |||
6252 | private YesNoType serviceChangeConfigField; | ||
6253 | |||
6254 | private bool serviceChangeConfigFieldSet; | ||
6255 | |||
6256 | private YesNoType serviceQueryStatusField; | ||
6257 | |||
6258 | private bool serviceQueryStatusFieldSet; | ||
6259 | |||
6260 | private YesNoType serviceEnumerateDependentsField; | ||
6261 | |||
6262 | private bool serviceEnumerateDependentsFieldSet; | ||
6263 | |||
6264 | private YesNoType serviceStartField; | ||
6265 | |||
6266 | private bool serviceStartFieldSet; | ||
6267 | |||
6268 | private YesNoType serviceStopField; | ||
6269 | |||
6270 | private bool serviceStopFieldSet; | ||
6271 | |||
6272 | private YesNoType servicePauseContinueField; | ||
6273 | |||
6274 | private bool servicePauseContinueFieldSet; | ||
6275 | |||
6276 | private YesNoType serviceInterrogateField; | ||
6277 | |||
6278 | private bool serviceInterrogateFieldSet; | ||
6279 | |||
6280 | private YesNoType serviceUserDefinedControlField; | ||
6281 | |||
6282 | private bool serviceUserDefinedControlFieldSet; | ||
6283 | |||
6284 | private ISchemaElement parentElement; | ||
6285 | |||
6286 | public string Domain | ||
6287 | { | ||
6288 | get | ||
6289 | { | ||
6290 | return this.domainField; | ||
6291 | } | ||
6292 | set | ||
6293 | { | ||
6294 | this.domainFieldSet = true; | ||
6295 | this.domainField = value; | ||
6296 | } | ||
6297 | } | ||
6298 | |||
6299 | public string User | ||
6300 | { | ||
6301 | get | ||
6302 | { | ||
6303 | return this.userField; | ||
6304 | } | ||
6305 | set | ||
6306 | { | ||
6307 | this.userFieldSet = true; | ||
6308 | this.userField = value; | ||
6309 | } | ||
6310 | } | ||
6311 | |||
6312 | public YesNoType Read | ||
6313 | { | ||
6314 | get | ||
6315 | { | ||
6316 | return this.readField; | ||
6317 | } | ||
6318 | set | ||
6319 | { | ||
6320 | this.readFieldSet = true; | ||
6321 | this.readField = value; | ||
6322 | } | ||
6323 | } | ||
6324 | |||
6325 | public YesNoType Delete | ||
6326 | { | ||
6327 | get | ||
6328 | { | ||
6329 | return this.deleteField; | ||
6330 | } | ||
6331 | set | ||
6332 | { | ||
6333 | this.deleteFieldSet = true; | ||
6334 | this.deleteField = value; | ||
6335 | } | ||
6336 | } | ||
6337 | |||
6338 | public YesNoType ReadPermission | ||
6339 | { | ||
6340 | get | ||
6341 | { | ||
6342 | return this.readPermissionField; | ||
6343 | } | ||
6344 | set | ||
6345 | { | ||
6346 | this.readPermissionFieldSet = true; | ||
6347 | this.readPermissionField = value; | ||
6348 | } | ||
6349 | } | ||
6350 | |||
6351 | public YesNoType ChangePermission | ||
6352 | { | ||
6353 | get | ||
6354 | { | ||
6355 | return this.changePermissionField; | ||
6356 | } | ||
6357 | set | ||
6358 | { | ||
6359 | this.changePermissionFieldSet = true; | ||
6360 | this.changePermissionField = value; | ||
6361 | } | ||
6362 | } | ||
6363 | |||
6364 | public YesNoType TakeOwnership | ||
6365 | { | ||
6366 | get | ||
6367 | { | ||
6368 | return this.takeOwnershipField; | ||
6369 | } | ||
6370 | set | ||
6371 | { | ||
6372 | this.takeOwnershipFieldSet = true; | ||
6373 | this.takeOwnershipField = value; | ||
6374 | } | ||
6375 | } | ||
6376 | |||
6377 | public YesNoType ReadAttributes | ||
6378 | { | ||
6379 | get | ||
6380 | { | ||
6381 | return this.readAttributesField; | ||
6382 | } | ||
6383 | set | ||
6384 | { | ||
6385 | this.readAttributesFieldSet = true; | ||
6386 | this.readAttributesField = value; | ||
6387 | } | ||
6388 | } | ||
6389 | |||
6390 | public YesNoType WriteAttributes | ||
6391 | { | ||
6392 | get | ||
6393 | { | ||
6394 | return this.writeAttributesField; | ||
6395 | } | ||
6396 | set | ||
6397 | { | ||
6398 | this.writeAttributesFieldSet = true; | ||
6399 | this.writeAttributesField = value; | ||
6400 | } | ||
6401 | } | ||
6402 | |||
6403 | public YesNoType ReadExtendedAttributes | ||
6404 | { | ||
6405 | get | ||
6406 | { | ||
6407 | return this.readExtendedAttributesField; | ||
6408 | } | ||
6409 | set | ||
6410 | { | ||
6411 | this.readExtendedAttributesFieldSet = true; | ||
6412 | this.readExtendedAttributesField = value; | ||
6413 | } | ||
6414 | } | ||
6415 | |||
6416 | public YesNoType WriteExtendedAttributes | ||
6417 | { | ||
6418 | get | ||
6419 | { | ||
6420 | return this.writeExtendedAttributesField; | ||
6421 | } | ||
6422 | set | ||
6423 | { | ||
6424 | this.writeExtendedAttributesFieldSet = true; | ||
6425 | this.writeExtendedAttributesField = value; | ||
6426 | } | ||
6427 | } | ||
6428 | |||
6429 | public YesNoType Synchronize | ||
6430 | { | ||
6431 | get | ||
6432 | { | ||
6433 | return this.synchronizeField; | ||
6434 | } | ||
6435 | set | ||
6436 | { | ||
6437 | this.synchronizeFieldSet = true; | ||
6438 | this.synchronizeField = value; | ||
6439 | } | ||
6440 | } | ||
6441 | |||
6442 | /// <summary> | ||
6443 | /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. | ||
6444 | /// </summary> | ||
6445 | public YesNoType CreateFile | ||
6446 | { | ||
6447 | get | ||
6448 | { | ||
6449 | return this.createFileField; | ||
6450 | } | ||
6451 | set | ||
6452 | { | ||
6453 | this.createFileFieldSet = true; | ||
6454 | this.createFileField = value; | ||
6455 | } | ||
6456 | } | ||
6457 | |||
6458 | /// <summary> | ||
6459 | /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. | ||
6460 | /// </summary> | ||
6461 | public YesNoType CreateChild | ||
6462 | { | ||
6463 | get | ||
6464 | { | ||
6465 | return this.createChildField; | ||
6466 | } | ||
6467 | set | ||
6468 | { | ||
6469 | this.createChildFieldSet = true; | ||
6470 | this.createChildField = value; | ||
6471 | } | ||
6472 | } | ||
6473 | |||
6474 | /// <summary> | ||
6475 | /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent. | ||
6476 | /// </summary> | ||
6477 | public YesNoType DeleteChild | ||
6478 | { | ||
6479 | get | ||
6480 | { | ||
6481 | return this.deleteChildField; | ||
6482 | } | ||
6483 | set | ||
6484 | { | ||
6485 | this.deleteChildFieldSet = true; | ||
6486 | this.deleteChildField = value; | ||
6487 | } | ||
6488 | } | ||
6489 | |||
6490 | /// <summary> | ||
6491 | /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent. | ||
6492 | /// </summary> | ||
6493 | public YesNoType Traverse | ||
6494 | { | ||
6495 | get | ||
6496 | { | ||
6497 | return this.traverseField; | ||
6498 | } | ||
6499 | set | ||
6500 | { | ||
6501 | this.traverseFieldSet = true; | ||
6502 | this.traverseField = value; | ||
6503 | } | ||
6504 | } | ||
6505 | |||
6506 | public YesNoType Append | ||
6507 | { | ||
6508 | get | ||
6509 | { | ||
6510 | return this.appendField; | ||
6511 | } | ||
6512 | set | ||
6513 | { | ||
6514 | this.appendFieldSet = true; | ||
6515 | this.appendField = value; | ||
6516 | } | ||
6517 | } | ||
6518 | |||
6519 | public YesNoType Execute | ||
6520 | { | ||
6521 | get | ||
6522 | { | ||
6523 | return this.executeField; | ||
6524 | } | ||
6525 | set | ||
6526 | { | ||
6527 | this.executeFieldSet = true; | ||
6528 | this.executeField = value; | ||
6529 | } | ||
6530 | } | ||
6531 | |||
6532 | public YesNoType Write | ||
6533 | { | ||
6534 | get | ||
6535 | { | ||
6536 | return this.writeField; | ||
6537 | } | ||
6538 | set | ||
6539 | { | ||
6540 | this.writeFieldSet = true; | ||
6541 | this.writeField = value; | ||
6542 | } | ||
6543 | } | ||
6544 | |||
6545 | public YesNoType CreateSubkeys | ||
6546 | { | ||
6547 | get | ||
6548 | { | ||
6549 | return this.createSubkeysField; | ||
6550 | } | ||
6551 | set | ||
6552 | { | ||
6553 | this.createSubkeysFieldSet = true; | ||
6554 | this.createSubkeysField = value; | ||
6555 | } | ||
6556 | } | ||
6557 | |||
6558 | public YesNoType EnumerateSubkeys | ||
6559 | { | ||
6560 | get | ||
6561 | { | ||
6562 | return this.enumerateSubkeysField; | ||
6563 | } | ||
6564 | set | ||
6565 | { | ||
6566 | this.enumerateSubkeysFieldSet = true; | ||
6567 | this.enumerateSubkeysField = value; | ||
6568 | } | ||
6569 | } | ||
6570 | |||
6571 | public YesNoType Notify | ||
6572 | { | ||
6573 | get | ||
6574 | { | ||
6575 | return this.notifyField; | ||
6576 | } | ||
6577 | set | ||
6578 | { | ||
6579 | this.notifyFieldSet = true; | ||
6580 | this.notifyField = value; | ||
6581 | } | ||
6582 | } | ||
6583 | |||
6584 | public YesNoType CreateLink | ||
6585 | { | ||
6586 | get | ||
6587 | { | ||
6588 | return this.createLinkField; | ||
6589 | } | ||
6590 | set | ||
6591 | { | ||
6592 | this.createLinkFieldSet = true; | ||
6593 | this.createLinkField = value; | ||
6594 | } | ||
6595 | } | ||
6596 | |||
6597 | public YesNoType GenericAll | ||
6598 | { | ||
6599 | get | ||
6600 | { | ||
6601 | return this.genericAllField; | ||
6602 | } | ||
6603 | set | ||
6604 | { | ||
6605 | this.genericAllFieldSet = true; | ||
6606 | this.genericAllField = value; | ||
6607 | } | ||
6608 | } | ||
6609 | |||
6610 | public YesNoType GenericExecute | ||
6611 | { | ||
6612 | get | ||
6613 | { | ||
6614 | return this.genericExecuteField; | ||
6615 | } | ||
6616 | set | ||
6617 | { | ||
6618 | this.genericExecuteFieldSet = true; | ||
6619 | this.genericExecuteField = value; | ||
6620 | } | ||
6621 | } | ||
6622 | |||
6623 | public YesNoType GenericWrite | ||
6624 | { | ||
6625 | get | ||
6626 | { | ||
6627 | return this.genericWriteField; | ||
6628 | } | ||
6629 | set | ||
6630 | { | ||
6631 | this.genericWriteFieldSet = true; | ||
6632 | this.genericWriteField = value; | ||
6633 | } | ||
6634 | } | ||
6635 | |||
6636 | /// <summary> | ||
6637 | /// specifying this will fail to grant read access | ||
6638 | /// </summary> | ||
6639 | public YesNoType GenericRead | ||
6640 | { | ||
6641 | get | ||
6642 | { | ||
6643 | return this.genericReadField; | ||
6644 | } | ||
6645 | set | ||
6646 | { | ||
6647 | this.genericReadFieldSet = true; | ||
6648 | this.genericReadField = value; | ||
6649 | } | ||
6650 | } | ||
6651 | |||
6652 | /// <summary> | ||
6653 | /// Required to call the QueryServiceConfig and QueryServiceConfig2 functions to query the service configuration. Only valid under a 'ServiceInstall' parent. | ||
6654 | /// </summary> | ||
6655 | public YesNoType ServiceQueryConfig | ||
6656 | { | ||
6657 | get | ||
6658 | { | ||
6659 | return this.serviceQueryConfigField; | ||
6660 | } | ||
6661 | set | ||
6662 | { | ||
6663 | this.serviceQueryConfigFieldSet = true; | ||
6664 | this.serviceQueryConfigField = value; | ||
6665 | } | ||
6666 | } | ||
6667 | |||
6668 | /// <summary> | ||
6669 | /// Required to call the ChangeServiceConfig or ChangeServiceConfig2 function to change the service configuration. Only valid under a 'ServiceInstall' parent. | ||
6670 | /// </summary> | ||
6671 | public YesNoType ServiceChangeConfig | ||
6672 | { | ||
6673 | get | ||
6674 | { | ||
6675 | return this.serviceChangeConfigField; | ||
6676 | } | ||
6677 | set | ||
6678 | { | ||
6679 | this.serviceChangeConfigFieldSet = true; | ||
6680 | this.serviceChangeConfigField = value; | ||
6681 | } | ||
6682 | } | ||
6683 | |||
6684 | /// <summary> | ||
6685 | /// Required to call the QueryServiceStatus function to ask the service control manager about the status of the service. Only valid under a 'ServiceInstall' parent. | ||
6686 | /// </summary> | ||
6687 | public YesNoType ServiceQueryStatus | ||
6688 | { | ||
6689 | get | ||
6690 | { | ||
6691 | return this.serviceQueryStatusField; | ||
6692 | } | ||
6693 | set | ||
6694 | { | ||
6695 | this.serviceQueryStatusFieldSet = true; | ||
6696 | this.serviceQueryStatusField = value; | ||
6697 | } | ||
6698 | } | ||
6699 | |||
6700 | /// <summary> | ||
6701 | /// Required to call the EnumDependentServices function to enumerate all the services dependent on the service. Only valid under a 'ServiceInstall' parent. | ||
6702 | /// </summary> | ||
6703 | public YesNoType ServiceEnumerateDependents | ||
6704 | { | ||
6705 | get | ||
6706 | { | ||
6707 | return this.serviceEnumerateDependentsField; | ||
6708 | } | ||
6709 | set | ||
6710 | { | ||
6711 | this.serviceEnumerateDependentsFieldSet = true; | ||
6712 | this.serviceEnumerateDependentsField = value; | ||
6713 | } | ||
6714 | } | ||
6715 | |||
6716 | /// <summary> | ||
6717 | /// Required to call the StartService function to start the service. Only valid under a 'ServiceInstall' parent. | ||
6718 | /// </summary> | ||
6719 | public YesNoType ServiceStart | ||
6720 | { | ||
6721 | get | ||
6722 | { | ||
6723 | return this.serviceStartField; | ||
6724 | } | ||
6725 | set | ||
6726 | { | ||
6727 | this.serviceStartFieldSet = true; | ||
6728 | this.serviceStartField = value; | ||
6729 | } | ||
6730 | } | ||
6731 | |||
6732 | /// <summary> | ||
6733 | /// Required to call the ControlService function to stop the service. Only valid under a 'ServiceInstall' parent. | ||
6734 | /// </summary> | ||
6735 | public YesNoType ServiceStop | ||
6736 | { | ||
6737 | get | ||
6738 | { | ||
6739 | return this.serviceStopField; | ||
6740 | } | ||
6741 | set | ||
6742 | { | ||
6743 | this.serviceStopFieldSet = true; | ||
6744 | this.serviceStopField = value; | ||
6745 | } | ||
6746 | } | ||
6747 | |||
6748 | /// <summary> | ||
6749 | /// Required to call the ControlService function to pause or continue the service. Only valid under a 'ServiceInstall' parent. | ||
6750 | /// </summary> | ||
6751 | public YesNoType ServicePauseContinue | ||
6752 | { | ||
6753 | get | ||
6754 | { | ||
6755 | return this.servicePauseContinueField; | ||
6756 | } | ||
6757 | set | ||
6758 | { | ||
6759 | this.servicePauseContinueFieldSet = true; | ||
6760 | this.servicePauseContinueField = value; | ||
6761 | } | ||
6762 | } | ||
6763 | |||
6764 | /// <summary> | ||
6765 | /// Required to call the ControlService function to ask the service to report its status immediately. Only valid under a 'ServiceInstall' parent. | ||
6766 | /// </summary> | ||
6767 | public YesNoType ServiceInterrogate | ||
6768 | { | ||
6769 | get | ||
6770 | { | ||
6771 | return this.serviceInterrogateField; | ||
6772 | } | ||
6773 | set | ||
6774 | { | ||
6775 | this.serviceInterrogateFieldSet = true; | ||
6776 | this.serviceInterrogateField = value; | ||
6777 | } | ||
6778 | } | ||
6779 | |||
6780 | /// <summary> | ||
6781 | /// Required to call the ControlService function to specify a user-defined control code. Only valid under a 'ServiceInstall' parent. | ||
6782 | /// </summary> | ||
6783 | public YesNoType ServiceUserDefinedControl | ||
6784 | { | ||
6785 | get | ||
6786 | { | ||
6787 | return this.serviceUserDefinedControlField; | ||
6788 | } | ||
6789 | set | ||
6790 | { | ||
6791 | this.serviceUserDefinedControlFieldSet = true; | ||
6792 | this.serviceUserDefinedControlField = value; | ||
6793 | } | ||
6794 | } | ||
6795 | |||
6796 | public virtual ISchemaElement ParentElement | ||
6797 | { | ||
6798 | get | ||
6799 | { | ||
6800 | return this.parentElement; | ||
6801 | } | ||
6802 | set | ||
6803 | { | ||
6804 | this.parentElement = value; | ||
6805 | } | ||
6806 | } | ||
6807 | |||
6808 | /// <summary> | ||
6809 | /// Processes this element and all child elements into an XmlWriter. | ||
6810 | /// </summary> | ||
6811 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
6812 | public virtual void OutputXml(XmlWriter writer) | ||
6813 | { | ||
6814 | if ((null == writer)) | ||
6815 | { | ||
6816 | throw new ArgumentNullException("writer"); | ||
6817 | } | ||
6818 | writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
6819 | if (this.domainFieldSet) | ||
6820 | { | ||
6821 | writer.WriteAttributeString("Domain", this.domainField); | ||
6822 | } | ||
6823 | if (this.userFieldSet) | ||
6824 | { | ||
6825 | writer.WriteAttributeString("User", this.userField); | ||
6826 | } | ||
6827 | if (this.readFieldSet) | ||
6828 | { | ||
6829 | if ((this.readField == YesNoType.no)) | ||
6830 | { | ||
6831 | writer.WriteAttributeString("Read", "no"); | ||
6832 | } | ||
6833 | if ((this.readField == YesNoType.yes)) | ||
6834 | { | ||
6835 | writer.WriteAttributeString("Read", "yes"); | ||
6836 | } | ||
6837 | } | ||
6838 | if (this.deleteFieldSet) | ||
6839 | { | ||
6840 | if ((this.deleteField == YesNoType.no)) | ||
6841 | { | ||
6842 | writer.WriteAttributeString("Delete", "no"); | ||
6843 | } | ||
6844 | if ((this.deleteField == YesNoType.yes)) | ||
6845 | { | ||
6846 | writer.WriteAttributeString("Delete", "yes"); | ||
6847 | } | ||
6848 | } | ||
6849 | if (this.readPermissionFieldSet) | ||
6850 | { | ||
6851 | if ((this.readPermissionField == YesNoType.no)) | ||
6852 | { | ||
6853 | writer.WriteAttributeString("ReadPermission", "no"); | ||
6854 | } | ||
6855 | if ((this.readPermissionField == YesNoType.yes)) | ||
6856 | { | ||
6857 | writer.WriteAttributeString("ReadPermission", "yes"); | ||
6858 | } | ||
6859 | } | ||
6860 | if (this.changePermissionFieldSet) | ||
6861 | { | ||
6862 | if ((this.changePermissionField == YesNoType.no)) | ||
6863 | { | ||
6864 | writer.WriteAttributeString("ChangePermission", "no"); | ||
6865 | } | ||
6866 | if ((this.changePermissionField == YesNoType.yes)) | ||
6867 | { | ||
6868 | writer.WriteAttributeString("ChangePermission", "yes"); | ||
6869 | } | ||
6870 | } | ||
6871 | if (this.takeOwnershipFieldSet) | ||
6872 | { | ||
6873 | if ((this.takeOwnershipField == YesNoType.no)) | ||
6874 | { | ||
6875 | writer.WriteAttributeString("TakeOwnership", "no"); | ||
6876 | } | ||
6877 | if ((this.takeOwnershipField == YesNoType.yes)) | ||
6878 | { | ||
6879 | writer.WriteAttributeString("TakeOwnership", "yes"); | ||
6880 | } | ||
6881 | } | ||
6882 | if (this.readAttributesFieldSet) | ||
6883 | { | ||
6884 | if ((this.readAttributesField == YesNoType.no)) | ||
6885 | { | ||
6886 | writer.WriteAttributeString("ReadAttributes", "no"); | ||
6887 | } | ||
6888 | if ((this.readAttributesField == YesNoType.yes)) | ||
6889 | { | ||
6890 | writer.WriteAttributeString("ReadAttributes", "yes"); | ||
6891 | } | ||
6892 | } | ||
6893 | if (this.writeAttributesFieldSet) | ||
6894 | { | ||
6895 | if ((this.writeAttributesField == YesNoType.no)) | ||
6896 | { | ||
6897 | writer.WriteAttributeString("WriteAttributes", "no"); | ||
6898 | } | ||
6899 | if ((this.writeAttributesField == YesNoType.yes)) | ||
6900 | { | ||
6901 | writer.WriteAttributeString("WriteAttributes", "yes"); | ||
6902 | } | ||
6903 | } | ||
6904 | if (this.readExtendedAttributesFieldSet) | ||
6905 | { | ||
6906 | if ((this.readExtendedAttributesField == YesNoType.no)) | ||
6907 | { | ||
6908 | writer.WriteAttributeString("ReadExtendedAttributes", "no"); | ||
6909 | } | ||
6910 | if ((this.readExtendedAttributesField == YesNoType.yes)) | ||
6911 | { | ||
6912 | writer.WriteAttributeString("ReadExtendedAttributes", "yes"); | ||
6913 | } | ||
6914 | } | ||
6915 | if (this.writeExtendedAttributesFieldSet) | ||
6916 | { | ||
6917 | if ((this.writeExtendedAttributesField == YesNoType.no)) | ||
6918 | { | ||
6919 | writer.WriteAttributeString("WriteExtendedAttributes", "no"); | ||
6920 | } | ||
6921 | if ((this.writeExtendedAttributesField == YesNoType.yes)) | ||
6922 | { | ||
6923 | writer.WriteAttributeString("WriteExtendedAttributes", "yes"); | ||
6924 | } | ||
6925 | } | ||
6926 | if (this.synchronizeFieldSet) | ||
6927 | { | ||
6928 | if ((this.synchronizeField == YesNoType.no)) | ||
6929 | { | ||
6930 | writer.WriteAttributeString("Synchronize", "no"); | ||
6931 | } | ||
6932 | if ((this.synchronizeField == YesNoType.yes)) | ||
6933 | { | ||
6934 | writer.WriteAttributeString("Synchronize", "yes"); | ||
6935 | } | ||
6936 | } | ||
6937 | if (this.createFileFieldSet) | ||
6938 | { | ||
6939 | if ((this.createFileField == YesNoType.no)) | ||
6940 | { | ||
6941 | writer.WriteAttributeString("CreateFile", "no"); | ||
6942 | } | ||
6943 | if ((this.createFileField == YesNoType.yes)) | ||
6944 | { | ||
6945 | writer.WriteAttributeString("CreateFile", "yes"); | ||
6946 | } | ||
6947 | } | ||
6948 | if (this.createChildFieldSet) | ||
6949 | { | ||
6950 | if ((this.createChildField == YesNoType.no)) | ||
6951 | { | ||
6952 | writer.WriteAttributeString("CreateChild", "no"); | ||
6953 | } | ||
6954 | if ((this.createChildField == YesNoType.yes)) | ||
6955 | { | ||
6956 | writer.WriteAttributeString("CreateChild", "yes"); | ||
6957 | } | ||
6958 | } | ||
6959 | if (this.deleteChildFieldSet) | ||
6960 | { | ||
6961 | if ((this.deleteChildField == YesNoType.no)) | ||
6962 | { | ||
6963 | writer.WriteAttributeString("DeleteChild", "no"); | ||
6964 | } | ||
6965 | if ((this.deleteChildField == YesNoType.yes)) | ||
6966 | { | ||
6967 | writer.WriteAttributeString("DeleteChild", "yes"); | ||
6968 | } | ||
6969 | } | ||
6970 | if (this.traverseFieldSet) | ||
6971 | { | ||
6972 | if ((this.traverseField == YesNoType.no)) | ||
6973 | { | ||
6974 | writer.WriteAttributeString("Traverse", "no"); | ||
6975 | } | ||
6976 | if ((this.traverseField == YesNoType.yes)) | ||
6977 | { | ||
6978 | writer.WriteAttributeString("Traverse", "yes"); | ||
6979 | } | ||
6980 | } | ||
6981 | if (this.appendFieldSet) | ||
6982 | { | ||
6983 | if ((this.appendField == YesNoType.no)) | ||
6984 | { | ||
6985 | writer.WriteAttributeString("Append", "no"); | ||
6986 | } | ||
6987 | if ((this.appendField == YesNoType.yes)) | ||
6988 | { | ||
6989 | writer.WriteAttributeString("Append", "yes"); | ||
6990 | } | ||
6991 | } | ||
6992 | if (this.executeFieldSet) | ||
6993 | { | ||
6994 | if ((this.executeField == YesNoType.no)) | ||
6995 | { | ||
6996 | writer.WriteAttributeString("Execute", "no"); | ||
6997 | } | ||
6998 | if ((this.executeField == YesNoType.yes)) | ||
6999 | { | ||
7000 | writer.WriteAttributeString("Execute", "yes"); | ||
7001 | } | ||
7002 | } | ||
7003 | if (this.writeFieldSet) | ||
7004 | { | ||
7005 | if ((this.writeField == YesNoType.no)) | ||
7006 | { | ||
7007 | writer.WriteAttributeString("Write", "no"); | ||
7008 | } | ||
7009 | if ((this.writeField == YesNoType.yes)) | ||
7010 | { | ||
7011 | writer.WriteAttributeString("Write", "yes"); | ||
7012 | } | ||
7013 | } | ||
7014 | if (this.createSubkeysFieldSet) | ||
7015 | { | ||
7016 | if ((this.createSubkeysField == YesNoType.no)) | ||
7017 | { | ||
7018 | writer.WriteAttributeString("CreateSubkeys", "no"); | ||
7019 | } | ||
7020 | if ((this.createSubkeysField == YesNoType.yes)) | ||
7021 | { | ||
7022 | writer.WriteAttributeString("CreateSubkeys", "yes"); | ||
7023 | } | ||
7024 | } | ||
7025 | if (this.enumerateSubkeysFieldSet) | ||
7026 | { | ||
7027 | if ((this.enumerateSubkeysField == YesNoType.no)) | ||
7028 | { | ||
7029 | writer.WriteAttributeString("EnumerateSubkeys", "no"); | ||
7030 | } | ||
7031 | if ((this.enumerateSubkeysField == YesNoType.yes)) | ||
7032 | { | ||
7033 | writer.WriteAttributeString("EnumerateSubkeys", "yes"); | ||
7034 | } | ||
7035 | } | ||
7036 | if (this.notifyFieldSet) | ||
7037 | { | ||
7038 | if ((this.notifyField == YesNoType.no)) | ||
7039 | { | ||
7040 | writer.WriteAttributeString("Notify", "no"); | ||
7041 | } | ||
7042 | if ((this.notifyField == YesNoType.yes)) | ||
7043 | { | ||
7044 | writer.WriteAttributeString("Notify", "yes"); | ||
7045 | } | ||
7046 | } | ||
7047 | if (this.createLinkFieldSet) | ||
7048 | { | ||
7049 | if ((this.createLinkField == YesNoType.no)) | ||
7050 | { | ||
7051 | writer.WriteAttributeString("CreateLink", "no"); | ||
7052 | } | ||
7053 | if ((this.createLinkField == YesNoType.yes)) | ||
7054 | { | ||
7055 | writer.WriteAttributeString("CreateLink", "yes"); | ||
7056 | } | ||
7057 | } | ||
7058 | if (this.genericAllFieldSet) | ||
7059 | { | ||
7060 | if ((this.genericAllField == YesNoType.no)) | ||
7061 | { | ||
7062 | writer.WriteAttributeString("GenericAll", "no"); | ||
7063 | } | ||
7064 | if ((this.genericAllField == YesNoType.yes)) | ||
7065 | { | ||
7066 | writer.WriteAttributeString("GenericAll", "yes"); | ||
7067 | } | ||
7068 | } | ||
7069 | if (this.genericExecuteFieldSet) | ||
7070 | { | ||
7071 | if ((this.genericExecuteField == YesNoType.no)) | ||
7072 | { | ||
7073 | writer.WriteAttributeString("GenericExecute", "no"); | ||
7074 | } | ||
7075 | if ((this.genericExecuteField == YesNoType.yes)) | ||
7076 | { | ||
7077 | writer.WriteAttributeString("GenericExecute", "yes"); | ||
7078 | } | ||
7079 | } | ||
7080 | if (this.genericWriteFieldSet) | ||
7081 | { | ||
7082 | if ((this.genericWriteField == YesNoType.no)) | ||
7083 | { | ||
7084 | writer.WriteAttributeString("GenericWrite", "no"); | ||
7085 | } | ||
7086 | if ((this.genericWriteField == YesNoType.yes)) | ||
7087 | { | ||
7088 | writer.WriteAttributeString("GenericWrite", "yes"); | ||
7089 | } | ||
7090 | } | ||
7091 | if (this.genericReadFieldSet) | ||
7092 | { | ||
7093 | if ((this.genericReadField == YesNoType.no)) | ||
7094 | { | ||
7095 | writer.WriteAttributeString("GenericRead", "no"); | ||
7096 | } | ||
7097 | if ((this.genericReadField == YesNoType.yes)) | ||
7098 | { | ||
7099 | writer.WriteAttributeString("GenericRead", "yes"); | ||
7100 | } | ||
7101 | } | ||
7102 | if (this.serviceQueryConfigFieldSet) | ||
7103 | { | ||
7104 | if ((this.serviceQueryConfigField == YesNoType.no)) | ||
7105 | { | ||
7106 | writer.WriteAttributeString("ServiceQueryConfig", "no"); | ||
7107 | } | ||
7108 | if ((this.serviceQueryConfigField == YesNoType.yes)) | ||
7109 | { | ||
7110 | writer.WriteAttributeString("ServiceQueryConfig", "yes"); | ||
7111 | } | ||
7112 | } | ||
7113 | if (this.serviceChangeConfigFieldSet) | ||
7114 | { | ||
7115 | if ((this.serviceChangeConfigField == YesNoType.no)) | ||
7116 | { | ||
7117 | writer.WriteAttributeString("ServiceChangeConfig", "no"); | ||
7118 | } | ||
7119 | if ((this.serviceChangeConfigField == YesNoType.yes)) | ||
7120 | { | ||
7121 | writer.WriteAttributeString("ServiceChangeConfig", "yes"); | ||
7122 | } | ||
7123 | } | ||
7124 | if (this.serviceQueryStatusFieldSet) | ||
7125 | { | ||
7126 | if ((this.serviceQueryStatusField == YesNoType.no)) | ||
7127 | { | ||
7128 | writer.WriteAttributeString("ServiceQueryStatus", "no"); | ||
7129 | } | ||
7130 | if ((this.serviceQueryStatusField == YesNoType.yes)) | ||
7131 | { | ||
7132 | writer.WriteAttributeString("ServiceQueryStatus", "yes"); | ||
7133 | } | ||
7134 | } | ||
7135 | if (this.serviceEnumerateDependentsFieldSet) | ||
7136 | { | ||
7137 | if ((this.serviceEnumerateDependentsField == YesNoType.no)) | ||
7138 | { | ||
7139 | writer.WriteAttributeString("ServiceEnumerateDependents", "no"); | ||
7140 | } | ||
7141 | if ((this.serviceEnumerateDependentsField == YesNoType.yes)) | ||
7142 | { | ||
7143 | writer.WriteAttributeString("ServiceEnumerateDependents", "yes"); | ||
7144 | } | ||
7145 | } | ||
7146 | if (this.serviceStartFieldSet) | ||
7147 | { | ||
7148 | if ((this.serviceStartField == YesNoType.no)) | ||
7149 | { | ||
7150 | writer.WriteAttributeString("ServiceStart", "no"); | ||
7151 | } | ||
7152 | if ((this.serviceStartField == YesNoType.yes)) | ||
7153 | { | ||
7154 | writer.WriteAttributeString("ServiceStart", "yes"); | ||
7155 | } | ||
7156 | } | ||
7157 | if (this.serviceStopFieldSet) | ||
7158 | { | ||
7159 | if ((this.serviceStopField == YesNoType.no)) | ||
7160 | { | ||
7161 | writer.WriteAttributeString("ServiceStop", "no"); | ||
7162 | } | ||
7163 | if ((this.serviceStopField == YesNoType.yes)) | ||
7164 | { | ||
7165 | writer.WriteAttributeString("ServiceStop", "yes"); | ||
7166 | } | ||
7167 | } | ||
7168 | if (this.servicePauseContinueFieldSet) | ||
7169 | { | ||
7170 | if ((this.servicePauseContinueField == YesNoType.no)) | ||
7171 | { | ||
7172 | writer.WriteAttributeString("ServicePauseContinue", "no"); | ||
7173 | } | ||
7174 | if ((this.servicePauseContinueField == YesNoType.yes)) | ||
7175 | { | ||
7176 | writer.WriteAttributeString("ServicePauseContinue", "yes"); | ||
7177 | } | ||
7178 | } | ||
7179 | if (this.serviceInterrogateFieldSet) | ||
7180 | { | ||
7181 | if ((this.serviceInterrogateField == YesNoType.no)) | ||
7182 | { | ||
7183 | writer.WriteAttributeString("ServiceInterrogate", "no"); | ||
7184 | } | ||
7185 | if ((this.serviceInterrogateField == YesNoType.yes)) | ||
7186 | { | ||
7187 | writer.WriteAttributeString("ServiceInterrogate", "yes"); | ||
7188 | } | ||
7189 | } | ||
7190 | if (this.serviceUserDefinedControlFieldSet) | ||
7191 | { | ||
7192 | if ((this.serviceUserDefinedControlField == YesNoType.no)) | ||
7193 | { | ||
7194 | writer.WriteAttributeString("ServiceUserDefinedControl", "no"); | ||
7195 | } | ||
7196 | if ((this.serviceUserDefinedControlField == YesNoType.yes)) | ||
7197 | { | ||
7198 | writer.WriteAttributeString("ServiceUserDefinedControl", "yes"); | ||
7199 | } | ||
7200 | } | ||
7201 | writer.WriteEndElement(); | ||
7202 | } | ||
7203 | |||
7204 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
7205 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
7206 | void ISetAttributes.SetAttribute(string name, string value) | ||
7207 | { | ||
7208 | if (String.IsNullOrEmpty(name)) | ||
7209 | { | ||
7210 | throw new ArgumentNullException("name"); | ||
7211 | } | ||
7212 | if (("Domain" == name)) | ||
7213 | { | ||
7214 | this.domainField = value; | ||
7215 | this.domainFieldSet = true; | ||
7216 | } | ||
7217 | if (("User" == name)) | ||
7218 | { | ||
7219 | this.userField = value; | ||
7220 | this.userFieldSet = true; | ||
7221 | } | ||
7222 | if (("Read" == name)) | ||
7223 | { | ||
7224 | this.readField = Enums.ParseYesNoType(value); | ||
7225 | this.readFieldSet = true; | ||
7226 | } | ||
7227 | if (("Delete" == name)) | ||
7228 | { | ||
7229 | this.deleteField = Enums.ParseYesNoType(value); | ||
7230 | this.deleteFieldSet = true; | ||
7231 | } | ||
7232 | if (("ReadPermission" == name)) | ||
7233 | { | ||
7234 | this.readPermissionField = Enums.ParseYesNoType(value); | ||
7235 | this.readPermissionFieldSet = true; | ||
7236 | } | ||
7237 | if (("ChangePermission" == name)) | ||
7238 | { | ||
7239 | this.changePermissionField = Enums.ParseYesNoType(value); | ||
7240 | this.changePermissionFieldSet = true; | ||
7241 | } | ||
7242 | if (("TakeOwnership" == name)) | ||
7243 | { | ||
7244 | this.takeOwnershipField = Enums.ParseYesNoType(value); | ||
7245 | this.takeOwnershipFieldSet = true; | ||
7246 | } | ||
7247 | if (("ReadAttributes" == name)) | ||
7248 | { | ||
7249 | this.readAttributesField = Enums.ParseYesNoType(value); | ||
7250 | this.readAttributesFieldSet = true; | ||
7251 | } | ||
7252 | if (("WriteAttributes" == name)) | ||
7253 | { | ||
7254 | this.writeAttributesField = Enums.ParseYesNoType(value); | ||
7255 | this.writeAttributesFieldSet = true; | ||
7256 | } | ||
7257 | if (("ReadExtendedAttributes" == name)) | ||
7258 | { | ||
7259 | this.readExtendedAttributesField = Enums.ParseYesNoType(value); | ||
7260 | this.readExtendedAttributesFieldSet = true; | ||
7261 | } | ||
7262 | if (("WriteExtendedAttributes" == name)) | ||
7263 | { | ||
7264 | this.writeExtendedAttributesField = Enums.ParseYesNoType(value); | ||
7265 | this.writeExtendedAttributesFieldSet = true; | ||
7266 | } | ||
7267 | if (("Synchronize" == name)) | ||
7268 | { | ||
7269 | this.synchronizeField = Enums.ParseYesNoType(value); | ||
7270 | this.synchronizeFieldSet = true; | ||
7271 | } | ||
7272 | if (("CreateFile" == name)) | ||
7273 | { | ||
7274 | this.createFileField = Enums.ParseYesNoType(value); | ||
7275 | this.createFileFieldSet = true; | ||
7276 | } | ||
7277 | if (("CreateChild" == name)) | ||
7278 | { | ||
7279 | this.createChildField = Enums.ParseYesNoType(value); | ||
7280 | this.createChildFieldSet = true; | ||
7281 | } | ||
7282 | if (("DeleteChild" == name)) | ||
7283 | { | ||
7284 | this.deleteChildField = Enums.ParseYesNoType(value); | ||
7285 | this.deleteChildFieldSet = true; | ||
7286 | } | ||
7287 | if (("Traverse" == name)) | ||
7288 | { | ||
7289 | this.traverseField = Enums.ParseYesNoType(value); | ||
7290 | this.traverseFieldSet = true; | ||
7291 | } | ||
7292 | if (("Append" == name)) | ||
7293 | { | ||
7294 | this.appendField = Enums.ParseYesNoType(value); | ||
7295 | this.appendFieldSet = true; | ||
7296 | } | ||
7297 | if (("Execute" == name)) | ||
7298 | { | ||
7299 | this.executeField = Enums.ParseYesNoType(value); | ||
7300 | this.executeFieldSet = true; | ||
7301 | } | ||
7302 | if (("Write" == name)) | ||
7303 | { | ||
7304 | this.writeField = Enums.ParseYesNoType(value); | ||
7305 | this.writeFieldSet = true; | ||
7306 | } | ||
7307 | if (("CreateSubkeys" == name)) | ||
7308 | { | ||
7309 | this.createSubkeysField = Enums.ParseYesNoType(value); | ||
7310 | this.createSubkeysFieldSet = true; | ||
7311 | } | ||
7312 | if (("EnumerateSubkeys" == name)) | ||
7313 | { | ||
7314 | this.enumerateSubkeysField = Enums.ParseYesNoType(value); | ||
7315 | this.enumerateSubkeysFieldSet = true; | ||
7316 | } | ||
7317 | if (("Notify" == name)) | ||
7318 | { | ||
7319 | this.notifyField = Enums.ParseYesNoType(value); | ||
7320 | this.notifyFieldSet = true; | ||
7321 | } | ||
7322 | if (("CreateLink" == name)) | ||
7323 | { | ||
7324 | this.createLinkField = Enums.ParseYesNoType(value); | ||
7325 | this.createLinkFieldSet = true; | ||
7326 | } | ||
7327 | if (("GenericAll" == name)) | ||
7328 | { | ||
7329 | this.genericAllField = Enums.ParseYesNoType(value); | ||
7330 | this.genericAllFieldSet = true; | ||
7331 | } | ||
7332 | if (("GenericExecute" == name)) | ||
7333 | { | ||
7334 | this.genericExecuteField = Enums.ParseYesNoType(value); | ||
7335 | this.genericExecuteFieldSet = true; | ||
7336 | } | ||
7337 | if (("GenericWrite" == name)) | ||
7338 | { | ||
7339 | this.genericWriteField = Enums.ParseYesNoType(value); | ||
7340 | this.genericWriteFieldSet = true; | ||
7341 | } | ||
7342 | if (("GenericRead" == name)) | ||
7343 | { | ||
7344 | this.genericReadField = Enums.ParseYesNoType(value); | ||
7345 | this.genericReadFieldSet = true; | ||
7346 | } | ||
7347 | if (("ServiceQueryConfig" == name)) | ||
7348 | { | ||
7349 | this.serviceQueryConfigField = Enums.ParseYesNoType(value); | ||
7350 | this.serviceQueryConfigFieldSet = true; | ||
7351 | } | ||
7352 | if (("ServiceChangeConfig" == name)) | ||
7353 | { | ||
7354 | this.serviceChangeConfigField = Enums.ParseYesNoType(value); | ||
7355 | this.serviceChangeConfigFieldSet = true; | ||
7356 | } | ||
7357 | if (("ServiceQueryStatus" == name)) | ||
7358 | { | ||
7359 | this.serviceQueryStatusField = Enums.ParseYesNoType(value); | ||
7360 | this.serviceQueryStatusFieldSet = true; | ||
7361 | } | ||
7362 | if (("ServiceEnumerateDependents" == name)) | ||
7363 | { | ||
7364 | this.serviceEnumerateDependentsField = Enums.ParseYesNoType(value); | ||
7365 | this.serviceEnumerateDependentsFieldSet = true; | ||
7366 | } | ||
7367 | if (("ServiceStart" == name)) | ||
7368 | { | ||
7369 | this.serviceStartField = Enums.ParseYesNoType(value); | ||
7370 | this.serviceStartFieldSet = true; | ||
7371 | } | ||
7372 | if (("ServiceStop" == name)) | ||
7373 | { | ||
7374 | this.serviceStopField = Enums.ParseYesNoType(value); | ||
7375 | this.serviceStopFieldSet = true; | ||
7376 | } | ||
7377 | if (("ServicePauseContinue" == name)) | ||
7378 | { | ||
7379 | this.servicePauseContinueField = Enums.ParseYesNoType(value); | ||
7380 | this.servicePauseContinueFieldSet = true; | ||
7381 | } | ||
7382 | if (("ServiceInterrogate" == name)) | ||
7383 | { | ||
7384 | this.serviceInterrogateField = Enums.ParseYesNoType(value); | ||
7385 | this.serviceInterrogateFieldSet = true; | ||
7386 | } | ||
7387 | if (("ServiceUserDefinedControl" == name)) | ||
7388 | { | ||
7389 | this.serviceUserDefinedControlField = Enums.ParseYesNoType(value); | ||
7390 | this.serviceUserDefinedControlFieldSet = true; | ||
7391 | } | ||
7392 | } | ||
7393 | } | ||
7394 | |||
7395 | /// <summary> | ||
7396 | /// Describes a product search. | ||
7397 | /// </summary> | ||
7398 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
7399 | public class ProductSearch : ISchemaElement, ISetAttributes | ||
7400 | { | ||
7401 | |||
7402 | private string idField; | ||
7403 | |||
7404 | private bool idFieldSet; | ||
7405 | |||
7406 | private string variableField; | ||
7407 | |||
7408 | private bool variableFieldSet; | ||
7409 | |||
7410 | private string conditionField; | ||
7411 | |||
7412 | private bool conditionFieldSet; | ||
7413 | |||
7414 | private string afterField; | ||
7415 | |||
7416 | private bool afterFieldSet; | ||
7417 | |||
7418 | private string guidField; | ||
7419 | |||
7420 | private bool guidFieldSet; | ||
7421 | |||
7422 | private string productCodeField; | ||
7423 | |||
7424 | private bool productCodeFieldSet; | ||
7425 | |||
7426 | private string upgradeCodeField; | ||
7427 | |||
7428 | private bool upgradeCodeFieldSet; | ||
7429 | |||
7430 | private ResultType resultField; | ||
7431 | |||
7432 | private bool resultFieldSet; | ||
7433 | |||
7434 | private ISchemaElement parentElement; | ||
7435 | |||
7436 | /// <summary> | ||
7437 | /// Id of the search for ordering and dependency. | ||
7438 | /// </summary> | ||
7439 | public string Id | ||
7440 | { | ||
7441 | get | ||
7442 | { | ||
7443 | return this.idField; | ||
7444 | } | ||
7445 | set | ||
7446 | { | ||
7447 | this.idFieldSet = true; | ||
7448 | this.idField = value; | ||
7449 | } | ||
7450 | } | ||
7451 | |||
7452 | /// <summary> | ||
7453 | /// Name of the variable in which to place the result of the search. | ||
7454 | /// </summary> | ||
7455 | public string Variable | ||
7456 | { | ||
7457 | get | ||
7458 | { | ||
7459 | return this.variableField; | ||
7460 | } | ||
7461 | set | ||
7462 | { | ||
7463 | this.variableFieldSet = true; | ||
7464 | this.variableField = value; | ||
7465 | } | ||
7466 | } | ||
7467 | |||
7468 | /// <summary> | ||
7469 | /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. | ||
7470 | /// </summary> | ||
7471 | public string Condition | ||
7472 | { | ||
7473 | get | ||
7474 | { | ||
7475 | return this.conditionField; | ||
7476 | } | ||
7477 | set | ||
7478 | { | ||
7479 | this.conditionFieldSet = true; | ||
7480 | this.conditionField = value; | ||
7481 | } | ||
7482 | } | ||
7483 | |||
7484 | /// <summary> | ||
7485 | /// Id of the search that this one should come after. | ||
7486 | /// </summary> | ||
7487 | public string After | ||
7488 | { | ||
7489 | get | ||
7490 | { | ||
7491 | return this.afterField; | ||
7492 | } | ||
7493 | set | ||
7494 | { | ||
7495 | this.afterFieldSet = true; | ||
7496 | this.afterField = value; | ||
7497 | } | ||
7498 | } | ||
7499 | |||
7500 | /// <summary> | ||
7501 | /// The Guid attribute has been deprecated; use the ProductCode or UpgradeCode attribute instead. If this attribute is used, it is assumed to be a ProductCode. | ||
7502 | /// </summary> | ||
7503 | public string Guid | ||
7504 | { | ||
7505 | get | ||
7506 | { | ||
7507 | return this.guidField; | ||
7508 | } | ||
7509 | set | ||
7510 | { | ||
7511 | this.guidFieldSet = true; | ||
7512 | this.guidField = value; | ||
7513 | } | ||
7514 | } | ||
7515 | |||
7516 | /// <summary> | ||
7517 | /// The ProductCode to use for the search. This attribute must be omitted if UpgradeCode is specified. | ||
7518 | /// </summary> | ||
7519 | public string ProductCode | ||
7520 | { | ||
7521 | get | ||
7522 | { | ||
7523 | return this.productCodeField; | ||
7524 | } | ||
7525 | set | ||
7526 | { | ||
7527 | this.productCodeFieldSet = true; | ||
7528 | this.productCodeField = value; | ||
7529 | } | ||
7530 | } | ||
7531 | |||
7532 | /// <summary> | ||
7533 | /// The UpgradeCode to use for the search. This attribute must be omitted if ProductCode is specified. Note that if multiple products are found, the highest versioned product will be used for the result. | ||
7534 | /// </summary> | ||
7535 | public string UpgradeCode | ||
7536 | { | ||
7537 | get | ||
7538 | { | ||
7539 | return this.upgradeCodeField; | ||
7540 | } | ||
7541 | set | ||
7542 | { | ||
7543 | this.upgradeCodeFieldSet = true; | ||
7544 | this.upgradeCodeField = value; | ||
7545 | } | ||
7546 | } | ||
7547 | |||
7548 | /// <summary> | ||
7549 | /// Rather than saving the product version into the variable, a ProductSearch can save another attribute of the matching product instead. | ||
7550 | /// </summary> | ||
7551 | public ResultType Result | ||
7552 | { | ||
7553 | get | ||
7554 | { | ||
7555 | return this.resultField; | ||
7556 | } | ||
7557 | set | ||
7558 | { | ||
7559 | this.resultFieldSet = true; | ||
7560 | this.resultField = value; | ||
7561 | } | ||
7562 | } | ||
7563 | |||
7564 | public virtual ISchemaElement ParentElement | ||
7565 | { | ||
7566 | get | ||
7567 | { | ||
7568 | return this.parentElement; | ||
7569 | } | ||
7570 | set | ||
7571 | { | ||
7572 | this.parentElement = value; | ||
7573 | } | ||
7574 | } | ||
7575 | |||
7576 | /// <summary> | ||
7577 | /// Parses a ResultType from a string. | ||
7578 | /// </summary> | ||
7579 | public static ResultType ParseResultType(string value) | ||
7580 | { | ||
7581 | ResultType parsedValue; | ||
7582 | ProductSearch.TryParseResultType(value, out parsedValue); | ||
7583 | return parsedValue; | ||
7584 | } | ||
7585 | |||
7586 | /// <summary> | ||
7587 | /// Tries to parse a ResultType from a string. | ||
7588 | /// </summary> | ||
7589 | public static bool TryParseResultType(string value, out ResultType parsedValue) | ||
7590 | { | ||
7591 | parsedValue = ResultType.NotSet; | ||
7592 | if (string.IsNullOrEmpty(value)) | ||
7593 | { | ||
7594 | return false; | ||
7595 | } | ||
7596 | if (("version" == value)) | ||
7597 | { | ||
7598 | parsedValue = ResultType.version; | ||
7599 | } | ||
7600 | else | ||
7601 | { | ||
7602 | if (("language" == value)) | ||
7603 | { | ||
7604 | parsedValue = ResultType.language; | ||
7605 | } | ||
7606 | else | ||
7607 | { | ||
7608 | if (("state" == value)) | ||
7609 | { | ||
7610 | parsedValue = ResultType.state; | ||
7611 | } | ||
7612 | else | ||
7613 | { | ||
7614 | if (("assignment" == value)) | ||
7615 | { | ||
7616 | parsedValue = ResultType.assignment; | ||
7617 | } | ||
7618 | else | ||
7619 | { | ||
7620 | parsedValue = ResultType.IllegalValue; | ||
7621 | return false; | ||
7622 | } | ||
7623 | } | ||
7624 | } | ||
7625 | } | ||
7626 | return true; | ||
7627 | } | ||
7628 | |||
7629 | /// <summary> | ||
7630 | /// Processes this element and all child elements into an XmlWriter. | ||
7631 | /// </summary> | ||
7632 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
7633 | public virtual void OutputXml(XmlWriter writer) | ||
7634 | { | ||
7635 | if ((null == writer)) | ||
7636 | { | ||
7637 | throw new ArgumentNullException("writer"); | ||
7638 | } | ||
7639 | writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
7640 | if (this.idFieldSet) | ||
7641 | { | ||
7642 | writer.WriteAttributeString("Id", this.idField); | ||
7643 | } | ||
7644 | if (this.variableFieldSet) | ||
7645 | { | ||
7646 | writer.WriteAttributeString("Variable", this.variableField); | ||
7647 | } | ||
7648 | if (this.conditionFieldSet) | ||
7649 | { | ||
7650 | writer.WriteAttributeString("Condition", this.conditionField); | ||
7651 | } | ||
7652 | if (this.afterFieldSet) | ||
7653 | { | ||
7654 | writer.WriteAttributeString("After", this.afterField); | ||
7655 | } | ||
7656 | if (this.guidFieldSet) | ||
7657 | { | ||
7658 | writer.WriteAttributeString("Guid", this.guidField); | ||
7659 | } | ||
7660 | if (this.productCodeFieldSet) | ||
7661 | { | ||
7662 | writer.WriteAttributeString("ProductCode", this.productCodeField); | ||
7663 | } | ||
7664 | if (this.upgradeCodeFieldSet) | ||
7665 | { | ||
7666 | writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); | ||
7667 | } | ||
7668 | if (this.resultFieldSet) | ||
7669 | { | ||
7670 | if ((this.resultField == ResultType.version)) | ||
7671 | { | ||
7672 | writer.WriteAttributeString("Result", "version"); | ||
7673 | } | ||
7674 | if ((this.resultField == ResultType.language)) | ||
7675 | { | ||
7676 | writer.WriteAttributeString("Result", "language"); | ||
7677 | } | ||
7678 | if ((this.resultField == ResultType.state)) | ||
7679 | { | ||
7680 | writer.WriteAttributeString("Result", "state"); | ||
7681 | } | ||
7682 | if ((this.resultField == ResultType.assignment)) | ||
7683 | { | ||
7684 | writer.WriteAttributeString("Result", "assignment"); | ||
7685 | } | ||
7686 | } | ||
7687 | writer.WriteEndElement(); | ||
7688 | } | ||
7689 | |||
7690 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
7691 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
7692 | void ISetAttributes.SetAttribute(string name, string value) | ||
7693 | { | ||
7694 | if (String.IsNullOrEmpty(name)) | ||
7695 | { | ||
7696 | throw new ArgumentNullException("name"); | ||
7697 | } | ||
7698 | if (("Id" == name)) | ||
7699 | { | ||
7700 | this.idField = value; | ||
7701 | this.idFieldSet = true; | ||
7702 | } | ||
7703 | if (("Variable" == name)) | ||
7704 | { | ||
7705 | this.variableField = value; | ||
7706 | this.variableFieldSet = true; | ||
7707 | } | ||
7708 | if (("Condition" == name)) | ||
7709 | { | ||
7710 | this.conditionField = value; | ||
7711 | this.conditionFieldSet = true; | ||
7712 | } | ||
7713 | if (("After" == name)) | ||
7714 | { | ||
7715 | this.afterField = value; | ||
7716 | this.afterFieldSet = true; | ||
7717 | } | ||
7718 | if (("Guid" == name)) | ||
7719 | { | ||
7720 | this.guidField = value; | ||
7721 | this.guidFieldSet = true; | ||
7722 | } | ||
7723 | if (("ProductCode" == name)) | ||
7724 | { | ||
7725 | this.productCodeField = value; | ||
7726 | this.productCodeFieldSet = true; | ||
7727 | } | ||
7728 | if (("UpgradeCode" == name)) | ||
7729 | { | ||
7730 | this.upgradeCodeField = value; | ||
7731 | this.upgradeCodeFieldSet = true; | ||
7732 | } | ||
7733 | if (("Result" == name)) | ||
7734 | { | ||
7735 | this.resultField = ProductSearch.ParseResultType(value); | ||
7736 | this.resultFieldSet = true; | ||
7737 | } | ||
7738 | } | ||
7739 | |||
7740 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
7741 | public enum ResultType | ||
7742 | { | ||
7743 | |||
7744 | IllegalValue = int.MaxValue, | ||
7745 | |||
7746 | NotSet = -1, | ||
7747 | |||
7748 | /// <summary> | ||
7749 | /// Saves the version of a matching product if found; 0.0.0.0 otherwise. This is the default. | ||
7750 | /// </summary> | ||
7751 | version, | ||
7752 | |||
7753 | /// <summary> | ||
7754 | /// Saves the language of a matching product if found; empty otherwise. | ||
7755 | /// </summary> | ||
7756 | language, | ||
7757 | |||
7758 | /// <summary> | ||
7759 | /// Saves the state of the product: advertised (1), absent (2), or locally installed (5). | ||
7760 | /// </summary> | ||
7761 | state, | ||
7762 | |||
7763 | /// <summary> | ||
7764 | /// Saves the assignment type of the product: per-user (0), or per-machine (1). | ||
7765 | /// </summary> | ||
7766 | assignment, | ||
7767 | } | ||
7768 | } | ||
7769 | |||
7770 | /// <summary> | ||
7771 | /// References a ProductSearch. | ||
7772 | /// </summary> | ||
7773 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
7774 | public class ProductSearchRef : ISchemaElement, ISetAttributes | ||
7775 | { | ||
7776 | |||
7777 | private string idField; | ||
7778 | |||
7779 | private bool idFieldSet; | ||
7780 | |||
7781 | private ISchemaElement parentElement; | ||
7782 | |||
7783 | public string Id | ||
7784 | { | ||
7785 | get | ||
7786 | { | ||
7787 | return this.idField; | ||
7788 | } | ||
7789 | set | ||
7790 | { | ||
7791 | this.idFieldSet = true; | ||
7792 | this.idField = value; | ||
7793 | } | ||
7794 | } | ||
7795 | |||
7796 | public virtual ISchemaElement ParentElement | ||
7797 | { | ||
7798 | get | ||
7799 | { | ||
7800 | return this.parentElement; | ||
7801 | } | ||
7802 | set | ||
7803 | { | ||
7804 | this.parentElement = value; | ||
7805 | } | ||
7806 | } | ||
7807 | |||
7808 | /// <summary> | ||
7809 | /// Processes this element and all child elements into an XmlWriter. | ||
7810 | /// </summary> | ||
7811 | public virtual void OutputXml(XmlWriter writer) | ||
7812 | { | ||
7813 | if ((null == writer)) | ||
7814 | { | ||
7815 | throw new ArgumentNullException("writer"); | ||
7816 | } | ||
7817 | writer.WriteStartElement("ProductSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
7818 | if (this.idFieldSet) | ||
7819 | { | ||
7820 | writer.WriteAttributeString("Id", this.idField); | ||
7821 | } | ||
7822 | writer.WriteEndElement(); | ||
7823 | } | ||
7824 | |||
7825 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
7826 | void ISetAttributes.SetAttribute(string name, string value) | ||
7827 | { | ||
7828 | if (String.IsNullOrEmpty(name)) | ||
7829 | { | ||
7830 | throw new ArgumentNullException("name"); | ||
7831 | } | ||
7832 | if (("Id" == name)) | ||
7833 | { | ||
7834 | this.idField = value; | ||
7835 | this.idFieldSet = true; | ||
7836 | } | ||
7837 | } | ||
7838 | } | ||
7839 | |||
7840 | /// <summary> | ||
7841 | /// Remove a folder and all contained files and folders if the parent component is selected for installation or removal. | ||
7842 | /// The folder must be specified in the Property attribute as the name of a property that will have a value that resolves | ||
7843 | /// to the full path of the folder before the CostInitialize action. Note that Directory ids cannot be used. | ||
7844 | /// For more details, see the Remarks. | ||
7845 | /// </summary> | ||
7846 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
7847 | public class RemoveFolderEx : ISchemaElement, ISetAttributes | ||
7848 | { | ||
7849 | |||
7850 | private string idField; | ||
7851 | |||
7852 | private bool idFieldSet; | ||
7853 | |||
7854 | private string propertyField; | ||
7855 | |||
7856 | private bool propertyFieldSet; | ||
7857 | |||
7858 | private OnType onField; | ||
7859 | |||
7860 | private bool onFieldSet; | ||
7861 | |||
7862 | private ISchemaElement parentElement; | ||
7863 | |||
7864 | /// <summary> | ||
7865 | /// Primary key used to identify this particular entry. If this is not specified, a stable identifier | ||
7866 | /// will be generated at compile time based on the other attributes. | ||
7867 | /// </summary> | ||
7868 | public string Id | ||
7869 | { | ||
7870 | get | ||
7871 | { | ||
7872 | return this.idField; | ||
7873 | } | ||
7874 | set | ||
7875 | { | ||
7876 | this.idFieldSet = true; | ||
7877 | this.idField = value; | ||
7878 | } | ||
7879 | } | ||
7880 | |||
7881 | /// <summary> | ||
7882 | /// The id of a property that resolves to the full path of the source directory. The property does not have | ||
7883 | /// to exist in the installer database at creation time; it could be created at installation time by a custom | ||
7884 | /// action, on the command line, etc. The property value can contain environment variables surrounded by | ||
7885 | /// percent signs such as from a REG_EXPAND_SZ registry value; environment variables will be expanded before | ||
7886 | /// being evaluated for a full path. | ||
7887 | /// </summary> | ||
7888 | public string Property | ||
7889 | { | ||
7890 | get | ||
7891 | { | ||
7892 | return this.propertyField; | ||
7893 | } | ||
7894 | set | ||
7895 | { | ||
7896 | this.propertyFieldSet = true; | ||
7897 | this.propertyField = value; | ||
7898 | } | ||
7899 | } | ||
7900 | |||
7901 | /// <summary> | ||
7902 | /// This value determines when the folder may be removed. | ||
7903 | /// </summary> | ||
7904 | public OnType On | ||
7905 | { | ||
7906 | get | ||
7907 | { | ||
7908 | return this.onField; | ||
7909 | } | ||
7910 | set | ||
7911 | { | ||
7912 | this.onFieldSet = true; | ||
7913 | this.onField = value; | ||
7914 | } | ||
7915 | } | ||
7916 | |||
7917 | public virtual ISchemaElement ParentElement | ||
7918 | { | ||
7919 | get | ||
7920 | { | ||
7921 | return this.parentElement; | ||
7922 | } | ||
7923 | set | ||
7924 | { | ||
7925 | this.parentElement = value; | ||
7926 | } | ||
7927 | } | ||
7928 | |||
7929 | /// <summary> | ||
7930 | /// Parses a OnType from a string. | ||
7931 | /// </summary> | ||
7932 | public static OnType ParseOnType(string value) | ||
7933 | { | ||
7934 | OnType parsedValue; | ||
7935 | RemoveFolderEx.TryParseOnType(value, out parsedValue); | ||
7936 | return parsedValue; | ||
7937 | } | ||
7938 | |||
7939 | /// <summary> | ||
7940 | /// Tries to parse a OnType from a string. | ||
7941 | /// </summary> | ||
7942 | public static bool TryParseOnType(string value, out OnType parsedValue) | ||
7943 | { | ||
7944 | parsedValue = OnType.NotSet; | ||
7945 | if (string.IsNullOrEmpty(value)) | ||
7946 | { | ||
7947 | return false; | ||
7948 | } | ||
7949 | if (("install" == value)) | ||
7950 | { | ||
7951 | parsedValue = OnType.install; | ||
7952 | } | ||
7953 | else | ||
7954 | { | ||
7955 | if (("uninstall" == value)) | ||
7956 | { | ||
7957 | parsedValue = OnType.uninstall; | ||
7958 | } | ||
7959 | else | ||
7960 | { | ||
7961 | if (("both" == value)) | ||
7962 | { | ||
7963 | parsedValue = OnType.both; | ||
7964 | } | ||
7965 | else | ||
7966 | { | ||
7967 | parsedValue = OnType.IllegalValue; | ||
7968 | return false; | ||
7969 | } | ||
7970 | } | ||
7971 | } | ||
7972 | return true; | ||
7973 | } | ||
7974 | |||
7975 | /// <summary> | ||
7976 | /// Processes this element and all child elements into an XmlWriter. | ||
7977 | /// </summary> | ||
7978 | public virtual void OutputXml(XmlWriter writer) | ||
7979 | { | ||
7980 | if ((null == writer)) | ||
7981 | { | ||
7982 | throw new ArgumentNullException("writer"); | ||
7983 | } | ||
7984 | writer.WriteStartElement("RemoveFolderEx", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
7985 | if (this.idFieldSet) | ||
7986 | { | ||
7987 | writer.WriteAttributeString("Id", this.idField); | ||
7988 | } | ||
7989 | if (this.propertyFieldSet) | ||
7990 | { | ||
7991 | writer.WriteAttributeString("Property", this.propertyField); | ||
7992 | } | ||
7993 | if (this.onFieldSet) | ||
7994 | { | ||
7995 | if ((this.onField == OnType.install)) | ||
7996 | { | ||
7997 | writer.WriteAttributeString("On", "install"); | ||
7998 | } | ||
7999 | if ((this.onField == OnType.uninstall)) | ||
8000 | { | ||
8001 | writer.WriteAttributeString("On", "uninstall"); | ||
8002 | } | ||
8003 | if ((this.onField == OnType.both)) | ||
8004 | { | ||
8005 | writer.WriteAttributeString("On", "both"); | ||
8006 | } | ||
8007 | } | ||
8008 | writer.WriteEndElement(); | ||
8009 | } | ||
8010 | |||
8011 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
8012 | void ISetAttributes.SetAttribute(string name, string value) | ||
8013 | { | ||
8014 | if (String.IsNullOrEmpty(name)) | ||
8015 | { | ||
8016 | throw new ArgumentNullException("name"); | ||
8017 | } | ||
8018 | if (("Id" == name)) | ||
8019 | { | ||
8020 | this.idField = value; | ||
8021 | this.idFieldSet = true; | ||
8022 | } | ||
8023 | if (("Property" == name)) | ||
8024 | { | ||
8025 | this.propertyField = value; | ||
8026 | this.propertyFieldSet = true; | ||
8027 | } | ||
8028 | if (("On" == name)) | ||
8029 | { | ||
8030 | this.onField = RemoveFolderEx.ParseOnType(value); | ||
8031 | this.onFieldSet = true; | ||
8032 | } | ||
8033 | } | ||
8034 | |||
8035 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8036 | public enum OnType | ||
8037 | { | ||
8038 | |||
8039 | IllegalValue = int.MaxValue, | ||
8040 | |||
8041 | NotSet = -1, | ||
8042 | |||
8043 | /// <summary> | ||
8044 | /// Removes the folder only when the parent component is being installed (msiInstallStateLocal or msiInstallStateSource). | ||
8045 | /// </summary> | ||
8046 | install, | ||
8047 | |||
8048 | /// <summary> | ||
8049 | /// Default: Removes the folder only when the parent component is being removed (msiInstallStateAbsent). | ||
8050 | /// </summary> | ||
8051 | uninstall, | ||
8052 | |||
8053 | /// <summary> | ||
8054 | /// Removes the folder when the parent component is being installed or removed. | ||
8055 | /// </summary> | ||
8056 | both, | ||
8057 | } | ||
8058 | } | ||
8059 | |||
8060 | /// <summary> | ||
8061 | /// Registers a resource with the Restart Manager. | ||
8062 | /// </summary> | ||
8063 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8064 | public class RestartResource : ISchemaElement, ISetAttributes | ||
8065 | { | ||
8066 | |||
8067 | private string idField; | ||
8068 | |||
8069 | private bool idFieldSet; | ||
8070 | |||
8071 | private string pathField; | ||
8072 | |||
8073 | private bool pathFieldSet; | ||
8074 | |||
8075 | private string processNameField; | ||
8076 | |||
8077 | private bool processNameFieldSet; | ||
8078 | |||
8079 | private string serviceNameField; | ||
8080 | |||
8081 | private bool serviceNameFieldSet; | ||
8082 | |||
8083 | private ISchemaElement parentElement; | ||
8084 | |||
8085 | /// <summary> | ||
8086 | /// The unique identifier for this resource. A unique identifier will | ||
8087 | /// be generated automatically if not specified. | ||
8088 | /// </summary> | ||
8089 | public string Id | ||
8090 | { | ||
8091 | get | ||
8092 | { | ||
8093 | return this.idField; | ||
8094 | } | ||
8095 | set | ||
8096 | { | ||
8097 | this.idFieldSet = true; | ||
8098 | this.idField = value; | ||
8099 | } | ||
8100 | } | ||
8101 | |||
8102 | /// <summary> | ||
8103 | /// The full path to the process module to register with the Restart Manager. | ||
8104 | /// This can be a formatted value that resolves to a full path. | ||
8105 | /// </summary> | ||
8106 | public string Path | ||
8107 | { | ||
8108 | get | ||
8109 | { | ||
8110 | return this.pathField; | ||
8111 | } | ||
8112 | set | ||
8113 | { | ||
8114 | this.pathFieldSet = true; | ||
8115 | this.pathField = value; | ||
8116 | } | ||
8117 | } | ||
8118 | |||
8119 | /// <summary> | ||
8120 | /// The name of a process to register with the Restart Manager. | ||
8121 | /// This can be a formatted value that resolves to a process name. | ||
8122 | /// </summary> | ||
8123 | public string ProcessName | ||
8124 | { | ||
8125 | get | ||
8126 | { | ||
8127 | return this.processNameField; | ||
8128 | } | ||
8129 | set | ||
8130 | { | ||
8131 | this.processNameFieldSet = true; | ||
8132 | this.processNameField = value; | ||
8133 | } | ||
8134 | } | ||
8135 | |||
8136 | /// <summary> | ||
8137 | /// The name of a Windows service to register with the Restart Manager. | ||
8138 | /// This can be a formatted value that resolves to a service name. | ||
8139 | /// </summary> | ||
8140 | public string ServiceName | ||
8141 | { | ||
8142 | get | ||
8143 | { | ||
8144 | return this.serviceNameField; | ||
8145 | } | ||
8146 | set | ||
8147 | { | ||
8148 | this.serviceNameFieldSet = true; | ||
8149 | this.serviceNameField = value; | ||
8150 | } | ||
8151 | } | ||
8152 | |||
8153 | public virtual ISchemaElement ParentElement | ||
8154 | { | ||
8155 | get | ||
8156 | { | ||
8157 | return this.parentElement; | ||
8158 | } | ||
8159 | set | ||
8160 | { | ||
8161 | this.parentElement = value; | ||
8162 | } | ||
8163 | } | ||
8164 | |||
8165 | /// <summary> | ||
8166 | /// Processes this element and all child elements into an XmlWriter. | ||
8167 | /// </summary> | ||
8168 | public virtual void OutputXml(XmlWriter writer) | ||
8169 | { | ||
8170 | if ((null == writer)) | ||
8171 | { | ||
8172 | throw new ArgumentNullException("writer"); | ||
8173 | } | ||
8174 | writer.WriteStartElement("RestartResource", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
8175 | if (this.idFieldSet) | ||
8176 | { | ||
8177 | writer.WriteAttributeString("Id", this.idField); | ||
8178 | } | ||
8179 | if (this.pathFieldSet) | ||
8180 | { | ||
8181 | writer.WriteAttributeString("Path", this.pathField); | ||
8182 | } | ||
8183 | if (this.processNameFieldSet) | ||
8184 | { | ||
8185 | writer.WriteAttributeString("ProcessName", this.processNameField); | ||
8186 | } | ||
8187 | if (this.serviceNameFieldSet) | ||
8188 | { | ||
8189 | writer.WriteAttributeString("ServiceName", this.serviceNameField); | ||
8190 | } | ||
8191 | writer.WriteEndElement(); | ||
8192 | } | ||
8193 | |||
8194 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
8195 | void ISetAttributes.SetAttribute(string name, string value) | ||
8196 | { | ||
8197 | if (String.IsNullOrEmpty(name)) | ||
8198 | { | ||
8199 | throw new ArgumentNullException("name"); | ||
8200 | } | ||
8201 | if (("Id" == name)) | ||
8202 | { | ||
8203 | this.idField = value; | ||
8204 | this.idFieldSet = true; | ||
8205 | } | ||
8206 | if (("Path" == name)) | ||
8207 | { | ||
8208 | this.pathField = value; | ||
8209 | this.pathFieldSet = true; | ||
8210 | } | ||
8211 | if (("ProcessName" == name)) | ||
8212 | { | ||
8213 | this.processNameField = value; | ||
8214 | this.processNameFieldSet = true; | ||
8215 | } | ||
8216 | if (("ServiceName" == name)) | ||
8217 | { | ||
8218 | this.serviceNameField = value; | ||
8219 | this.serviceNameFieldSet = true; | ||
8220 | } | ||
8221 | } | ||
8222 | } | ||
8223 | |||
8224 | /// <summary> | ||
8225 | /// Describes a registry search. | ||
8226 | /// </summary> | ||
8227 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8228 | public class RegistrySearch : ISchemaElement, ISetAttributes | ||
8229 | { | ||
8230 | |||
8231 | private string idField; | ||
8232 | |||
8233 | private bool idFieldSet; | ||
8234 | |||
8235 | private string variableField; | ||
8236 | |||
8237 | private bool variableFieldSet; | ||
8238 | |||
8239 | private string conditionField; | ||
8240 | |||
8241 | private bool conditionFieldSet; | ||
8242 | |||
8243 | private string afterField; | ||
8244 | |||
8245 | private bool afterFieldSet; | ||
8246 | |||
8247 | private RootType rootField; | ||
8248 | |||
8249 | private bool rootFieldSet; | ||
8250 | |||
8251 | private string keyField; | ||
8252 | |||
8253 | private bool keyFieldSet; | ||
8254 | |||
8255 | private string valueField; | ||
8256 | |||
8257 | private bool valueFieldSet; | ||
8258 | |||
8259 | private FormatType formatField; | ||
8260 | |||
8261 | private bool formatFieldSet; | ||
8262 | |||
8263 | private YesNoType expandEnvironmentVariablesField; | ||
8264 | |||
8265 | private bool expandEnvironmentVariablesFieldSet; | ||
8266 | |||
8267 | private ResultType resultField; | ||
8268 | |||
8269 | private bool resultFieldSet; | ||
8270 | |||
8271 | private YesNoType win64Field; | ||
8272 | |||
8273 | private bool win64FieldSet; | ||
8274 | |||
8275 | private ISchemaElement parentElement; | ||
8276 | |||
8277 | /// <summary> | ||
8278 | /// Id of the search for ordering and dependency. | ||
8279 | /// </summary> | ||
8280 | public string Id | ||
8281 | { | ||
8282 | get | ||
8283 | { | ||
8284 | return this.idField; | ||
8285 | } | ||
8286 | set | ||
8287 | { | ||
8288 | this.idFieldSet = true; | ||
8289 | this.idField = value; | ||
8290 | } | ||
8291 | } | ||
8292 | |||
8293 | /// <summary> | ||
8294 | /// Name of the variable in which to place the result of the search. | ||
8295 | /// </summary> | ||
8296 | public string Variable | ||
8297 | { | ||
8298 | get | ||
8299 | { | ||
8300 | return this.variableField; | ||
8301 | } | ||
8302 | set | ||
8303 | { | ||
8304 | this.variableFieldSet = true; | ||
8305 | this.variableField = value; | ||
8306 | } | ||
8307 | } | ||
8308 | |||
8309 | /// <summary> | ||
8310 | /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. | ||
8311 | /// </summary> | ||
8312 | public string Condition | ||
8313 | { | ||
8314 | get | ||
8315 | { | ||
8316 | return this.conditionField; | ||
8317 | } | ||
8318 | set | ||
8319 | { | ||
8320 | this.conditionFieldSet = true; | ||
8321 | this.conditionField = value; | ||
8322 | } | ||
8323 | } | ||
8324 | |||
8325 | /// <summary> | ||
8326 | /// Id of the search that this one should come after. | ||
8327 | /// </summary> | ||
8328 | public string After | ||
8329 | { | ||
8330 | get | ||
8331 | { | ||
8332 | return this.afterField; | ||
8333 | } | ||
8334 | set | ||
8335 | { | ||
8336 | this.afterFieldSet = true; | ||
8337 | this.afterField = value; | ||
8338 | } | ||
8339 | } | ||
8340 | |||
8341 | /// <summary> | ||
8342 | /// Registry root hive to search under. | ||
8343 | /// </summary> | ||
8344 | public RootType Root | ||
8345 | { | ||
8346 | get | ||
8347 | { | ||
8348 | return this.rootField; | ||
8349 | } | ||
8350 | set | ||
8351 | { | ||
8352 | this.rootFieldSet = true; | ||
8353 | this.rootField = value; | ||
8354 | } | ||
8355 | } | ||
8356 | |||
8357 | /// <summary> | ||
8358 | /// Key to search for. | ||
8359 | /// </summary> | ||
8360 | public string Key | ||
8361 | { | ||
8362 | get | ||
8363 | { | ||
8364 | return this.keyField; | ||
8365 | } | ||
8366 | set | ||
8367 | { | ||
8368 | this.keyFieldSet = true; | ||
8369 | this.keyField = value; | ||
8370 | } | ||
8371 | } | ||
8372 | |||
8373 | /// <summary> | ||
8374 | /// Optional value to search for under the given Key. | ||
8375 | /// </summary> | ||
8376 | public string Value | ||
8377 | { | ||
8378 | get | ||
8379 | { | ||
8380 | return this.valueField; | ||
8381 | } | ||
8382 | set | ||
8383 | { | ||
8384 | this.valueFieldSet = true; | ||
8385 | this.valueField = value; | ||
8386 | } | ||
8387 | } | ||
8388 | |||
8389 | /// <summary> | ||
8390 | /// What format to return the value in. | ||
8391 | /// </summary> | ||
8392 | public FormatType Format | ||
8393 | { | ||
8394 | get | ||
8395 | { | ||
8396 | return this.formatField; | ||
8397 | } | ||
8398 | set | ||
8399 | { | ||
8400 | this.formatFieldSet = true; | ||
8401 | this.formatField = value; | ||
8402 | } | ||
8403 | } | ||
8404 | |||
8405 | /// <summary> | ||
8406 | /// Whether to expand any environment variables in REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ values. | ||
8407 | /// </summary> | ||
8408 | public YesNoType ExpandEnvironmentVariables | ||
8409 | { | ||
8410 | get | ||
8411 | { | ||
8412 | return this.expandEnvironmentVariablesField; | ||
8413 | } | ||
8414 | set | ||
8415 | { | ||
8416 | this.expandEnvironmentVariablesFieldSet = true; | ||
8417 | this.expandEnvironmentVariablesField = value; | ||
8418 | } | ||
8419 | } | ||
8420 | |||
8421 | /// <summary> | ||
8422 | /// Rather than saving the matching registry value into the variable, a RegistrySearch can save an attribute of the matching entry instead. | ||
8423 | /// </summary> | ||
8424 | public ResultType Result | ||
8425 | { | ||
8426 | get | ||
8427 | { | ||
8428 | return this.resultField; | ||
8429 | } | ||
8430 | set | ||
8431 | { | ||
8432 | this.resultFieldSet = true; | ||
8433 | this.resultField = value; | ||
8434 | } | ||
8435 | } | ||
8436 | |||
8437 | /// <summary> | ||
8438 | /// Instructs the search to look in the 64-bit registry when the value is 'yes'. When the value is 'no', the search looks in the 32-bit registry. The default value is 'no'. | ||
8439 | /// </summary> | ||
8440 | public YesNoType Win64 | ||
8441 | { | ||
8442 | get | ||
8443 | { | ||
8444 | return this.win64Field; | ||
8445 | } | ||
8446 | set | ||
8447 | { | ||
8448 | this.win64FieldSet = true; | ||
8449 | this.win64Field = value; | ||
8450 | } | ||
8451 | } | ||
8452 | |||
8453 | public virtual ISchemaElement ParentElement | ||
8454 | { | ||
8455 | get | ||
8456 | { | ||
8457 | return this.parentElement; | ||
8458 | } | ||
8459 | set | ||
8460 | { | ||
8461 | this.parentElement = value; | ||
8462 | } | ||
8463 | } | ||
8464 | |||
8465 | /// <summary> | ||
8466 | /// Parses a RootType from a string. | ||
8467 | /// </summary> | ||
8468 | public static RootType ParseRootType(string value) | ||
8469 | { | ||
8470 | RootType parsedValue; | ||
8471 | RegistrySearch.TryParseRootType(value, out parsedValue); | ||
8472 | return parsedValue; | ||
8473 | } | ||
8474 | |||
8475 | /// <summary> | ||
8476 | /// Tries to parse a RootType from a string. | ||
8477 | /// </summary> | ||
8478 | public static bool TryParseRootType(string value, out RootType parsedValue) | ||
8479 | { | ||
8480 | parsedValue = RootType.NotSet; | ||
8481 | if (string.IsNullOrEmpty(value)) | ||
8482 | { | ||
8483 | return false; | ||
8484 | } | ||
8485 | if (("HKLM" == value)) | ||
8486 | { | ||
8487 | parsedValue = RootType.HKLM; | ||
8488 | } | ||
8489 | else | ||
8490 | { | ||
8491 | if (("HKCU" == value)) | ||
8492 | { | ||
8493 | parsedValue = RootType.HKCU; | ||
8494 | } | ||
8495 | else | ||
8496 | { | ||
8497 | if (("HKCR" == value)) | ||
8498 | { | ||
8499 | parsedValue = RootType.HKCR; | ||
8500 | } | ||
8501 | else | ||
8502 | { | ||
8503 | if (("HKU" == value)) | ||
8504 | { | ||
8505 | parsedValue = RootType.HKU; | ||
8506 | } | ||
8507 | else | ||
8508 | { | ||
8509 | parsedValue = RootType.IllegalValue; | ||
8510 | return false; | ||
8511 | } | ||
8512 | } | ||
8513 | } | ||
8514 | } | ||
8515 | return true; | ||
8516 | } | ||
8517 | |||
8518 | /// <summary> | ||
8519 | /// Parses a FormatType from a string. | ||
8520 | /// </summary> | ||
8521 | public static FormatType ParseFormatType(string value) | ||
8522 | { | ||
8523 | FormatType parsedValue; | ||
8524 | RegistrySearch.TryParseFormatType(value, out parsedValue); | ||
8525 | return parsedValue; | ||
8526 | } | ||
8527 | |||
8528 | /// <summary> | ||
8529 | /// Tries to parse a FormatType from a string. | ||
8530 | /// </summary> | ||
8531 | public static bool TryParseFormatType(string value, out FormatType parsedValue) | ||
8532 | { | ||
8533 | parsedValue = FormatType.NotSet; | ||
8534 | if (string.IsNullOrEmpty(value)) | ||
8535 | { | ||
8536 | return false; | ||
8537 | } | ||
8538 | if (("raw" == value)) | ||
8539 | { | ||
8540 | parsedValue = FormatType.raw; | ||
8541 | } | ||
8542 | else | ||
8543 | { | ||
8544 | if (("compatible" == value)) | ||
8545 | { | ||
8546 | parsedValue = FormatType.compatible; | ||
8547 | } | ||
8548 | else | ||
8549 | { | ||
8550 | parsedValue = FormatType.IllegalValue; | ||
8551 | return false; | ||
8552 | } | ||
8553 | } | ||
8554 | return true; | ||
8555 | } | ||
8556 | |||
8557 | /// <summary> | ||
8558 | /// Parses a ResultType from a string. | ||
8559 | /// </summary> | ||
8560 | public static ResultType ParseResultType(string value) | ||
8561 | { | ||
8562 | ResultType parsedValue; | ||
8563 | RegistrySearch.TryParseResultType(value, out parsedValue); | ||
8564 | return parsedValue; | ||
8565 | } | ||
8566 | |||
8567 | /// <summary> | ||
8568 | /// Tries to parse a ResultType from a string. | ||
8569 | /// </summary> | ||
8570 | public static bool TryParseResultType(string value, out ResultType parsedValue) | ||
8571 | { | ||
8572 | parsedValue = ResultType.NotSet; | ||
8573 | if (string.IsNullOrEmpty(value)) | ||
8574 | { | ||
8575 | return false; | ||
8576 | } | ||
8577 | if (("exists" == value)) | ||
8578 | { | ||
8579 | parsedValue = ResultType.exists; | ||
8580 | } | ||
8581 | else | ||
8582 | { | ||
8583 | if (("value" == value)) | ||
8584 | { | ||
8585 | parsedValue = ResultType.value; | ||
8586 | } | ||
8587 | else | ||
8588 | { | ||
8589 | parsedValue = ResultType.IllegalValue; | ||
8590 | return false; | ||
8591 | } | ||
8592 | } | ||
8593 | return true; | ||
8594 | } | ||
8595 | |||
8596 | /// <summary> | ||
8597 | /// Processes this element and all child elements into an XmlWriter. | ||
8598 | /// </summary> | ||
8599 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
8600 | public virtual void OutputXml(XmlWriter writer) | ||
8601 | { | ||
8602 | if ((null == writer)) | ||
8603 | { | ||
8604 | throw new ArgumentNullException("writer"); | ||
8605 | } | ||
8606 | writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
8607 | if (this.idFieldSet) | ||
8608 | { | ||
8609 | writer.WriteAttributeString("Id", this.idField); | ||
8610 | } | ||
8611 | if (this.variableFieldSet) | ||
8612 | { | ||
8613 | writer.WriteAttributeString("Variable", this.variableField); | ||
8614 | } | ||
8615 | if (this.conditionFieldSet) | ||
8616 | { | ||
8617 | writer.WriteAttributeString("Condition", this.conditionField); | ||
8618 | } | ||
8619 | if (this.afterFieldSet) | ||
8620 | { | ||
8621 | writer.WriteAttributeString("After", this.afterField); | ||
8622 | } | ||
8623 | if (this.rootFieldSet) | ||
8624 | { | ||
8625 | if ((this.rootField == RootType.HKLM)) | ||
8626 | { | ||
8627 | writer.WriteAttributeString("Root", "HKLM"); | ||
8628 | } | ||
8629 | if ((this.rootField == RootType.HKCU)) | ||
8630 | { | ||
8631 | writer.WriteAttributeString("Root", "HKCU"); | ||
8632 | } | ||
8633 | if ((this.rootField == RootType.HKCR)) | ||
8634 | { | ||
8635 | writer.WriteAttributeString("Root", "HKCR"); | ||
8636 | } | ||
8637 | if ((this.rootField == RootType.HKU)) | ||
8638 | { | ||
8639 | writer.WriteAttributeString("Root", "HKU"); | ||
8640 | } | ||
8641 | } | ||
8642 | if (this.keyFieldSet) | ||
8643 | { | ||
8644 | writer.WriteAttributeString("Key", this.keyField); | ||
8645 | } | ||
8646 | if (this.valueFieldSet) | ||
8647 | { | ||
8648 | writer.WriteAttributeString("Value", this.valueField); | ||
8649 | } | ||
8650 | if (this.formatFieldSet) | ||
8651 | { | ||
8652 | if ((this.formatField == FormatType.raw)) | ||
8653 | { | ||
8654 | writer.WriteAttributeString("Format", "raw"); | ||
8655 | } | ||
8656 | if ((this.formatField == FormatType.compatible)) | ||
8657 | { | ||
8658 | writer.WriteAttributeString("Format", "compatible"); | ||
8659 | } | ||
8660 | } | ||
8661 | if (this.expandEnvironmentVariablesFieldSet) | ||
8662 | { | ||
8663 | if ((this.expandEnvironmentVariablesField == YesNoType.no)) | ||
8664 | { | ||
8665 | writer.WriteAttributeString("ExpandEnvironmentVariables", "no"); | ||
8666 | } | ||
8667 | if ((this.expandEnvironmentVariablesField == YesNoType.yes)) | ||
8668 | { | ||
8669 | writer.WriteAttributeString("ExpandEnvironmentVariables", "yes"); | ||
8670 | } | ||
8671 | } | ||
8672 | if (this.resultFieldSet) | ||
8673 | { | ||
8674 | if ((this.resultField == ResultType.exists)) | ||
8675 | { | ||
8676 | writer.WriteAttributeString("Result", "exists"); | ||
8677 | } | ||
8678 | if ((this.resultField == ResultType.value)) | ||
8679 | { | ||
8680 | writer.WriteAttributeString("Result", "value"); | ||
8681 | } | ||
8682 | } | ||
8683 | if (this.win64FieldSet) | ||
8684 | { | ||
8685 | if ((this.win64Field == YesNoType.no)) | ||
8686 | { | ||
8687 | writer.WriteAttributeString("Win64", "no"); | ||
8688 | } | ||
8689 | if ((this.win64Field == YesNoType.yes)) | ||
8690 | { | ||
8691 | writer.WriteAttributeString("Win64", "yes"); | ||
8692 | } | ||
8693 | } | ||
8694 | writer.WriteEndElement(); | ||
8695 | } | ||
8696 | |||
8697 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
8698 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
8699 | void ISetAttributes.SetAttribute(string name, string value) | ||
8700 | { | ||
8701 | if (String.IsNullOrEmpty(name)) | ||
8702 | { | ||
8703 | throw new ArgumentNullException("name"); | ||
8704 | } | ||
8705 | if (("Id" == name)) | ||
8706 | { | ||
8707 | this.idField = value; | ||
8708 | this.idFieldSet = true; | ||
8709 | } | ||
8710 | if (("Variable" == name)) | ||
8711 | { | ||
8712 | this.variableField = value; | ||
8713 | this.variableFieldSet = true; | ||
8714 | } | ||
8715 | if (("Condition" == name)) | ||
8716 | { | ||
8717 | this.conditionField = value; | ||
8718 | this.conditionFieldSet = true; | ||
8719 | } | ||
8720 | if (("After" == name)) | ||
8721 | { | ||
8722 | this.afterField = value; | ||
8723 | this.afterFieldSet = true; | ||
8724 | } | ||
8725 | if (("Root" == name)) | ||
8726 | { | ||
8727 | this.rootField = RegistrySearch.ParseRootType(value); | ||
8728 | this.rootFieldSet = true; | ||
8729 | } | ||
8730 | if (("Key" == name)) | ||
8731 | { | ||
8732 | this.keyField = value; | ||
8733 | this.keyFieldSet = true; | ||
8734 | } | ||
8735 | if (("Value" == name)) | ||
8736 | { | ||
8737 | this.valueField = value; | ||
8738 | this.valueFieldSet = true; | ||
8739 | } | ||
8740 | if (("Format" == name)) | ||
8741 | { | ||
8742 | this.formatField = RegistrySearch.ParseFormatType(value); | ||
8743 | this.formatFieldSet = true; | ||
8744 | } | ||
8745 | if (("ExpandEnvironmentVariables" == name)) | ||
8746 | { | ||
8747 | this.expandEnvironmentVariablesField = Enums.ParseYesNoType(value); | ||
8748 | this.expandEnvironmentVariablesFieldSet = true; | ||
8749 | } | ||
8750 | if (("Result" == name)) | ||
8751 | { | ||
8752 | this.resultField = RegistrySearch.ParseResultType(value); | ||
8753 | this.resultFieldSet = true; | ||
8754 | } | ||
8755 | if (("Win64" == name)) | ||
8756 | { | ||
8757 | this.win64Field = Enums.ParseYesNoType(value); | ||
8758 | this.win64FieldSet = true; | ||
8759 | } | ||
8760 | } | ||
8761 | |||
8762 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8763 | public enum RootType | ||
8764 | { | ||
8765 | |||
8766 | IllegalValue = int.MaxValue, | ||
8767 | |||
8768 | NotSet = -1, | ||
8769 | |||
8770 | /// <summary> | ||
8771 | /// HKEY_LOCAL_MACHINE | ||
8772 | /// </summary> | ||
8773 | HKLM, | ||
8774 | |||
8775 | /// <summary> | ||
8776 | /// HKEY_CURRENT_USER | ||
8777 | /// </summary> | ||
8778 | HKCU, | ||
8779 | |||
8780 | /// <summary> | ||
8781 | /// HKEY_CLASSES_ROOT | ||
8782 | /// </summary> | ||
8783 | HKCR, | ||
8784 | |||
8785 | /// <summary> | ||
8786 | /// HKEY_USERS | ||
8787 | /// </summary> | ||
8788 | HKU, | ||
8789 | } | ||
8790 | |||
8791 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8792 | public enum FormatType | ||
8793 | { | ||
8794 | |||
8795 | IllegalValue = int.MaxValue, | ||
8796 | |||
8797 | NotSet = -1, | ||
8798 | |||
8799 | /// <summary> | ||
8800 | /// Returns the unformatted value directly from the registry. For example, a REG_DWORD value of '1' is returned as '1', not '#1'. | ||
8801 | /// </summary> | ||
8802 | raw, | ||
8803 | |||
8804 | /// <summary> | ||
8805 | /// Returns the value formatted as Windows Installer would. For example, a REG_DWORD value of '1' is returned as '#1', not '1'. | ||
8806 | /// </summary> | ||
8807 | compatible, | ||
8808 | } | ||
8809 | |||
8810 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8811 | public enum ResultType | ||
8812 | { | ||
8813 | |||
8814 | IllegalValue = int.MaxValue, | ||
8815 | |||
8816 | NotSet = -1, | ||
8817 | |||
8818 | /// <summary> | ||
8819 | /// Saves true if a matching registry entry is found; false otherwise. | ||
8820 | /// </summary> | ||
8821 | exists, | ||
8822 | |||
8823 | /// <summary> | ||
8824 | /// Saves the value of the registry key in the variable. This is the default. | ||
8825 | /// </summary> | ||
8826 | value, | ||
8827 | } | ||
8828 | } | ||
8829 | |||
8830 | /// <summary> | ||
8831 | /// References a RegistrySearch. | ||
8832 | /// </summary> | ||
8833 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8834 | public class RegistrySearchRef : ISchemaElement, ISetAttributes | ||
8835 | { | ||
8836 | |||
8837 | private string idField; | ||
8838 | |||
8839 | private bool idFieldSet; | ||
8840 | |||
8841 | private ISchemaElement parentElement; | ||
8842 | |||
8843 | public string Id | ||
8844 | { | ||
8845 | get | ||
8846 | { | ||
8847 | return this.idField; | ||
8848 | } | ||
8849 | set | ||
8850 | { | ||
8851 | this.idFieldSet = true; | ||
8852 | this.idField = value; | ||
8853 | } | ||
8854 | } | ||
8855 | |||
8856 | public virtual ISchemaElement ParentElement | ||
8857 | { | ||
8858 | get | ||
8859 | { | ||
8860 | return this.parentElement; | ||
8861 | } | ||
8862 | set | ||
8863 | { | ||
8864 | this.parentElement = value; | ||
8865 | } | ||
8866 | } | ||
8867 | |||
8868 | /// <summary> | ||
8869 | /// Processes this element and all child elements into an XmlWriter. | ||
8870 | /// </summary> | ||
8871 | public virtual void OutputXml(XmlWriter writer) | ||
8872 | { | ||
8873 | if ((null == writer)) | ||
8874 | { | ||
8875 | throw new ArgumentNullException("writer"); | ||
8876 | } | ||
8877 | writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
8878 | if (this.idFieldSet) | ||
8879 | { | ||
8880 | writer.WriteAttributeString("Id", this.idField); | ||
8881 | } | ||
8882 | writer.WriteEndElement(); | ||
8883 | } | ||
8884 | |||
8885 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
8886 | void ISetAttributes.SetAttribute(string name, string value) | ||
8887 | { | ||
8888 | if (String.IsNullOrEmpty(name)) | ||
8889 | { | ||
8890 | throw new ArgumentNullException("name"); | ||
8891 | } | ||
8892 | if (("Id" == name)) | ||
8893 | { | ||
8894 | this.idField = value; | ||
8895 | this.idFieldSet = true; | ||
8896 | } | ||
8897 | } | ||
8898 | } | ||
8899 | |||
8900 | /// <summary> | ||
8901 | /// Service configuration information for failure actions. | ||
8902 | /// </summary> | ||
8903 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
8904 | public class ServiceConfig : ISchemaElement, ISetAttributes | ||
8905 | { | ||
8906 | |||
8907 | private string serviceNameField; | ||
8908 | |||
8909 | private bool serviceNameFieldSet; | ||
8910 | |||
8911 | private FirstFailureActionTypeType firstFailureActionTypeField; | ||
8912 | |||
8913 | private bool firstFailureActionTypeFieldSet; | ||
8914 | |||
8915 | private SecondFailureActionTypeType secondFailureActionTypeField; | ||
8916 | |||
8917 | private bool secondFailureActionTypeFieldSet; | ||
8918 | |||
8919 | private ThirdFailureActionTypeType thirdFailureActionTypeField; | ||
8920 | |||
8921 | private bool thirdFailureActionTypeFieldSet; | ||
8922 | |||
8923 | private int resetPeriodInDaysField; | ||
8924 | |||
8925 | private bool resetPeriodInDaysFieldSet; | ||
8926 | |||
8927 | private int restartServiceDelayInSecondsField; | ||
8928 | |||
8929 | private bool restartServiceDelayInSecondsFieldSet; | ||
8930 | |||
8931 | private string programCommandLineField; | ||
8932 | |||
8933 | private bool programCommandLineFieldSet; | ||
8934 | |||
8935 | private string rebootMessageField; | ||
8936 | |||
8937 | private bool rebootMessageFieldSet; | ||
8938 | |||
8939 | private ISchemaElement parentElement; | ||
8940 | |||
8941 | /// <summary> | ||
8942 | /// Required if not under a ServiceInstall element. | ||
8943 | /// </summary> | ||
8944 | public string ServiceName | ||
8945 | { | ||
8946 | get | ||
8947 | { | ||
8948 | return this.serviceNameField; | ||
8949 | } | ||
8950 | set | ||
8951 | { | ||
8952 | this.serviceNameFieldSet = true; | ||
8953 | this.serviceNameField = value; | ||
8954 | } | ||
8955 | } | ||
8956 | |||
8957 | /// <summary> | ||
8958 | /// Action to take on the first failure of the service. | ||
8959 | /// </summary> | ||
8960 | public FirstFailureActionTypeType FirstFailureActionType | ||
8961 | { | ||
8962 | get | ||
8963 | { | ||
8964 | return this.firstFailureActionTypeField; | ||
8965 | } | ||
8966 | set | ||
8967 | { | ||
8968 | this.firstFailureActionTypeFieldSet = true; | ||
8969 | this.firstFailureActionTypeField = value; | ||
8970 | } | ||
8971 | } | ||
8972 | |||
8973 | /// <summary> | ||
8974 | /// Action to take on the second failure of the service. | ||
8975 | /// </summary> | ||
8976 | public SecondFailureActionTypeType SecondFailureActionType | ||
8977 | { | ||
8978 | get | ||
8979 | { | ||
8980 | return this.secondFailureActionTypeField; | ||
8981 | } | ||
8982 | set | ||
8983 | { | ||
8984 | this.secondFailureActionTypeFieldSet = true; | ||
8985 | this.secondFailureActionTypeField = value; | ||
8986 | } | ||
8987 | } | ||
8988 | |||
8989 | /// <summary> | ||
8990 | /// Action to take on the third failure of the service. | ||
8991 | /// </summary> | ||
8992 | public ThirdFailureActionTypeType ThirdFailureActionType | ||
8993 | { | ||
8994 | get | ||
8995 | { | ||
8996 | return this.thirdFailureActionTypeField; | ||
8997 | } | ||
8998 | set | ||
8999 | { | ||
9000 | this.thirdFailureActionTypeFieldSet = true; | ||
9001 | this.thirdFailureActionTypeField = value; | ||
9002 | } | ||
9003 | } | ||
9004 | |||
9005 | /// <summary> | ||
9006 | /// Number of days after which to reset the failure count to zero if there are no failures. | ||
9007 | /// </summary> | ||
9008 | public int ResetPeriodInDays | ||
9009 | { | ||
9010 | get | ||
9011 | { | ||
9012 | return this.resetPeriodInDaysField; | ||
9013 | } | ||
9014 | set | ||
9015 | { | ||
9016 | this.resetPeriodInDaysFieldSet = true; | ||
9017 | this.resetPeriodInDaysField = value; | ||
9018 | } | ||
9019 | } | ||
9020 | |||
9021 | /// <summary> | ||
9022 | /// If any of the three *ActionType attributes is "restart", this specifies the number of seconds to wait before doing so. | ||
9023 | /// </summary> | ||
9024 | public int RestartServiceDelayInSeconds | ||
9025 | { | ||
9026 | get | ||
9027 | { | ||
9028 | return this.restartServiceDelayInSecondsField; | ||
9029 | } | ||
9030 | set | ||
9031 | { | ||
9032 | this.restartServiceDelayInSecondsFieldSet = true; | ||
9033 | this.restartServiceDelayInSecondsField = value; | ||
9034 | } | ||
9035 | } | ||
9036 | |||
9037 | /// <summary> | ||
9038 | /// If any of the three *ActionType attributes is "runCommand", this specifies the command to run when doing so. This value is formatted. | ||
9039 | /// </summary> | ||
9040 | public string ProgramCommandLine | ||
9041 | { | ||
9042 | get | ||
9043 | { | ||
9044 | return this.programCommandLineField; | ||
9045 | } | ||
9046 | set | ||
9047 | { | ||
9048 | this.programCommandLineFieldSet = true; | ||
9049 | this.programCommandLineField = value; | ||
9050 | } | ||
9051 | } | ||
9052 | |||
9053 | /// <summary> | ||
9054 | /// If any of the three *ActionType attributes is "reboot", this specifies the message to broadcast to server users before doing so. | ||
9055 | /// </summary> | ||
9056 | public string RebootMessage | ||
9057 | { | ||
9058 | get | ||
9059 | { | ||
9060 | return this.rebootMessageField; | ||
9061 | } | ||
9062 | set | ||
9063 | { | ||
9064 | this.rebootMessageFieldSet = true; | ||
9065 | this.rebootMessageField = value; | ||
9066 | } | ||
9067 | } | ||
9068 | |||
9069 | public virtual ISchemaElement ParentElement | ||
9070 | { | ||
9071 | get | ||
9072 | { | ||
9073 | return this.parentElement; | ||
9074 | } | ||
9075 | set | ||
9076 | { | ||
9077 | this.parentElement = value; | ||
9078 | } | ||
9079 | } | ||
9080 | |||
9081 | /// <summary> | ||
9082 | /// Parses a FirstFailureActionTypeType from a string. | ||
9083 | /// </summary> | ||
9084 | public static FirstFailureActionTypeType ParseFirstFailureActionTypeType(string value) | ||
9085 | { | ||
9086 | FirstFailureActionTypeType parsedValue; | ||
9087 | ServiceConfig.TryParseFirstFailureActionTypeType(value, out parsedValue); | ||
9088 | return parsedValue; | ||
9089 | } | ||
9090 | |||
9091 | /// <summary> | ||
9092 | /// Tries to parse a FirstFailureActionTypeType from a string. | ||
9093 | /// </summary> | ||
9094 | public static bool TryParseFirstFailureActionTypeType(string value, out FirstFailureActionTypeType parsedValue) | ||
9095 | { | ||
9096 | parsedValue = FirstFailureActionTypeType.NotSet; | ||
9097 | if (string.IsNullOrEmpty(value)) | ||
9098 | { | ||
9099 | return false; | ||
9100 | } | ||
9101 | if (("none" == value)) | ||
9102 | { | ||
9103 | parsedValue = FirstFailureActionTypeType.none; | ||
9104 | } | ||
9105 | else | ||
9106 | { | ||
9107 | if (("reboot" == value)) | ||
9108 | { | ||
9109 | parsedValue = FirstFailureActionTypeType.reboot; | ||
9110 | } | ||
9111 | else | ||
9112 | { | ||
9113 | if (("restart" == value)) | ||
9114 | { | ||
9115 | parsedValue = FirstFailureActionTypeType.restart; | ||
9116 | } | ||
9117 | else | ||
9118 | { | ||
9119 | if (("runCommand" == value)) | ||
9120 | { | ||
9121 | parsedValue = FirstFailureActionTypeType.runCommand; | ||
9122 | } | ||
9123 | else | ||
9124 | { | ||
9125 | parsedValue = FirstFailureActionTypeType.IllegalValue; | ||
9126 | return false; | ||
9127 | } | ||
9128 | } | ||
9129 | } | ||
9130 | } | ||
9131 | return true; | ||
9132 | } | ||
9133 | |||
9134 | /// <summary> | ||
9135 | /// Parses a SecondFailureActionTypeType from a string. | ||
9136 | /// </summary> | ||
9137 | public static SecondFailureActionTypeType ParseSecondFailureActionTypeType(string value) | ||
9138 | { | ||
9139 | SecondFailureActionTypeType parsedValue; | ||
9140 | ServiceConfig.TryParseSecondFailureActionTypeType(value, out parsedValue); | ||
9141 | return parsedValue; | ||
9142 | } | ||
9143 | |||
9144 | /// <summary> | ||
9145 | /// Tries to parse a SecondFailureActionTypeType from a string. | ||
9146 | /// </summary> | ||
9147 | public static bool TryParseSecondFailureActionTypeType(string value, out SecondFailureActionTypeType parsedValue) | ||
9148 | { | ||
9149 | parsedValue = SecondFailureActionTypeType.NotSet; | ||
9150 | if (string.IsNullOrEmpty(value)) | ||
9151 | { | ||
9152 | return false; | ||
9153 | } | ||
9154 | if (("none" == value)) | ||
9155 | { | ||
9156 | parsedValue = SecondFailureActionTypeType.none; | ||
9157 | } | ||
9158 | else | ||
9159 | { | ||
9160 | if (("reboot" == value)) | ||
9161 | { | ||
9162 | parsedValue = SecondFailureActionTypeType.reboot; | ||
9163 | } | ||
9164 | else | ||
9165 | { | ||
9166 | if (("restart" == value)) | ||
9167 | { | ||
9168 | parsedValue = SecondFailureActionTypeType.restart; | ||
9169 | } | ||
9170 | else | ||
9171 | { | ||
9172 | if (("runCommand" == value)) | ||
9173 | { | ||
9174 | parsedValue = SecondFailureActionTypeType.runCommand; | ||
9175 | } | ||
9176 | else | ||
9177 | { | ||
9178 | parsedValue = SecondFailureActionTypeType.IllegalValue; | ||
9179 | return false; | ||
9180 | } | ||
9181 | } | ||
9182 | } | ||
9183 | } | ||
9184 | return true; | ||
9185 | } | ||
9186 | |||
9187 | /// <summary> | ||
9188 | /// Parses a ThirdFailureActionTypeType from a string. | ||
9189 | /// </summary> | ||
9190 | public static ThirdFailureActionTypeType ParseThirdFailureActionTypeType(string value) | ||
9191 | { | ||
9192 | ThirdFailureActionTypeType parsedValue; | ||
9193 | ServiceConfig.TryParseThirdFailureActionTypeType(value, out parsedValue); | ||
9194 | return parsedValue; | ||
9195 | } | ||
9196 | |||
9197 | /// <summary> | ||
9198 | /// Tries to parse a ThirdFailureActionTypeType from a string. | ||
9199 | /// </summary> | ||
9200 | public static bool TryParseThirdFailureActionTypeType(string value, out ThirdFailureActionTypeType parsedValue) | ||
9201 | { | ||
9202 | parsedValue = ThirdFailureActionTypeType.NotSet; | ||
9203 | if (string.IsNullOrEmpty(value)) | ||
9204 | { | ||
9205 | return false; | ||
9206 | } | ||
9207 | if (("none" == value)) | ||
9208 | { | ||
9209 | parsedValue = ThirdFailureActionTypeType.none; | ||
9210 | } | ||
9211 | else | ||
9212 | { | ||
9213 | if (("reboot" == value)) | ||
9214 | { | ||
9215 | parsedValue = ThirdFailureActionTypeType.reboot; | ||
9216 | } | ||
9217 | else | ||
9218 | { | ||
9219 | if (("restart" == value)) | ||
9220 | { | ||
9221 | parsedValue = ThirdFailureActionTypeType.restart; | ||
9222 | } | ||
9223 | else | ||
9224 | { | ||
9225 | if (("runCommand" == value)) | ||
9226 | { | ||
9227 | parsedValue = ThirdFailureActionTypeType.runCommand; | ||
9228 | } | ||
9229 | else | ||
9230 | { | ||
9231 | parsedValue = ThirdFailureActionTypeType.IllegalValue; | ||
9232 | return false; | ||
9233 | } | ||
9234 | } | ||
9235 | } | ||
9236 | } | ||
9237 | return true; | ||
9238 | } | ||
9239 | |||
9240 | /// <summary> | ||
9241 | /// Processes this element and all child elements into an XmlWriter. | ||
9242 | /// </summary> | ||
9243 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
9244 | public virtual void OutputXml(XmlWriter writer) | ||
9245 | { | ||
9246 | if ((null == writer)) | ||
9247 | { | ||
9248 | throw new ArgumentNullException("writer"); | ||
9249 | } | ||
9250 | writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
9251 | if (this.serviceNameFieldSet) | ||
9252 | { | ||
9253 | writer.WriteAttributeString("ServiceName", this.serviceNameField); | ||
9254 | } | ||
9255 | if (this.firstFailureActionTypeFieldSet) | ||
9256 | { | ||
9257 | if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.none)) | ||
9258 | { | ||
9259 | writer.WriteAttributeString("FirstFailureActionType", "none"); | ||
9260 | } | ||
9261 | if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.reboot)) | ||
9262 | { | ||
9263 | writer.WriteAttributeString("FirstFailureActionType", "reboot"); | ||
9264 | } | ||
9265 | if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.restart)) | ||
9266 | { | ||
9267 | writer.WriteAttributeString("FirstFailureActionType", "restart"); | ||
9268 | } | ||
9269 | if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.runCommand)) | ||
9270 | { | ||
9271 | writer.WriteAttributeString("FirstFailureActionType", "runCommand"); | ||
9272 | } | ||
9273 | } | ||
9274 | if (this.secondFailureActionTypeFieldSet) | ||
9275 | { | ||
9276 | if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.none)) | ||
9277 | { | ||
9278 | writer.WriteAttributeString("SecondFailureActionType", "none"); | ||
9279 | } | ||
9280 | if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.reboot)) | ||
9281 | { | ||
9282 | writer.WriteAttributeString("SecondFailureActionType", "reboot"); | ||
9283 | } | ||
9284 | if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.restart)) | ||
9285 | { | ||
9286 | writer.WriteAttributeString("SecondFailureActionType", "restart"); | ||
9287 | } | ||
9288 | if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.runCommand)) | ||
9289 | { | ||
9290 | writer.WriteAttributeString("SecondFailureActionType", "runCommand"); | ||
9291 | } | ||
9292 | } | ||
9293 | if (this.thirdFailureActionTypeFieldSet) | ||
9294 | { | ||
9295 | if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.none)) | ||
9296 | { | ||
9297 | writer.WriteAttributeString("ThirdFailureActionType", "none"); | ||
9298 | } | ||
9299 | if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.reboot)) | ||
9300 | { | ||
9301 | writer.WriteAttributeString("ThirdFailureActionType", "reboot"); | ||
9302 | } | ||
9303 | if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.restart)) | ||
9304 | { | ||
9305 | writer.WriteAttributeString("ThirdFailureActionType", "restart"); | ||
9306 | } | ||
9307 | if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.runCommand)) | ||
9308 | { | ||
9309 | writer.WriteAttributeString("ThirdFailureActionType", "runCommand"); | ||
9310 | } | ||
9311 | } | ||
9312 | if (this.resetPeriodInDaysFieldSet) | ||
9313 | { | ||
9314 | writer.WriteAttributeString("ResetPeriodInDays", this.resetPeriodInDaysField.ToString(CultureInfo.InvariantCulture)); | ||
9315 | } | ||
9316 | if (this.restartServiceDelayInSecondsFieldSet) | ||
9317 | { | ||
9318 | writer.WriteAttributeString("RestartServiceDelayInSeconds", this.restartServiceDelayInSecondsField.ToString(CultureInfo.InvariantCulture)); | ||
9319 | } | ||
9320 | if (this.programCommandLineFieldSet) | ||
9321 | { | ||
9322 | writer.WriteAttributeString("ProgramCommandLine", this.programCommandLineField); | ||
9323 | } | ||
9324 | if (this.rebootMessageFieldSet) | ||
9325 | { | ||
9326 | writer.WriteAttributeString("RebootMessage", this.rebootMessageField); | ||
9327 | } | ||
9328 | writer.WriteEndElement(); | ||
9329 | } | ||
9330 | |||
9331 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
9332 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
9333 | void ISetAttributes.SetAttribute(string name, string value) | ||
9334 | { | ||
9335 | if (String.IsNullOrEmpty(name)) | ||
9336 | { | ||
9337 | throw new ArgumentNullException("name"); | ||
9338 | } | ||
9339 | if (("ServiceName" == name)) | ||
9340 | { | ||
9341 | this.serviceNameField = value; | ||
9342 | this.serviceNameFieldSet = true; | ||
9343 | } | ||
9344 | if (("FirstFailureActionType" == name)) | ||
9345 | { | ||
9346 | this.firstFailureActionTypeField = ServiceConfig.ParseFirstFailureActionTypeType(value); | ||
9347 | this.firstFailureActionTypeFieldSet = true; | ||
9348 | } | ||
9349 | if (("SecondFailureActionType" == name)) | ||
9350 | { | ||
9351 | this.secondFailureActionTypeField = ServiceConfig.ParseSecondFailureActionTypeType(value); | ||
9352 | this.secondFailureActionTypeFieldSet = true; | ||
9353 | } | ||
9354 | if (("ThirdFailureActionType" == name)) | ||
9355 | { | ||
9356 | this.thirdFailureActionTypeField = ServiceConfig.ParseThirdFailureActionTypeType(value); | ||
9357 | this.thirdFailureActionTypeFieldSet = true; | ||
9358 | } | ||
9359 | if (("ResetPeriodInDays" == name)) | ||
9360 | { | ||
9361 | this.resetPeriodInDaysField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
9362 | this.resetPeriodInDaysFieldSet = true; | ||
9363 | } | ||
9364 | if (("RestartServiceDelayInSeconds" == name)) | ||
9365 | { | ||
9366 | this.restartServiceDelayInSecondsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
9367 | this.restartServiceDelayInSecondsFieldSet = true; | ||
9368 | } | ||
9369 | if (("ProgramCommandLine" == name)) | ||
9370 | { | ||
9371 | this.programCommandLineField = value; | ||
9372 | this.programCommandLineFieldSet = true; | ||
9373 | } | ||
9374 | if (("RebootMessage" == name)) | ||
9375 | { | ||
9376 | this.rebootMessageField = value; | ||
9377 | this.rebootMessageFieldSet = true; | ||
9378 | } | ||
9379 | } | ||
9380 | |||
9381 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
9382 | public enum FirstFailureActionTypeType | ||
9383 | { | ||
9384 | |||
9385 | IllegalValue = int.MaxValue, | ||
9386 | |||
9387 | NotSet = -1, | ||
9388 | |||
9389 | none, | ||
9390 | |||
9391 | reboot, | ||
9392 | |||
9393 | restart, | ||
9394 | |||
9395 | runCommand, | ||
9396 | } | ||
9397 | |||
9398 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
9399 | public enum SecondFailureActionTypeType | ||
9400 | { | ||
9401 | |||
9402 | IllegalValue = int.MaxValue, | ||
9403 | |||
9404 | NotSet = -1, | ||
9405 | |||
9406 | none, | ||
9407 | |||
9408 | reboot, | ||
9409 | |||
9410 | restart, | ||
9411 | |||
9412 | runCommand, | ||
9413 | } | ||
9414 | |||
9415 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
9416 | public enum ThirdFailureActionTypeType | ||
9417 | { | ||
9418 | |||
9419 | IllegalValue = int.MaxValue, | ||
9420 | |||
9421 | NotSet = -1, | ||
9422 | |||
9423 | none, | ||
9424 | |||
9425 | reboot, | ||
9426 | |||
9427 | restart, | ||
9428 | |||
9429 | runCommand, | ||
9430 | } | ||
9431 | } | ||
9432 | |||
9433 | /// <summary> | ||
9434 | /// Updates the last modified date/time of a file. | ||
9435 | /// </summary> | ||
9436 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
9437 | public class TouchFile : ISchemaElement, ISetAttributes | ||
9438 | { | ||
9439 | |||
9440 | private string idField; | ||
9441 | |||
9442 | private bool idFieldSet; | ||
9443 | |||
9444 | private string pathField; | ||
9445 | |||
9446 | private bool pathFieldSet; | ||
9447 | |||
9448 | private YesNoType onInstallField; | ||
9449 | |||
9450 | private bool onInstallFieldSet; | ||
9451 | |||
9452 | private YesNoType onReinstallField; | ||
9453 | |||
9454 | private bool onReinstallFieldSet; | ||
9455 | |||
9456 | private YesNoType onUninstallField; | ||
9457 | |||
9458 | private bool onUninstallFieldSet; | ||
9459 | |||
9460 | private YesNoType nonvitalField; | ||
9461 | |||
9462 | private bool nonvitalFieldSet; | ||
9463 | |||
9464 | private ISchemaElement parentElement; | ||
9465 | |||
9466 | /// <summary> | ||
9467 | /// Identifier for the touch file operation. If the identifier is not specified it will be generated. | ||
9468 | /// </summary> | ||
9469 | public string Id | ||
9470 | { | ||
9471 | get | ||
9472 | { | ||
9473 | return this.idField; | ||
9474 | } | ||
9475 | set | ||
9476 | { | ||
9477 | this.idFieldSet = true; | ||
9478 | this.idField = value; | ||
9479 | } | ||
9480 | } | ||
9481 | |||
9482 | /// <summary> | ||
9483 | /// Path of the file to update. This value is formatted. | ||
9484 | /// </summary> | ||
9485 | public string Path | ||
9486 | { | ||
9487 | get | ||
9488 | { | ||
9489 | return this.pathField; | ||
9490 | } | ||
9491 | set | ||
9492 | { | ||
9493 | this.pathFieldSet = true; | ||
9494 | this.pathField = value; | ||
9495 | } | ||
9496 | } | ||
9497 | |||
9498 | /// <summary> | ||
9499 | /// Specifies whether or not the modified time of the file should be updated on install. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'. | ||
9500 | /// </summary> | ||
9501 | public YesNoType OnInstall | ||
9502 | { | ||
9503 | get | ||
9504 | { | ||
9505 | return this.onInstallField; | ||
9506 | } | ||
9507 | set | ||
9508 | { | ||
9509 | this.onInstallFieldSet = true; | ||
9510 | this.onInstallField = value; | ||
9511 | } | ||
9512 | } | ||
9513 | |||
9514 | /// <summary> | ||
9515 | /// Specifies whether or not the modified time of the file should be updated on reinstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'. | ||
9516 | /// </summary> | ||
9517 | public YesNoType OnReinstall | ||
9518 | { | ||
9519 | get | ||
9520 | { | ||
9521 | return this.onReinstallField; | ||
9522 | } | ||
9523 | set | ||
9524 | { | ||
9525 | this.onReinstallFieldSet = true; | ||
9526 | this.onReinstallField = value; | ||
9527 | } | ||
9528 | } | ||
9529 | |||
9530 | /// <summary> | ||
9531 | /// Specifies whether or not the modified time of the file should be updated on uninstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'no'. | ||
9532 | /// </summary> | ||
9533 | public YesNoType OnUninstall | ||
9534 | { | ||
9535 | get | ||
9536 | { | ||
9537 | return this.onUninstallField; | ||
9538 | } | ||
9539 | set | ||
9540 | { | ||
9541 | this.onUninstallFieldSet = true; | ||
9542 | this.onUninstallField = value; | ||
9543 | } | ||
9544 | } | ||
9545 | |||
9546 | /// <summary> | ||
9547 | /// Indicates the installation will succeed even if the modified time of the file cannot be updated. The default is 'no'. | ||
9548 | /// </summary> | ||
9549 | public YesNoType Nonvital | ||
9550 | { | ||
9551 | get | ||
9552 | { | ||
9553 | return this.nonvitalField; | ||
9554 | } | ||
9555 | set | ||
9556 | { | ||
9557 | this.nonvitalFieldSet = true; | ||
9558 | this.nonvitalField = value; | ||
9559 | } | ||
9560 | } | ||
9561 | |||
9562 | public virtual ISchemaElement ParentElement | ||
9563 | { | ||
9564 | get | ||
9565 | { | ||
9566 | return this.parentElement; | ||
9567 | } | ||
9568 | set | ||
9569 | { | ||
9570 | this.parentElement = value; | ||
9571 | } | ||
9572 | } | ||
9573 | |||
9574 | /// <summary> | ||
9575 | /// Processes this element and all child elements into an XmlWriter. | ||
9576 | /// </summary> | ||
9577 | public virtual void OutputXml(XmlWriter writer) | ||
9578 | { | ||
9579 | if ((null == writer)) | ||
9580 | { | ||
9581 | throw new ArgumentNullException("writer"); | ||
9582 | } | ||
9583 | writer.WriteStartElement("TouchFile", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
9584 | if (this.idFieldSet) | ||
9585 | { | ||
9586 | writer.WriteAttributeString("Id", this.idField); | ||
9587 | } | ||
9588 | if (this.pathFieldSet) | ||
9589 | { | ||
9590 | writer.WriteAttributeString("Path", this.pathField); | ||
9591 | } | ||
9592 | if (this.onInstallFieldSet) | ||
9593 | { | ||
9594 | if ((this.onInstallField == YesNoType.no)) | ||
9595 | { | ||
9596 | writer.WriteAttributeString("OnInstall", "no"); | ||
9597 | } | ||
9598 | if ((this.onInstallField == YesNoType.yes)) | ||
9599 | { | ||
9600 | writer.WriteAttributeString("OnInstall", "yes"); | ||
9601 | } | ||
9602 | } | ||
9603 | if (this.onReinstallFieldSet) | ||
9604 | { | ||
9605 | if ((this.onReinstallField == YesNoType.no)) | ||
9606 | { | ||
9607 | writer.WriteAttributeString("OnReinstall", "no"); | ||
9608 | } | ||
9609 | if ((this.onReinstallField == YesNoType.yes)) | ||
9610 | { | ||
9611 | writer.WriteAttributeString("OnReinstall", "yes"); | ||
9612 | } | ||
9613 | } | ||
9614 | if (this.onUninstallFieldSet) | ||
9615 | { | ||
9616 | if ((this.onUninstallField == YesNoType.no)) | ||
9617 | { | ||
9618 | writer.WriteAttributeString("OnUninstall", "no"); | ||
9619 | } | ||
9620 | if ((this.onUninstallField == YesNoType.yes)) | ||
9621 | { | ||
9622 | writer.WriteAttributeString("OnUninstall", "yes"); | ||
9623 | } | ||
9624 | } | ||
9625 | if (this.nonvitalFieldSet) | ||
9626 | { | ||
9627 | if ((this.nonvitalField == YesNoType.no)) | ||
9628 | { | ||
9629 | writer.WriteAttributeString("Nonvital", "no"); | ||
9630 | } | ||
9631 | if ((this.nonvitalField == YesNoType.yes)) | ||
9632 | { | ||
9633 | writer.WriteAttributeString("Nonvital", "yes"); | ||
9634 | } | ||
9635 | } | ||
9636 | writer.WriteEndElement(); | ||
9637 | } | ||
9638 | |||
9639 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
9640 | void ISetAttributes.SetAttribute(string name, string value) | ||
9641 | { | ||
9642 | if (String.IsNullOrEmpty(name)) | ||
9643 | { | ||
9644 | throw new ArgumentNullException("name"); | ||
9645 | } | ||
9646 | if (("Id" == name)) | ||
9647 | { | ||
9648 | this.idField = value; | ||
9649 | this.idFieldSet = true; | ||
9650 | } | ||
9651 | if (("Path" == name)) | ||
9652 | { | ||
9653 | this.pathField = value; | ||
9654 | this.pathFieldSet = true; | ||
9655 | } | ||
9656 | if (("OnInstall" == name)) | ||
9657 | { | ||
9658 | this.onInstallField = Enums.ParseYesNoType(value); | ||
9659 | this.onInstallFieldSet = true; | ||
9660 | } | ||
9661 | if (("OnReinstall" == name)) | ||
9662 | { | ||
9663 | this.onReinstallField = Enums.ParseYesNoType(value); | ||
9664 | this.onReinstallFieldSet = true; | ||
9665 | } | ||
9666 | if (("OnUninstall" == name)) | ||
9667 | { | ||
9668 | this.onUninstallField = Enums.ParseYesNoType(value); | ||
9669 | this.onUninstallFieldSet = true; | ||
9670 | } | ||
9671 | if (("Nonvital" == name)) | ||
9672 | { | ||
9673 | this.nonvitalField = Enums.ParseYesNoType(value); | ||
9674 | this.nonvitalFieldSet = true; | ||
9675 | } | ||
9676 | } | ||
9677 | } | ||
9678 | |||
9679 | /// <summary> | ||
9680 | /// User for all kinds of things. When it is not nested under a component it is included in the MSI so it can be referenced by other elements such as the User attribute in the AppPool element. When it is nested under a Component element, the User will be created on install and can also be used for reference. | ||
9681 | /// </summary> | ||
9682 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
9683 | public class User : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes | ||
9684 | { | ||
9685 | |||
9686 | private ElementCollection children; | ||
9687 | |||
9688 | private string idField; | ||
9689 | |||
9690 | private bool idFieldSet; | ||
9691 | |||
9692 | private string nameField; | ||
9693 | |||
9694 | private bool nameFieldSet; | ||
9695 | |||
9696 | private string domainField; | ||
9697 | |||
9698 | private bool domainFieldSet; | ||
9699 | |||
9700 | private string passwordField; | ||
9701 | |||
9702 | private bool passwordFieldSet; | ||
9703 | |||
9704 | private YesNoType passwordNeverExpiresField; | ||
9705 | |||
9706 | private bool passwordNeverExpiresFieldSet; | ||
9707 | |||
9708 | private YesNoType canNotChangePasswordField; | ||
9709 | |||
9710 | private bool canNotChangePasswordFieldSet; | ||
9711 | |||
9712 | private YesNoType removeOnUninstallField; | ||
9713 | |||
9714 | private bool removeOnUninstallFieldSet; | ||
9715 | |||
9716 | private YesNoType failIfExistsField; | ||
9717 | |||
9718 | private bool failIfExistsFieldSet; | ||
9719 | |||
9720 | private YesNoType logonAsServiceField; | ||
9721 | |||
9722 | private bool logonAsServiceFieldSet; | ||
9723 | |||
9724 | private YesNoType logonAsBatchJobField; | ||
9725 | |||
9726 | private bool logonAsBatchJobFieldSet; | ||
9727 | |||
9728 | private YesNoType updateIfExistsField; | ||
9729 | |||
9730 | private bool updateIfExistsFieldSet; | ||
9731 | |||
9732 | private YesNoType passwordExpiredField; | ||
9733 | |||
9734 | private bool passwordExpiredFieldSet; | ||
9735 | |||
9736 | private YesNoType disabledField; | ||
9737 | |||
9738 | private bool disabledFieldSet; | ||
9739 | |||
9740 | private YesNoType createUserField; | ||
9741 | |||
9742 | private bool createUserFieldSet; | ||
9743 | |||
9744 | private YesNoType vitalField; | ||
9745 | |||
9746 | private bool vitalFieldSet; | ||
9747 | |||
9748 | private ISchemaElement parentElement; | ||
9749 | |||
9750 | public User() | ||
9751 | { | ||
9752 | ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); | ||
9753 | childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(GroupRef))); | ||
9754 | this.children = childCollection0; | ||
9755 | } | ||
9756 | |||
9757 | public virtual IEnumerable Children | ||
9758 | { | ||
9759 | get | ||
9760 | { | ||
9761 | return this.children; | ||
9762 | } | ||
9763 | } | ||
9764 | |||
9765 | [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] | ||
9766 | public virtual IEnumerable this[System.Type childType] | ||
9767 | { | ||
9768 | get | ||
9769 | { | ||
9770 | return this.children.Filter(childType); | ||
9771 | } | ||
9772 | } | ||
9773 | |||
9774 | public string Id | ||
9775 | { | ||
9776 | get | ||
9777 | { | ||
9778 | return this.idField; | ||
9779 | } | ||
9780 | set | ||
9781 | { | ||
9782 | this.idFieldSet = true; | ||
9783 | this.idField = value; | ||
9784 | } | ||
9785 | } | ||
9786 | |||
9787 | /// <summary> | ||
9788 | /// A | ||
9789 | /// </summary> | ||
9790 | public string Name | ||
9791 | { | ||
9792 | get | ||
9793 | { | ||
9794 | return this.nameField; | ||
9795 | } | ||
9796 | set | ||
9797 | { | ||
9798 | this.nameFieldSet = true; | ||
9799 | this.nameField = value; | ||
9800 | } | ||
9801 | } | ||
9802 | |||
9803 | /// <summary> | ||
9804 | /// A | ||
9805 | /// </summary> | ||
9806 | public string Domain | ||
9807 | { | ||
9808 | get | ||
9809 | { | ||
9810 | return this.domainField; | ||
9811 | } | ||
9812 | set | ||
9813 | { | ||
9814 | this.domainFieldSet = true; | ||
9815 | this.domainField = value; | ||
9816 | } | ||
9817 | } | ||
9818 | |||
9819 | /// <summary> | ||
9820 | /// Usually a Property that is passed in on the command-line to keep it more secure. | ||
9821 | /// </summary> | ||
9822 | public string Password | ||
9823 | { | ||
9824 | get | ||
9825 | { | ||
9826 | return this.passwordField; | ||
9827 | } | ||
9828 | set | ||
9829 | { | ||
9830 | this.passwordFieldSet = true; | ||
9831 | this.passwordField = value; | ||
9832 | } | ||
9833 | } | ||
9834 | |||
9835 | /// <summary> | ||
9836 | /// The account's password never expires. Equivalent to UF_DONT_EXPIRE_PASSWD. | ||
9837 | /// </summary> | ||
9838 | public YesNoType PasswordNeverExpires | ||
9839 | { | ||
9840 | get | ||
9841 | { | ||
9842 | return this.passwordNeverExpiresField; | ||
9843 | } | ||
9844 | set | ||
9845 | { | ||
9846 | this.passwordNeverExpiresFieldSet = true; | ||
9847 | this.passwordNeverExpiresField = value; | ||
9848 | } | ||
9849 | } | ||
9850 | |||
9851 | /// <summary> | ||
9852 | /// The user cannot change the account's password. Equivalent to UF_PASSWD_CANT_CHANGE. | ||
9853 | /// </summary> | ||
9854 | public YesNoType CanNotChangePassword | ||
9855 | { | ||
9856 | get | ||
9857 | { | ||
9858 | return this.canNotChangePasswordField; | ||
9859 | } | ||
9860 | set | ||
9861 | { | ||
9862 | this.canNotChangePasswordFieldSet = true; | ||
9863 | this.canNotChangePasswordField = value; | ||
9864 | } | ||
9865 | } | ||
9866 | |||
9867 | /// <summary> | ||
9868 | /// Indicates whether the user account should be removed or left behind on uninstall. | ||
9869 | /// </summary> | ||
9870 | public YesNoType RemoveOnUninstall | ||
9871 | { | ||
9872 | get | ||
9873 | { | ||
9874 | return this.removeOnUninstallField; | ||
9875 | } | ||
9876 | set | ||
9877 | { | ||
9878 | this.removeOnUninstallFieldSet = true; | ||
9879 | this.removeOnUninstallField = value; | ||
9880 | } | ||
9881 | } | ||
9882 | |||
9883 | /// <summary> | ||
9884 | /// Indicates if the install should fail if the user already exists. | ||
9885 | /// </summary> | ||
9886 | public YesNoType FailIfExists | ||
9887 | { | ||
9888 | get | ||
9889 | { | ||
9890 | return this.failIfExistsField; | ||
9891 | } | ||
9892 | set | ||
9893 | { | ||
9894 | this.failIfExistsFieldSet = true; | ||
9895 | this.failIfExistsField = value; | ||
9896 | } | ||
9897 | } | ||
9898 | |||
9899 | /// <summary> | ||
9900 | /// Indicates whether or not the user can logon as a serivce. User creation can be skipped if all that is desired is to set this access right on the user. | ||
9901 | /// </summary> | ||
9902 | public YesNoType LogonAsService | ||
9903 | { | ||
9904 | get | ||
9905 | { | ||
9906 | return this.logonAsServiceField; | ||
9907 | } | ||
9908 | set | ||
9909 | { | ||
9910 | this.logonAsServiceFieldSet = true; | ||
9911 | this.logonAsServiceField = value; | ||
9912 | } | ||
9913 | } | ||
9914 | |||
9915 | /// <summary> | ||
9916 | /// Indicates whether or not the user can logon as a batch job. User creation can be skipped if all that is desired is to set this access right on the user. | ||
9917 | /// </summary> | ||
9918 | public YesNoType LogonAsBatchJob | ||
9919 | { | ||
9920 | get | ||
9921 | { | ||
9922 | return this.logonAsBatchJobField; | ||
9923 | } | ||
9924 | set | ||
9925 | { | ||
9926 | this.logonAsBatchJobFieldSet = true; | ||
9927 | this.logonAsBatchJobField = value; | ||
9928 | } | ||
9929 | } | ||
9930 | |||
9931 | /// <summary> | ||
9932 | /// Indicates if the user account properties should be updated if the user already exists. | ||
9933 | /// </summary> | ||
9934 | public YesNoType UpdateIfExists | ||
9935 | { | ||
9936 | get | ||
9937 | { | ||
9938 | return this.updateIfExistsField; | ||
9939 | } | ||
9940 | set | ||
9941 | { | ||
9942 | this.updateIfExistsFieldSet = true; | ||
9943 | this.updateIfExistsField = value; | ||
9944 | } | ||
9945 | } | ||
9946 | |||
9947 | /// <summary> | ||
9948 | /// Indicates whether the user must change their password on their first login. | ||
9949 | /// </summary> | ||
9950 | public YesNoType PasswordExpired | ||
9951 | { | ||
9952 | get | ||
9953 | { | ||
9954 | return this.passwordExpiredField; | ||
9955 | } | ||
9956 | set | ||
9957 | { | ||
9958 | this.passwordExpiredFieldSet = true; | ||
9959 | this.passwordExpiredField = value; | ||
9960 | } | ||
9961 | } | ||
9962 | |||
9963 | /// <summary> | ||
9964 | /// The account is disabled. Equivalent to UF_ACCOUNTDISABLE. | ||
9965 | /// </summary> | ||
9966 | public YesNoType Disabled | ||
9967 | { | ||
9968 | get | ||
9969 | { | ||
9970 | return this.disabledField; | ||
9971 | } | ||
9972 | set | ||
9973 | { | ||
9974 | this.disabledFieldSet = true; | ||
9975 | this.disabledField = value; | ||
9976 | } | ||
9977 | } | ||
9978 | |||
9979 | /// <summary> | ||
9980 | /// Indicates whether or not to create the user. User creation can be skipped if all that is desired is to join a user to groups. | ||
9981 | /// </summary> | ||
9982 | public YesNoType CreateUser | ||
9983 | { | ||
9984 | get | ||
9985 | { | ||
9986 | return this.createUserField; | ||
9987 | } | ||
9988 | set | ||
9989 | { | ||
9990 | this.createUserFieldSet = true; | ||
9991 | this.createUserField = value; | ||
9992 | } | ||
9993 | } | ||
9994 | |||
9995 | /// <summary> | ||
9996 | /// Indicates whether failure to create the user or add the user to a group fails the installation. The default value is "yes". | ||
9997 | /// </summary> | ||
9998 | public YesNoType Vital | ||
9999 | { | ||
10000 | get | ||
10001 | { | ||
10002 | return this.vitalField; | ||
10003 | } | ||
10004 | set | ||
10005 | { | ||
10006 | this.vitalFieldSet = true; | ||
10007 | this.vitalField = value; | ||
10008 | } | ||
10009 | } | ||
10010 | |||
10011 | public virtual ISchemaElement ParentElement | ||
10012 | { | ||
10013 | get | ||
10014 | { | ||
10015 | return this.parentElement; | ||
10016 | } | ||
10017 | set | ||
10018 | { | ||
10019 | this.parentElement = value; | ||
10020 | } | ||
10021 | } | ||
10022 | |||
10023 | public virtual void AddChild(ISchemaElement child) | ||
10024 | { | ||
10025 | if ((null == child)) | ||
10026 | { | ||
10027 | throw new ArgumentNullException("child"); | ||
10028 | } | ||
10029 | this.children.AddElement(child); | ||
10030 | child.ParentElement = this; | ||
10031 | } | ||
10032 | |||
10033 | public virtual void RemoveChild(ISchemaElement child) | ||
10034 | { | ||
10035 | if ((null == child)) | ||
10036 | { | ||
10037 | throw new ArgumentNullException("child"); | ||
10038 | } | ||
10039 | this.children.RemoveElement(child); | ||
10040 | child.ParentElement = null; | ||
10041 | } | ||
10042 | |||
10043 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
10044 | ISchemaElement ICreateChildren.CreateChild(string childName) | ||
10045 | { | ||
10046 | if (String.IsNullOrEmpty(childName)) | ||
10047 | { | ||
10048 | throw new ArgumentNullException("childName"); | ||
10049 | } | ||
10050 | ISchemaElement childValue = null; | ||
10051 | if (("GroupRef" == childName)) | ||
10052 | { | ||
10053 | childValue = new GroupRef(); | ||
10054 | } | ||
10055 | if ((null == childValue)) | ||
10056 | { | ||
10057 | throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); | ||
10058 | } | ||
10059 | return childValue; | ||
10060 | } | ||
10061 | |||
10062 | /// <summary> | ||
10063 | /// Processes this element and all child elements into an XmlWriter. | ||
10064 | /// </summary> | ||
10065 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
10066 | public virtual void OutputXml(XmlWriter writer) | ||
10067 | { | ||
10068 | if ((null == writer)) | ||
10069 | { | ||
10070 | throw new ArgumentNullException("writer"); | ||
10071 | } | ||
10072 | writer.WriteStartElement("User", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
10073 | if (this.idFieldSet) | ||
10074 | { | ||
10075 | writer.WriteAttributeString("Id", this.idField); | ||
10076 | } | ||
10077 | if (this.nameFieldSet) | ||
10078 | { | ||
10079 | writer.WriteAttributeString("Name", this.nameField); | ||
10080 | } | ||
10081 | if (this.domainFieldSet) | ||
10082 | { | ||
10083 | writer.WriteAttributeString("Domain", this.domainField); | ||
10084 | } | ||
10085 | if (this.passwordFieldSet) | ||
10086 | { | ||
10087 | writer.WriteAttributeString("Password", this.passwordField); | ||
10088 | } | ||
10089 | if (this.passwordNeverExpiresFieldSet) | ||
10090 | { | ||
10091 | if ((this.passwordNeverExpiresField == YesNoType.no)) | ||
10092 | { | ||
10093 | writer.WriteAttributeString("PasswordNeverExpires", "no"); | ||
10094 | } | ||
10095 | if ((this.passwordNeverExpiresField == YesNoType.yes)) | ||
10096 | { | ||
10097 | writer.WriteAttributeString("PasswordNeverExpires", "yes"); | ||
10098 | } | ||
10099 | } | ||
10100 | if (this.canNotChangePasswordFieldSet) | ||
10101 | { | ||
10102 | if ((this.canNotChangePasswordField == YesNoType.no)) | ||
10103 | { | ||
10104 | writer.WriteAttributeString("CanNotChangePassword", "no"); | ||
10105 | } | ||
10106 | if ((this.canNotChangePasswordField == YesNoType.yes)) | ||
10107 | { | ||
10108 | writer.WriteAttributeString("CanNotChangePassword", "yes"); | ||
10109 | } | ||
10110 | } | ||
10111 | if (this.removeOnUninstallFieldSet) | ||
10112 | { | ||
10113 | if ((this.removeOnUninstallField == YesNoType.no)) | ||
10114 | { | ||
10115 | writer.WriteAttributeString("RemoveOnUninstall", "no"); | ||
10116 | } | ||
10117 | if ((this.removeOnUninstallField == YesNoType.yes)) | ||
10118 | { | ||
10119 | writer.WriteAttributeString("RemoveOnUninstall", "yes"); | ||
10120 | } | ||
10121 | } | ||
10122 | if (this.failIfExistsFieldSet) | ||
10123 | { | ||
10124 | if ((this.failIfExistsField == YesNoType.no)) | ||
10125 | { | ||
10126 | writer.WriteAttributeString("FailIfExists", "no"); | ||
10127 | } | ||
10128 | if ((this.failIfExistsField == YesNoType.yes)) | ||
10129 | { | ||
10130 | writer.WriteAttributeString("FailIfExists", "yes"); | ||
10131 | } | ||
10132 | } | ||
10133 | if (this.logonAsServiceFieldSet) | ||
10134 | { | ||
10135 | if ((this.logonAsServiceField == YesNoType.no)) | ||
10136 | { | ||
10137 | writer.WriteAttributeString("LogonAsService", "no"); | ||
10138 | } | ||
10139 | if ((this.logonAsServiceField == YesNoType.yes)) | ||
10140 | { | ||
10141 | writer.WriteAttributeString("LogonAsService", "yes"); | ||
10142 | } | ||
10143 | } | ||
10144 | if (this.logonAsBatchJobFieldSet) | ||
10145 | { | ||
10146 | if ((this.logonAsBatchJobField == YesNoType.no)) | ||
10147 | { | ||
10148 | writer.WriteAttributeString("LogonAsBatchJob", "no"); | ||
10149 | } | ||
10150 | if ((this.logonAsBatchJobField == YesNoType.yes)) | ||
10151 | { | ||
10152 | writer.WriteAttributeString("LogonAsBatchJob", "yes"); | ||
10153 | } | ||
10154 | } | ||
10155 | if (this.updateIfExistsFieldSet) | ||
10156 | { | ||
10157 | if ((this.updateIfExistsField == YesNoType.no)) | ||
10158 | { | ||
10159 | writer.WriteAttributeString("UpdateIfExists", "no"); | ||
10160 | } | ||
10161 | if ((this.updateIfExistsField == YesNoType.yes)) | ||
10162 | { | ||
10163 | writer.WriteAttributeString("UpdateIfExists", "yes"); | ||
10164 | } | ||
10165 | } | ||
10166 | if (this.passwordExpiredFieldSet) | ||
10167 | { | ||
10168 | if ((this.passwordExpiredField == YesNoType.no)) | ||
10169 | { | ||
10170 | writer.WriteAttributeString("PasswordExpired", "no"); | ||
10171 | } | ||
10172 | if ((this.passwordExpiredField == YesNoType.yes)) | ||
10173 | { | ||
10174 | writer.WriteAttributeString("PasswordExpired", "yes"); | ||
10175 | } | ||
10176 | } | ||
10177 | if (this.disabledFieldSet) | ||
10178 | { | ||
10179 | if ((this.disabledField == YesNoType.no)) | ||
10180 | { | ||
10181 | writer.WriteAttributeString("Disabled", "no"); | ||
10182 | } | ||
10183 | if ((this.disabledField == YesNoType.yes)) | ||
10184 | { | ||
10185 | writer.WriteAttributeString("Disabled", "yes"); | ||
10186 | } | ||
10187 | } | ||
10188 | if (this.createUserFieldSet) | ||
10189 | { | ||
10190 | if ((this.createUserField == YesNoType.no)) | ||
10191 | { | ||
10192 | writer.WriteAttributeString("CreateUser", "no"); | ||
10193 | } | ||
10194 | if ((this.createUserField == YesNoType.yes)) | ||
10195 | { | ||
10196 | writer.WriteAttributeString("CreateUser", "yes"); | ||
10197 | } | ||
10198 | } | ||
10199 | if (this.vitalFieldSet) | ||
10200 | { | ||
10201 | if ((this.vitalField == YesNoType.no)) | ||
10202 | { | ||
10203 | writer.WriteAttributeString("Vital", "no"); | ||
10204 | } | ||
10205 | if ((this.vitalField == YesNoType.yes)) | ||
10206 | { | ||
10207 | writer.WriteAttributeString("Vital", "yes"); | ||
10208 | } | ||
10209 | } | ||
10210 | for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) | ||
10211 | { | ||
10212 | ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); | ||
10213 | childElement.OutputXml(writer); | ||
10214 | } | ||
10215 | writer.WriteEndElement(); | ||
10216 | } | ||
10217 | |||
10218 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
10219 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
10220 | void ISetAttributes.SetAttribute(string name, string value) | ||
10221 | { | ||
10222 | if (String.IsNullOrEmpty(name)) | ||
10223 | { | ||
10224 | throw new ArgumentNullException("name"); | ||
10225 | } | ||
10226 | if (("Id" == name)) | ||
10227 | { | ||
10228 | this.idField = value; | ||
10229 | this.idFieldSet = true; | ||
10230 | } | ||
10231 | if (("Name" == name)) | ||
10232 | { | ||
10233 | this.nameField = value; | ||
10234 | this.nameFieldSet = true; | ||
10235 | } | ||
10236 | if (("Domain" == name)) | ||
10237 | { | ||
10238 | this.domainField = value; | ||
10239 | this.domainFieldSet = true; | ||
10240 | } | ||
10241 | if (("Password" == name)) | ||
10242 | { | ||
10243 | this.passwordField = value; | ||
10244 | this.passwordFieldSet = true; | ||
10245 | } | ||
10246 | if (("PasswordNeverExpires" == name)) | ||
10247 | { | ||
10248 | this.passwordNeverExpiresField = Enums.ParseYesNoType(value); | ||
10249 | this.passwordNeverExpiresFieldSet = true; | ||
10250 | } | ||
10251 | if (("CanNotChangePassword" == name)) | ||
10252 | { | ||
10253 | this.canNotChangePasswordField = Enums.ParseYesNoType(value); | ||
10254 | this.canNotChangePasswordFieldSet = true; | ||
10255 | } | ||
10256 | if (("RemoveOnUninstall" == name)) | ||
10257 | { | ||
10258 | this.removeOnUninstallField = Enums.ParseYesNoType(value); | ||
10259 | this.removeOnUninstallFieldSet = true; | ||
10260 | } | ||
10261 | if (("FailIfExists" == name)) | ||
10262 | { | ||
10263 | this.failIfExistsField = Enums.ParseYesNoType(value); | ||
10264 | this.failIfExistsFieldSet = true; | ||
10265 | } | ||
10266 | if (("LogonAsService" == name)) | ||
10267 | { | ||
10268 | this.logonAsServiceField = Enums.ParseYesNoType(value); | ||
10269 | this.logonAsServiceFieldSet = true; | ||
10270 | } | ||
10271 | if (("LogonAsBatchJob" == name)) | ||
10272 | { | ||
10273 | this.logonAsBatchJobField = Enums.ParseYesNoType(value); | ||
10274 | this.logonAsBatchJobFieldSet = true; | ||
10275 | } | ||
10276 | if (("UpdateIfExists" == name)) | ||
10277 | { | ||
10278 | this.updateIfExistsField = Enums.ParseYesNoType(value); | ||
10279 | this.updateIfExistsFieldSet = true; | ||
10280 | } | ||
10281 | if (("PasswordExpired" == name)) | ||
10282 | { | ||
10283 | this.passwordExpiredField = Enums.ParseYesNoType(value); | ||
10284 | this.passwordExpiredFieldSet = true; | ||
10285 | } | ||
10286 | if (("Disabled" == name)) | ||
10287 | { | ||
10288 | this.disabledField = Enums.ParseYesNoType(value); | ||
10289 | this.disabledFieldSet = true; | ||
10290 | } | ||
10291 | if (("CreateUser" == name)) | ||
10292 | { | ||
10293 | this.createUserField = Enums.ParseYesNoType(value); | ||
10294 | this.createUserFieldSet = true; | ||
10295 | } | ||
10296 | if (("Vital" == name)) | ||
10297 | { | ||
10298 | this.vitalField = Enums.ParseYesNoType(value); | ||
10299 | this.vitalFieldSet = true; | ||
10300 | } | ||
10301 | } | ||
10302 | } | ||
10303 | |||
10304 | /// <summary> | ||
10305 | /// Adds or removes .xml file entries. If you use the XmlFile element you must reference WixUtilExtension.dll as it contains the XmlFile custom actions. | ||
10306 | /// </summary> | ||
10307 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
10308 | public class XmlFile : ISchemaElement, ISetAttributes | ||
10309 | { | ||
10310 | |||
10311 | private string idField; | ||
10312 | |||
10313 | private bool idFieldSet; | ||
10314 | |||
10315 | private string elementPathField; | ||
10316 | |||
10317 | private bool elementPathFieldSet; | ||
10318 | |||
10319 | private string fileField; | ||
10320 | |||
10321 | private bool fileFieldSet; | ||
10322 | |||
10323 | private string nameField; | ||
10324 | |||
10325 | private bool nameFieldSet; | ||
10326 | |||
10327 | private string valueField; | ||
10328 | |||
10329 | private bool valueFieldSet; | ||
10330 | |||
10331 | private ActionType actionField; | ||
10332 | |||
10333 | private bool actionFieldSet; | ||
10334 | |||
10335 | private YesNoType permanentField; | ||
10336 | |||
10337 | private bool permanentFieldSet; | ||
10338 | |||
10339 | private YesNoType preserveModifiedDateField; | ||
10340 | |||
10341 | private bool preserveModifiedDateFieldSet; | ||
10342 | |||
10343 | private int sequenceField; | ||
10344 | |||
10345 | private bool sequenceFieldSet; | ||
10346 | |||
10347 | private SelectionLanguageType selectionLanguageField; | ||
10348 | |||
10349 | private bool selectionLanguageFieldSet; | ||
10350 | |||
10351 | private ISchemaElement parentElement; | ||
10352 | |||
10353 | /// <summary> | ||
10354 | /// Identifier for xml file modification. | ||
10355 | /// </summary> | ||
10356 | public string Id | ||
10357 | { | ||
10358 | get | ||
10359 | { | ||
10360 | return this.idField; | ||
10361 | } | ||
10362 | set | ||
10363 | { | ||
10364 | this.idFieldSet = true; | ||
10365 | this.idField = value; | ||
10366 | } | ||
10367 | } | ||
10368 | |||
10369 | /// <summary> | ||
10370 | /// The XPath of the element to be modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. | ||
10371 | /// </summary> | ||
10372 | public string ElementPath | ||
10373 | { | ||
10374 | get | ||
10375 | { | ||
10376 | return this.elementPathField; | ||
10377 | } | ||
10378 | set | ||
10379 | { | ||
10380 | this.elementPathFieldSet = true; | ||
10381 | this.elementPathField = value; | ||
10382 | } | ||
10383 | } | ||
10384 | |||
10385 | /// <summary> | ||
10386 | /// Path of the .xml file to configure. | ||
10387 | /// </summary> | ||
10388 | public string File | ||
10389 | { | ||
10390 | get | ||
10391 | { | ||
10392 | return this.fileField; | ||
10393 | } | ||
10394 | set | ||
10395 | { | ||
10396 | this.fileFieldSet = true; | ||
10397 | this.fileField = value; | ||
10398 | } | ||
10399 | } | ||
10400 | |||
10401 | /// <summary> | ||
10402 | /// Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set. | ||
10403 | /// </summary> | ||
10404 | public string Name | ||
10405 | { | ||
10406 | get | ||
10407 | { | ||
10408 | return this.nameField; | ||
10409 | } | ||
10410 | set | ||
10411 | { | ||
10412 | this.nameFieldSet = true; | ||
10413 | this.nameField = value; | ||
10414 | } | ||
10415 | } | ||
10416 | |||
10417 | /// <summary> | ||
10418 | /// The value to be written. See the | ||
10419 | /// </summary> | ||
10420 | public string Value | ||
10421 | { | ||
10422 | get | ||
10423 | { | ||
10424 | return this.valueField; | ||
10425 | } | ||
10426 | set | ||
10427 | { | ||
10428 | this.valueFieldSet = true; | ||
10429 | this.valueField = value; | ||
10430 | } | ||
10431 | } | ||
10432 | |||
10433 | /// <summary> | ||
10434 | /// The type of modification to be made to the XML file when the component is installed. | ||
10435 | /// </summary> | ||
10436 | public ActionType Action | ||
10437 | { | ||
10438 | get | ||
10439 | { | ||
10440 | return this.actionField; | ||
10441 | } | ||
10442 | set | ||
10443 | { | ||
10444 | this.actionFieldSet = true; | ||
10445 | this.actionField = value; | ||
10446 | } | ||
10447 | } | ||
10448 | |||
10449 | /// <summary> | ||
10450 | /// Specifies whether or not the modification should be removed on uninstall. This has no effect on uninstall if the action was deleteValue. | ||
10451 | /// </summary> | ||
10452 | public YesNoType Permanent | ||
10453 | { | ||
10454 | get | ||
10455 | { | ||
10456 | return this.permanentField; | ||
10457 | } | ||
10458 | set | ||
10459 | { | ||
10460 | this.permanentFieldSet = true; | ||
10461 | this.permanentField = value; | ||
10462 | } | ||
10463 | } | ||
10464 | |||
10465 | /// <summary> | ||
10466 | /// Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made. | ||
10467 | /// </summary> | ||
10468 | public YesNoType PreserveModifiedDate | ||
10469 | { | ||
10470 | get | ||
10471 | { | ||
10472 | return this.preserveModifiedDateField; | ||
10473 | } | ||
10474 | set | ||
10475 | { | ||
10476 | this.preserveModifiedDateFieldSet = true; | ||
10477 | this.preserveModifiedDateField = value; | ||
10478 | } | ||
10479 | } | ||
10480 | |||
10481 | /// <summary> | ||
10482 | /// Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them. | ||
10483 | /// </summary> | ||
10484 | public int Sequence | ||
10485 | { | ||
10486 | get | ||
10487 | { | ||
10488 | return this.sequenceField; | ||
10489 | } | ||
10490 | set | ||
10491 | { | ||
10492 | this.sequenceFieldSet = true; | ||
10493 | this.sequenceField = value; | ||
10494 | } | ||
10495 | } | ||
10496 | |||
10497 | /// <summary> | ||
10498 | /// Specify whether the DOM object should use XPath language or the old XSLPattern language (default) as the query language. | ||
10499 | /// </summary> | ||
10500 | public SelectionLanguageType SelectionLanguage | ||
10501 | { | ||
10502 | get | ||
10503 | { | ||
10504 | return this.selectionLanguageField; | ||
10505 | } | ||
10506 | set | ||
10507 | { | ||
10508 | this.selectionLanguageFieldSet = true; | ||
10509 | this.selectionLanguageField = value; | ||
10510 | } | ||
10511 | } | ||
10512 | |||
10513 | public virtual ISchemaElement ParentElement | ||
10514 | { | ||
10515 | get | ||
10516 | { | ||
10517 | return this.parentElement; | ||
10518 | } | ||
10519 | set | ||
10520 | { | ||
10521 | this.parentElement = value; | ||
10522 | } | ||
10523 | } | ||
10524 | |||
10525 | /// <summary> | ||
10526 | /// Parses a ActionType from a string. | ||
10527 | /// </summary> | ||
10528 | public static ActionType ParseActionType(string value) | ||
10529 | { | ||
10530 | ActionType parsedValue; | ||
10531 | XmlFile.TryParseActionType(value, out parsedValue); | ||
10532 | return parsedValue; | ||
10533 | } | ||
10534 | |||
10535 | /// <summary> | ||
10536 | /// Tries to parse a ActionType from a string. | ||
10537 | /// </summary> | ||
10538 | public static bool TryParseActionType(string value, out ActionType parsedValue) | ||
10539 | { | ||
10540 | parsedValue = ActionType.NotSet; | ||
10541 | if (string.IsNullOrEmpty(value)) | ||
10542 | { | ||
10543 | return false; | ||
10544 | } | ||
10545 | if (("createElement" == value)) | ||
10546 | { | ||
10547 | parsedValue = ActionType.createElement; | ||
10548 | } | ||
10549 | else | ||
10550 | { | ||
10551 | if (("deleteValue" == value)) | ||
10552 | { | ||
10553 | parsedValue = ActionType.deleteValue; | ||
10554 | } | ||
10555 | else | ||
10556 | { | ||
10557 | if (("setValue" == value)) | ||
10558 | { | ||
10559 | parsedValue = ActionType.setValue; | ||
10560 | } | ||
10561 | else | ||
10562 | { | ||
10563 | if (("bulkSetValue" == value)) | ||
10564 | { | ||
10565 | parsedValue = ActionType.bulkSetValue; | ||
10566 | } | ||
10567 | else | ||
10568 | { | ||
10569 | parsedValue = ActionType.IllegalValue; | ||
10570 | return false; | ||
10571 | } | ||
10572 | } | ||
10573 | } | ||
10574 | } | ||
10575 | return true; | ||
10576 | } | ||
10577 | |||
10578 | /// <summary> | ||
10579 | /// Parses a SelectionLanguageType from a string. | ||
10580 | /// </summary> | ||
10581 | public static SelectionLanguageType ParseSelectionLanguageType(string value) | ||
10582 | { | ||
10583 | SelectionLanguageType parsedValue; | ||
10584 | XmlFile.TryParseSelectionLanguageType(value, out parsedValue); | ||
10585 | return parsedValue; | ||
10586 | } | ||
10587 | |||
10588 | /// <summary> | ||
10589 | /// Tries to parse a SelectionLanguageType from a string. | ||
10590 | /// </summary> | ||
10591 | public static bool TryParseSelectionLanguageType(string value, out SelectionLanguageType parsedValue) | ||
10592 | { | ||
10593 | parsedValue = SelectionLanguageType.NotSet; | ||
10594 | if (string.IsNullOrEmpty(value)) | ||
10595 | { | ||
10596 | return false; | ||
10597 | } | ||
10598 | if (("XPath" == value)) | ||
10599 | { | ||
10600 | parsedValue = SelectionLanguageType.XPath; | ||
10601 | } | ||
10602 | else | ||
10603 | { | ||
10604 | if (("XSLPattern" == value)) | ||
10605 | { | ||
10606 | parsedValue = SelectionLanguageType.XSLPattern; | ||
10607 | } | ||
10608 | else | ||
10609 | { | ||
10610 | parsedValue = SelectionLanguageType.IllegalValue; | ||
10611 | return false; | ||
10612 | } | ||
10613 | } | ||
10614 | return true; | ||
10615 | } | ||
10616 | |||
10617 | /// <summary> | ||
10618 | /// Processes this element and all child elements into an XmlWriter. | ||
10619 | /// </summary> | ||
10620 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
10621 | public virtual void OutputXml(XmlWriter writer) | ||
10622 | { | ||
10623 | if ((null == writer)) | ||
10624 | { | ||
10625 | throw new ArgumentNullException("writer"); | ||
10626 | } | ||
10627 | writer.WriteStartElement("XmlFile", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
10628 | if (this.idFieldSet) | ||
10629 | { | ||
10630 | writer.WriteAttributeString("Id", this.idField); | ||
10631 | } | ||
10632 | if (this.elementPathFieldSet) | ||
10633 | { | ||
10634 | writer.WriteAttributeString("ElementPath", this.elementPathField); | ||
10635 | } | ||
10636 | if (this.fileFieldSet) | ||
10637 | { | ||
10638 | writer.WriteAttributeString("File", this.fileField); | ||
10639 | } | ||
10640 | if (this.nameFieldSet) | ||
10641 | { | ||
10642 | writer.WriteAttributeString("Name", this.nameField); | ||
10643 | } | ||
10644 | if (this.valueFieldSet) | ||
10645 | { | ||
10646 | writer.WriteAttributeString("Value", this.valueField); | ||
10647 | } | ||
10648 | if (this.actionFieldSet) | ||
10649 | { | ||
10650 | if ((this.actionField == ActionType.createElement)) | ||
10651 | { | ||
10652 | writer.WriteAttributeString("Action", "createElement"); | ||
10653 | } | ||
10654 | if ((this.actionField == ActionType.deleteValue)) | ||
10655 | { | ||
10656 | writer.WriteAttributeString("Action", "deleteValue"); | ||
10657 | } | ||
10658 | if ((this.actionField == ActionType.setValue)) | ||
10659 | { | ||
10660 | writer.WriteAttributeString("Action", "setValue"); | ||
10661 | } | ||
10662 | if ((this.actionField == ActionType.bulkSetValue)) | ||
10663 | { | ||
10664 | writer.WriteAttributeString("Action", "bulkSetValue"); | ||
10665 | } | ||
10666 | } | ||
10667 | if (this.permanentFieldSet) | ||
10668 | { | ||
10669 | if ((this.permanentField == YesNoType.no)) | ||
10670 | { | ||
10671 | writer.WriteAttributeString("Permanent", "no"); | ||
10672 | } | ||
10673 | if ((this.permanentField == YesNoType.yes)) | ||
10674 | { | ||
10675 | writer.WriteAttributeString("Permanent", "yes"); | ||
10676 | } | ||
10677 | } | ||
10678 | if (this.preserveModifiedDateFieldSet) | ||
10679 | { | ||
10680 | if ((this.preserveModifiedDateField == YesNoType.no)) | ||
10681 | { | ||
10682 | writer.WriteAttributeString("PreserveModifiedDate", "no"); | ||
10683 | } | ||
10684 | if ((this.preserveModifiedDateField == YesNoType.yes)) | ||
10685 | { | ||
10686 | writer.WriteAttributeString("PreserveModifiedDate", "yes"); | ||
10687 | } | ||
10688 | } | ||
10689 | if (this.sequenceFieldSet) | ||
10690 | { | ||
10691 | writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); | ||
10692 | } | ||
10693 | if (this.selectionLanguageFieldSet) | ||
10694 | { | ||
10695 | if ((this.selectionLanguageField == SelectionLanguageType.XPath)) | ||
10696 | { | ||
10697 | writer.WriteAttributeString("SelectionLanguage", "XPath"); | ||
10698 | } | ||
10699 | if ((this.selectionLanguageField == SelectionLanguageType.XSLPattern)) | ||
10700 | { | ||
10701 | writer.WriteAttributeString("SelectionLanguage", "XSLPattern"); | ||
10702 | } | ||
10703 | } | ||
10704 | writer.WriteEndElement(); | ||
10705 | } | ||
10706 | |||
10707 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
10708 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
10709 | void ISetAttributes.SetAttribute(string name, string value) | ||
10710 | { | ||
10711 | if (String.IsNullOrEmpty(name)) | ||
10712 | { | ||
10713 | throw new ArgumentNullException("name"); | ||
10714 | } | ||
10715 | if (("Id" == name)) | ||
10716 | { | ||
10717 | this.idField = value; | ||
10718 | this.idFieldSet = true; | ||
10719 | } | ||
10720 | if (("ElementPath" == name)) | ||
10721 | { | ||
10722 | this.elementPathField = value; | ||
10723 | this.elementPathFieldSet = true; | ||
10724 | } | ||
10725 | if (("File" == name)) | ||
10726 | { | ||
10727 | this.fileField = value; | ||
10728 | this.fileFieldSet = true; | ||
10729 | } | ||
10730 | if (("Name" == name)) | ||
10731 | { | ||
10732 | this.nameField = value; | ||
10733 | this.nameFieldSet = true; | ||
10734 | } | ||
10735 | if (("Value" == name)) | ||
10736 | { | ||
10737 | this.valueField = value; | ||
10738 | this.valueFieldSet = true; | ||
10739 | } | ||
10740 | if (("Action" == name)) | ||
10741 | { | ||
10742 | this.actionField = XmlFile.ParseActionType(value); | ||
10743 | this.actionFieldSet = true; | ||
10744 | } | ||
10745 | if (("Permanent" == name)) | ||
10746 | { | ||
10747 | this.permanentField = Enums.ParseYesNoType(value); | ||
10748 | this.permanentFieldSet = true; | ||
10749 | } | ||
10750 | if (("PreserveModifiedDate" == name)) | ||
10751 | { | ||
10752 | this.preserveModifiedDateField = Enums.ParseYesNoType(value); | ||
10753 | this.preserveModifiedDateFieldSet = true; | ||
10754 | } | ||
10755 | if (("Sequence" == name)) | ||
10756 | { | ||
10757 | this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
10758 | this.sequenceFieldSet = true; | ||
10759 | } | ||
10760 | if (("SelectionLanguage" == name)) | ||
10761 | { | ||
10762 | this.selectionLanguageField = XmlFile.ParseSelectionLanguageType(value); | ||
10763 | this.selectionLanguageFieldSet = true; | ||
10764 | } | ||
10765 | } | ||
10766 | |||
10767 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
10768 | public enum ActionType | ||
10769 | { | ||
10770 | |||
10771 | IllegalValue = int.MaxValue, | ||
10772 | |||
10773 | NotSet = -1, | ||
10774 | |||
10775 | /// <summary> | ||
10776 | /// Creates a new element under the element specified in ElementPath. The Name attribute is required in this case and specifies the name of the new element. The Value attribute is not necessary when createElement is specified as the action. If the Value attribute is set, it will cause the new element's text value to be set. | ||
10777 | /// </summary> | ||
10778 | createElement, | ||
10779 | |||
10780 | /// <summary> | ||
10781 | /// Deletes a value from the element specified in the ElementPath. If Name is specified, the attribute with that name is deleted. If Name is not specified, the text value of the element specified in the ElementPath is deleted. The Value attribute is ignored if deleteValue is the action specified. | ||
10782 | /// </summary> | ||
10783 | deleteValue, | ||
10784 | |||
10785 | /// <summary> | ||
10786 | /// Sets a value in the element specified in the ElementPath. If Name is specified, and attribute with that name is set to the value specified in Value. If Name is not specified, the text value of the element is set. Value is a required attribute if setValue is the action specified. | ||
10787 | /// </summary> | ||
10788 | setValue, | ||
10789 | |||
10790 | /// <summary> | ||
10791 | /// Sets all the values in the elements that match the ElementPath. If Name is specified, attributes with that name are set to the same value specified in Value. If Name is not specified, the text values of the elements are set. Value is a required attribute if setBulkValue is the action specified. | ||
10792 | /// </summary> | ||
10793 | bulkSetValue, | ||
10794 | } | ||
10795 | |||
10796 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
10797 | public enum SelectionLanguageType | ||
10798 | { | ||
10799 | |||
10800 | IllegalValue = int.MaxValue, | ||
10801 | |||
10802 | NotSet = -1, | ||
10803 | |||
10804 | XPath, | ||
10805 | |||
10806 | XSLPattern, | ||
10807 | } | ||
10808 | } | ||
10809 | |||
10810 | /// <summary> | ||
10811 | /// Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions. | ||
10812 | /// </summary> | ||
10813 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
10814 | public class XmlConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes | ||
10815 | { | ||
10816 | |||
10817 | private ElementCollection children; | ||
10818 | |||
10819 | private string idField; | ||
10820 | |||
10821 | private bool idFieldSet; | ||
10822 | |||
10823 | private ActionType actionField; | ||
10824 | |||
10825 | private bool actionFieldSet; | ||
10826 | |||
10827 | private string elementIdField; | ||
10828 | |||
10829 | private bool elementIdFieldSet; | ||
10830 | |||
10831 | private string elementPathField; | ||
10832 | |||
10833 | private bool elementPathFieldSet; | ||
10834 | |||
10835 | private string fileField; | ||
10836 | |||
10837 | private bool fileFieldSet; | ||
10838 | |||
10839 | private string nameField; | ||
10840 | |||
10841 | private bool nameFieldSet; | ||
10842 | |||
10843 | private NodeType nodeField; | ||
10844 | |||
10845 | private bool nodeFieldSet; | ||
10846 | |||
10847 | private OnType onField; | ||
10848 | |||
10849 | private bool onFieldSet; | ||
10850 | |||
10851 | private YesNoType preserveModifiedDateField; | ||
10852 | |||
10853 | private bool preserveModifiedDateFieldSet; | ||
10854 | |||
10855 | private int sequenceField; | ||
10856 | |||
10857 | private bool sequenceFieldSet; | ||
10858 | |||
10859 | private string valueField; | ||
10860 | |||
10861 | private bool valueFieldSet; | ||
10862 | |||
10863 | private string verifyPathField; | ||
10864 | |||
10865 | private bool verifyPathFieldSet; | ||
10866 | |||
10867 | private ISchemaElement parentElement; | ||
10868 | |||
10869 | public XmlConfig() | ||
10870 | { | ||
10871 | ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); | ||
10872 | childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(XmlConfig))); | ||
10873 | this.children = childCollection0; | ||
10874 | } | ||
10875 | |||
10876 | public virtual IEnumerable Children | ||
10877 | { | ||
10878 | get | ||
10879 | { | ||
10880 | return this.children; | ||
10881 | } | ||
10882 | } | ||
10883 | |||
10884 | [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] | ||
10885 | public virtual IEnumerable this[System.Type childType] | ||
10886 | { | ||
10887 | get | ||
10888 | { | ||
10889 | return this.children.Filter(childType); | ||
10890 | } | ||
10891 | } | ||
10892 | |||
10893 | /// <summary> | ||
10894 | /// Identifier for xml file modification. | ||
10895 | /// </summary> | ||
10896 | public string Id | ||
10897 | { | ||
10898 | get | ||
10899 | { | ||
10900 | return this.idField; | ||
10901 | } | ||
10902 | set | ||
10903 | { | ||
10904 | this.idFieldSet = true; | ||
10905 | this.idField = value; | ||
10906 | } | ||
10907 | } | ||
10908 | |||
10909 | public ActionType Action | ||
10910 | { | ||
10911 | get | ||
10912 | { | ||
10913 | return this.actionField; | ||
10914 | } | ||
10915 | set | ||
10916 | { | ||
10917 | this.actionFieldSet = true; | ||
10918 | this.actionField = value; | ||
10919 | } | ||
10920 | } | ||
10921 | |||
10922 | /// <summary> | ||
10923 | /// The Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted. | ||
10924 | /// </summary> | ||
10925 | public string ElementId | ||
10926 | { | ||
10927 | get | ||
10928 | { | ||
10929 | return this.elementIdField; | ||
10930 | } | ||
10931 | set | ||
10932 | { | ||
10933 | this.elementIdFieldSet = true; | ||
10934 | this.elementIdField = value; | ||
10935 | } | ||
10936 | } | ||
10937 | |||
10938 | /// <summary> | ||
10939 | /// The XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. | ||
10940 | /// </summary> | ||
10941 | public string ElementPath | ||
10942 | { | ||
10943 | get | ||
10944 | { | ||
10945 | return this.elementPathField; | ||
10946 | } | ||
10947 | set | ||
10948 | { | ||
10949 | this.elementPathFieldSet = true; | ||
10950 | this.elementPathField = value; | ||
10951 | } | ||
10952 | } | ||
10953 | |||
10954 | /// <summary> | ||
10955 | /// Path of the .xml file to configure. | ||
10956 | /// </summary> | ||
10957 | public string File | ||
10958 | { | ||
10959 | get | ||
10960 | { | ||
10961 | return this.fileField; | ||
10962 | } | ||
10963 | set | ||
10964 | { | ||
10965 | this.fileFieldSet = true; | ||
10966 | this.fileField = value; | ||
10967 | } | ||
10968 | } | ||
10969 | |||
10970 | /// <summary> | ||
10971 | /// Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set. | ||
10972 | /// </summary> | ||
10973 | public string Name | ||
10974 | { | ||
10975 | get | ||
10976 | { | ||
10977 | return this.nameField; | ||
10978 | } | ||
10979 | set | ||
10980 | { | ||
10981 | this.nameFieldSet = true; | ||
10982 | this.nameField = value; | ||
10983 | } | ||
10984 | } | ||
10985 | |||
10986 | public NodeType Node | ||
10987 | { | ||
10988 | get | ||
10989 | { | ||
10990 | return this.nodeField; | ||
10991 | } | ||
10992 | set | ||
10993 | { | ||
10994 | this.nodeFieldSet = true; | ||
10995 | this.nodeField = value; | ||
10996 | } | ||
10997 | } | ||
10998 | |||
10999 | public OnType On | ||
11000 | { | ||
11001 | get | ||
11002 | { | ||
11003 | return this.onField; | ||
11004 | } | ||
11005 | set | ||
11006 | { | ||
11007 | this.onFieldSet = true; | ||
11008 | this.onField = value; | ||
11009 | } | ||
11010 | } | ||
11011 | |||
11012 | /// <summary> | ||
11013 | /// Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made. | ||
11014 | /// </summary> | ||
11015 | public YesNoType PreserveModifiedDate | ||
11016 | { | ||
11017 | get | ||
11018 | { | ||
11019 | return this.preserveModifiedDateField; | ||
11020 | } | ||
11021 | set | ||
11022 | { | ||
11023 | this.preserveModifiedDateFieldSet = true; | ||
11024 | this.preserveModifiedDateField = value; | ||
11025 | } | ||
11026 | } | ||
11027 | |||
11028 | /// <summary> | ||
11029 | /// Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them. | ||
11030 | /// </summary> | ||
11031 | public int Sequence | ||
11032 | { | ||
11033 | get | ||
11034 | { | ||
11035 | return this.sequenceField; | ||
11036 | } | ||
11037 | set | ||
11038 | { | ||
11039 | this.sequenceFieldSet = true; | ||
11040 | this.sequenceField = value; | ||
11041 | } | ||
11042 | } | ||
11043 | |||
11044 | /// <summary> | ||
11045 | /// The value to be written. See the | ||
11046 | /// </summary> | ||
11047 | public string Value | ||
11048 | { | ||
11049 | get | ||
11050 | { | ||
11051 | return this.valueField; | ||
11052 | } | ||
11053 | set | ||
11054 | { | ||
11055 | this.valueFieldSet = true; | ||
11056 | this.valueField = value; | ||
11057 | } | ||
11058 | } | ||
11059 | |||
11060 | /// <summary> | ||
11061 | /// The XPath to the element being modified. This is required for 'delete' actions. For 'create' actions, VerifyPath is used to decide if the element already exists. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. | ||
11062 | /// </summary> | ||
11063 | public string VerifyPath | ||
11064 | { | ||
11065 | get | ||
11066 | { | ||
11067 | return this.verifyPathField; | ||
11068 | } | ||
11069 | set | ||
11070 | { | ||
11071 | this.verifyPathFieldSet = true; | ||
11072 | this.verifyPathField = value; | ||
11073 | } | ||
11074 | } | ||
11075 | |||
11076 | public virtual ISchemaElement ParentElement | ||
11077 | { | ||
11078 | get | ||
11079 | { | ||
11080 | return this.parentElement; | ||
11081 | } | ||
11082 | set | ||
11083 | { | ||
11084 | this.parentElement = value; | ||
11085 | } | ||
11086 | } | ||
11087 | |||
11088 | public virtual void AddChild(ISchemaElement child) | ||
11089 | { | ||
11090 | if ((null == child)) | ||
11091 | { | ||
11092 | throw new ArgumentNullException("child"); | ||
11093 | } | ||
11094 | this.children.AddElement(child); | ||
11095 | child.ParentElement = this; | ||
11096 | } | ||
11097 | |||
11098 | public virtual void RemoveChild(ISchemaElement child) | ||
11099 | { | ||
11100 | if ((null == child)) | ||
11101 | { | ||
11102 | throw new ArgumentNullException("child"); | ||
11103 | } | ||
11104 | this.children.RemoveElement(child); | ||
11105 | child.ParentElement = null; | ||
11106 | } | ||
11107 | |||
11108 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
11109 | ISchemaElement ICreateChildren.CreateChild(string childName) | ||
11110 | { | ||
11111 | if (String.IsNullOrEmpty(childName)) | ||
11112 | { | ||
11113 | throw new ArgumentNullException("childName"); | ||
11114 | } | ||
11115 | ISchemaElement childValue = null; | ||
11116 | if (("XmlConfig" == childName)) | ||
11117 | { | ||
11118 | childValue = new XmlConfig(); | ||
11119 | } | ||
11120 | if ((null == childValue)) | ||
11121 | { | ||
11122 | throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); | ||
11123 | } | ||
11124 | return childValue; | ||
11125 | } | ||
11126 | |||
11127 | /// <summary> | ||
11128 | /// Parses a ActionType from a string. | ||
11129 | /// </summary> | ||
11130 | public static ActionType ParseActionType(string value) | ||
11131 | { | ||
11132 | ActionType parsedValue; | ||
11133 | XmlConfig.TryParseActionType(value, out parsedValue); | ||
11134 | return parsedValue; | ||
11135 | } | ||
11136 | |||
11137 | /// <summary> | ||
11138 | /// Tries to parse a ActionType from a string. | ||
11139 | /// </summary> | ||
11140 | public static bool TryParseActionType(string value, out ActionType parsedValue) | ||
11141 | { | ||
11142 | parsedValue = ActionType.NotSet; | ||
11143 | if (string.IsNullOrEmpty(value)) | ||
11144 | { | ||
11145 | return false; | ||
11146 | } | ||
11147 | if (("create" == value)) | ||
11148 | { | ||
11149 | parsedValue = ActionType.create; | ||
11150 | } | ||
11151 | else | ||
11152 | { | ||
11153 | if (("delete" == value)) | ||
11154 | { | ||
11155 | parsedValue = ActionType.delete; | ||
11156 | } | ||
11157 | else | ||
11158 | { | ||
11159 | parsedValue = ActionType.IllegalValue; | ||
11160 | return false; | ||
11161 | } | ||
11162 | } | ||
11163 | return true; | ||
11164 | } | ||
11165 | |||
11166 | /// <summary> | ||
11167 | /// Parses a NodeType from a string. | ||
11168 | /// </summary> | ||
11169 | public static NodeType ParseNodeType(string value) | ||
11170 | { | ||
11171 | NodeType parsedValue; | ||
11172 | XmlConfig.TryParseNodeType(value, out parsedValue); | ||
11173 | return parsedValue; | ||
11174 | } | ||
11175 | |||
11176 | /// <summary> | ||
11177 | /// Tries to parse a NodeType from a string. | ||
11178 | /// </summary> | ||
11179 | public static bool TryParseNodeType(string value, out NodeType parsedValue) | ||
11180 | { | ||
11181 | parsedValue = NodeType.NotSet; | ||
11182 | if (string.IsNullOrEmpty(value)) | ||
11183 | { | ||
11184 | return false; | ||
11185 | } | ||
11186 | if (("element" == value)) | ||
11187 | { | ||
11188 | parsedValue = NodeType.element; | ||
11189 | } | ||
11190 | else | ||
11191 | { | ||
11192 | if (("value" == value)) | ||
11193 | { | ||
11194 | parsedValue = NodeType.value; | ||
11195 | } | ||
11196 | else | ||
11197 | { | ||
11198 | if (("document" == value)) | ||
11199 | { | ||
11200 | parsedValue = NodeType.document; | ||
11201 | } | ||
11202 | else | ||
11203 | { | ||
11204 | parsedValue = NodeType.IllegalValue; | ||
11205 | return false; | ||
11206 | } | ||
11207 | } | ||
11208 | } | ||
11209 | return true; | ||
11210 | } | ||
11211 | |||
11212 | /// <summary> | ||
11213 | /// Parses a OnType from a string. | ||
11214 | /// </summary> | ||
11215 | public static OnType ParseOnType(string value) | ||
11216 | { | ||
11217 | OnType parsedValue; | ||
11218 | XmlConfig.TryParseOnType(value, out parsedValue); | ||
11219 | return parsedValue; | ||
11220 | } | ||
11221 | |||
11222 | /// <summary> | ||
11223 | /// Tries to parse a OnType from a string. | ||
11224 | /// </summary> | ||
11225 | public static bool TryParseOnType(string value, out OnType parsedValue) | ||
11226 | { | ||
11227 | parsedValue = OnType.NotSet; | ||
11228 | if (string.IsNullOrEmpty(value)) | ||
11229 | { | ||
11230 | return false; | ||
11231 | } | ||
11232 | if (("install" == value)) | ||
11233 | { | ||
11234 | parsedValue = OnType.install; | ||
11235 | } | ||
11236 | else | ||
11237 | { | ||
11238 | if (("uninstall" == value)) | ||
11239 | { | ||
11240 | parsedValue = OnType.uninstall; | ||
11241 | } | ||
11242 | else | ||
11243 | { | ||
11244 | parsedValue = OnType.IllegalValue; | ||
11245 | return false; | ||
11246 | } | ||
11247 | } | ||
11248 | return true; | ||
11249 | } | ||
11250 | |||
11251 | /// <summary> | ||
11252 | /// Processes this element and all child elements into an XmlWriter. | ||
11253 | /// </summary> | ||
11254 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
11255 | public virtual void OutputXml(XmlWriter writer) | ||
11256 | { | ||
11257 | if ((null == writer)) | ||
11258 | { | ||
11259 | throw new ArgumentNullException("writer"); | ||
11260 | } | ||
11261 | writer.WriteStartElement("XmlConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); | ||
11262 | if (this.idFieldSet) | ||
11263 | { | ||
11264 | writer.WriteAttributeString("Id", this.idField); | ||
11265 | } | ||
11266 | if (this.actionFieldSet) | ||
11267 | { | ||
11268 | if ((this.actionField == ActionType.create)) | ||
11269 | { | ||
11270 | writer.WriteAttributeString("Action", "create"); | ||
11271 | } | ||
11272 | if ((this.actionField == ActionType.delete)) | ||
11273 | { | ||
11274 | writer.WriteAttributeString("Action", "delete"); | ||
11275 | } | ||
11276 | } | ||
11277 | if (this.elementIdFieldSet) | ||
11278 | { | ||
11279 | writer.WriteAttributeString("ElementId", this.elementIdField); | ||
11280 | } | ||
11281 | if (this.elementPathFieldSet) | ||
11282 | { | ||
11283 | writer.WriteAttributeString("ElementPath", this.elementPathField); | ||
11284 | } | ||
11285 | if (this.fileFieldSet) | ||
11286 | { | ||
11287 | writer.WriteAttributeString("File", this.fileField); | ||
11288 | } | ||
11289 | if (this.nameFieldSet) | ||
11290 | { | ||
11291 | writer.WriteAttributeString("Name", this.nameField); | ||
11292 | } | ||
11293 | if (this.nodeFieldSet) | ||
11294 | { | ||
11295 | if ((this.nodeField == NodeType.element)) | ||
11296 | { | ||
11297 | writer.WriteAttributeString("Node", "element"); | ||
11298 | } | ||
11299 | if ((this.nodeField == NodeType.value)) | ||
11300 | { | ||
11301 | writer.WriteAttributeString("Node", "value"); | ||
11302 | } | ||
11303 | if ((this.nodeField == NodeType.document)) | ||
11304 | { | ||
11305 | writer.WriteAttributeString("Node", "document"); | ||
11306 | } | ||
11307 | } | ||
11308 | if (this.onFieldSet) | ||
11309 | { | ||
11310 | if ((this.onField == OnType.install)) | ||
11311 | { | ||
11312 | writer.WriteAttributeString("On", "install"); | ||
11313 | } | ||
11314 | if ((this.onField == OnType.uninstall)) | ||
11315 | { | ||
11316 | writer.WriteAttributeString("On", "uninstall"); | ||
11317 | } | ||
11318 | } | ||
11319 | if (this.preserveModifiedDateFieldSet) | ||
11320 | { | ||
11321 | if ((this.preserveModifiedDateField == YesNoType.no)) | ||
11322 | { | ||
11323 | writer.WriteAttributeString("PreserveModifiedDate", "no"); | ||
11324 | } | ||
11325 | if ((this.preserveModifiedDateField == YesNoType.yes)) | ||
11326 | { | ||
11327 | writer.WriteAttributeString("PreserveModifiedDate", "yes"); | ||
11328 | } | ||
11329 | } | ||
11330 | if (this.sequenceFieldSet) | ||
11331 | { | ||
11332 | writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); | ||
11333 | } | ||
11334 | if (this.valueFieldSet) | ||
11335 | { | ||
11336 | writer.WriteAttributeString("Value", this.valueField); | ||
11337 | } | ||
11338 | if (this.verifyPathFieldSet) | ||
11339 | { | ||
11340 | writer.WriteAttributeString("VerifyPath", this.verifyPathField); | ||
11341 | } | ||
11342 | for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) | ||
11343 | { | ||
11344 | ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); | ||
11345 | childElement.OutputXml(writer); | ||
11346 | } | ||
11347 | writer.WriteEndElement(); | ||
11348 | } | ||
11349 | |||
11350 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
11351 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
11352 | void ISetAttributes.SetAttribute(string name, string value) | ||
11353 | { | ||
11354 | if (String.IsNullOrEmpty(name)) | ||
11355 | { | ||
11356 | throw new ArgumentNullException("name"); | ||
11357 | } | ||
11358 | if (("Id" == name)) | ||
11359 | { | ||
11360 | this.idField = value; | ||
11361 | this.idFieldSet = true; | ||
11362 | } | ||
11363 | if (("Action" == name)) | ||
11364 | { | ||
11365 | this.actionField = XmlConfig.ParseActionType(value); | ||
11366 | this.actionFieldSet = true; | ||
11367 | } | ||
11368 | if (("ElementId" == name)) | ||
11369 | { | ||
11370 | this.elementIdField = value; | ||
11371 | this.elementIdFieldSet = true; | ||
11372 | } | ||
11373 | if (("ElementPath" == name)) | ||
11374 | { | ||
11375 | this.elementPathField = value; | ||
11376 | this.elementPathFieldSet = true; | ||
11377 | } | ||
11378 | if (("File" == name)) | ||
11379 | { | ||
11380 | this.fileField = value; | ||
11381 | this.fileFieldSet = true; | ||
11382 | } | ||
11383 | if (("Name" == name)) | ||
11384 | { | ||
11385 | this.nameField = value; | ||
11386 | this.nameFieldSet = true; | ||
11387 | } | ||
11388 | if (("Node" == name)) | ||
11389 | { | ||
11390 | this.nodeField = XmlConfig.ParseNodeType(value); | ||
11391 | this.nodeFieldSet = true; | ||
11392 | } | ||
11393 | if (("On" == name)) | ||
11394 | { | ||
11395 | this.onField = XmlConfig.ParseOnType(value); | ||
11396 | this.onFieldSet = true; | ||
11397 | } | ||
11398 | if (("PreserveModifiedDate" == name)) | ||
11399 | { | ||
11400 | this.preserveModifiedDateField = Enums.ParseYesNoType(value); | ||
11401 | this.preserveModifiedDateFieldSet = true; | ||
11402 | } | ||
11403 | if (("Sequence" == name)) | ||
11404 | { | ||
11405 | this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
11406 | this.sequenceFieldSet = true; | ||
11407 | } | ||
11408 | if (("Value" == name)) | ||
11409 | { | ||
11410 | this.valueField = value; | ||
11411 | this.valueFieldSet = true; | ||
11412 | } | ||
11413 | if (("VerifyPath" == name)) | ||
11414 | { | ||
11415 | this.verifyPathField = value; | ||
11416 | this.verifyPathFieldSet = true; | ||
11417 | } | ||
11418 | } | ||
11419 | |||
11420 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
11421 | public enum ActionType | ||
11422 | { | ||
11423 | |||
11424 | IllegalValue = int.MaxValue, | ||
11425 | |||
11426 | NotSet = -1, | ||
11427 | |||
11428 | create, | ||
11429 | |||
11430 | delete, | ||
11431 | } | ||
11432 | |||
11433 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
11434 | public enum NodeType | ||
11435 | { | ||
11436 | |||
11437 | IllegalValue = int.MaxValue, | ||
11438 | |||
11439 | NotSet = -1, | ||
11440 | |||
11441 | element, | ||
11442 | |||
11443 | value, | ||
11444 | |||
11445 | document, | ||
11446 | } | ||
11447 | |||
11448 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
11449 | public enum OnType | ||
11450 | { | ||
11451 | |||
11452 | IllegalValue = int.MaxValue, | ||
11453 | |||
11454 | NotSet = -1, | ||
11455 | |||
11456 | install, | ||
11457 | |||
11458 | uninstall, | ||
11459 | } | ||
11460 | } | ||
11461 | } | ||
diff --git a/src/wixext/util.xsd b/src/wixext/util.xsd new file mode 100644 index 00000000..fb8d8032 --- /dev/null +++ b/src/wixext/util.xsd | |||
@@ -0,0 +1,1692 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <xs:schema xmlns:html="http://www.w3.org/1999/xhtml" | ||
6 | xmlns:wix="http://wixtoolset.org/schemas/v4/wxs" | ||
7 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
8 | xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension" | ||
9 | targetNamespace="http://wixtoolset.org/schemas/v4/wxs/util" | ||
10 | xmlns="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
11 | <xs:annotation> | ||
12 | <xs:documentation> | ||
13 | The source code schema for the WiX Toolset Utility Extension. | ||
14 | </xs:documentation> | ||
15 | </xs:annotation> | ||
16 | <xs:import namespace="http://wixtoolset.org/schemas/v4/wxs" /> | ||
17 | <xs:element name="CloseApplication"> | ||
18 | <xs:annotation> | ||
19 | <xs:appinfo> | ||
20 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" /> | ||
21 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" /> | ||
22 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
23 | </xs:appinfo> | ||
24 | <xs:documentation>Closes applications or schedules a reboot if application cannot be closed.</xs:documentation> | ||
25 | </xs:annotation> | ||
26 | <xs:complexType> | ||
27 | <xs:simpleContent> | ||
28 | <xs:extension base="xs:string"> | ||
29 | <xs:annotation> | ||
30 | <xs:documentation> | ||
31 | Condition that determines if the application should be closed. Must be blank or evaluate to true | ||
32 | for the application to be scheduled for closing. | ||
33 | </xs:documentation> | ||
34 | </xs:annotation> | ||
35 | <xs:attribute name="Id" type="xs:string"> | ||
36 | <xs:annotation> | ||
37 | <xs:documentation>Identifier for the close application (primary key). If the Id is not specified, one will be generated.</xs:documentation> | ||
38 | </xs:annotation> | ||
39 | </xs:attribute> | ||
40 | <xs:attribute name="Target" type="xs:string" use="required"> | ||
41 | <xs:annotation> | ||
42 | <xs:documentation>Name of the exectuable to be closed. This should only be the file name.</xs:documentation> | ||
43 | </xs:annotation> | ||
44 | </xs:attribute> | ||
45 | <xs:attribute name="Description" type="xs:string"> | ||
46 | <xs:annotation> | ||
47 | <xs:documentation>Description to show if application is running and needs to be closed.</xs:documentation> | ||
48 | </xs:annotation> | ||
49 | </xs:attribute> | ||
50 | <xs:attribute name="Sequence" type="xs:integer"> | ||
51 | <xs:annotation> | ||
52 | <xs:documentation>Optionally orders the applications to be closed.</xs:documentation> | ||
53 | </xs:annotation> | ||
54 | </xs:attribute> | ||
55 | <xs:attribute name="CloseMessage" type="YesNoType"> | ||
56 | <xs:annotation> | ||
57 | <xs:documentation>Optionally sends a close message to the application. Default is no.</xs:documentation> | ||
58 | </xs:annotation> | ||
59 | </xs:attribute> | ||
60 | <xs:attribute name="EndSessionMessage" type="YesNoType"> | ||
61 | <xs:annotation> | ||
62 | <xs:documentation>Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. Default is "no".</xs:documentation> | ||
63 | </xs:annotation> | ||
64 | </xs:attribute> | ||
65 | <xs:attribute name="ElevatedCloseMessage" type="YesNoType"> | ||
66 | <xs:annotation> | ||
67 | <xs:documentation>Optionally sends a close message to the application from deffered action without impersonation. Default is no.</xs:documentation> | ||
68 | </xs:annotation> | ||
69 | </xs:attribute> | ||
70 | <xs:attribute name="ElevatedEndSessionMessage" type="YesNoType"> | ||
71 | <xs:annotation> | ||
72 | <xs:documentation>Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application from a deffered action without impersonation. Default is "no".</xs:documentation> | ||
73 | </xs:annotation> | ||
74 | </xs:attribute> | ||
75 | <xs:attribute name="RebootPrompt" type="YesNoType"> | ||
76 | <xs:annotation> | ||
77 | <xs:documentation>Optionally prompts for reboot if application is still running. The default is "yes". The TerminateProcess attribute must be "no" or not specified if this attribute is "yes".</xs:documentation> | ||
78 | </xs:annotation> | ||
79 | </xs:attribute> | ||
80 | <xs:attribute name="PromptToContinue" type="YesNoType"> | ||
81 | <xs:annotation> | ||
82 | <xs:documentation> | ||
83 | When this attribute is set to "yes", the user will be prompted when the application is still running. The Description attribute must contain the message to | ||
84 | display in the prompt. The prompt occurs before executing any of the other options and gives the options to "Abort", "Retry", or "Ignore". Abort will cancel | ||
85 | the install. Retry will attempt the check again and if the application is still running, prompt again. "Ignore" will continue and execute any other options | ||
86 | set on the CloseApplication element. The default is "no". | ||
87 | </xs:documentation> | ||
88 | </xs:annotation> | ||
89 | </xs:attribute> | ||
90 | <xs:attribute name="Property" type="xs:string"> | ||
91 | <xs:annotation> | ||
92 | <xs:documentation>Property to be set if application is still running. Useful for launch conditions or to conditionalize custom UI to ask user to shut down apps.</xs:documentation> | ||
93 | </xs:annotation> | ||
94 | </xs:attribute> | ||
95 | <xs:attribute name="TerminateProcess" type="xs:integer"> | ||
96 | <xs:annotation> | ||
97 | <xs:documentation> | ||
98 | Attempts to terminates process and return the specified exit code if application is still running after sending any requested close and/or end session messages. | ||
99 | If this attribute is specified, the RebootPrompt attribute must be "no". The default is "no". | ||
100 | </xs:documentation> | ||
101 | </xs:annotation> | ||
102 | </xs:attribute> | ||
103 | <xs:attribute name="Timeout" type="xs:integer"> | ||
104 | <xs:annotation> | ||
105 | <xs:documentation> | ||
106 | Optional time in seconds to wait for the application to exit after the close and/or end session messages. If the application is still running after the timeout then | ||
107 | the RebootPrompt or TerminateProcess attributes will be considered. The default value is "5" seconds. | ||
108 | </xs:documentation> | ||
109 | </xs:annotation> | ||
110 | </xs:attribute> | ||
111 | </xs:extension> | ||
112 | </xs:simpleContent> | ||
113 | </xs:complexType> | ||
114 | </xs:element> | ||
115 | <xs:element name="ComponentSearch"> | ||
116 | <xs:annotation> | ||
117 | <xs:documentation>Describes a component search.</xs:documentation> | ||
118 | <xs:appinfo> | ||
119 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
120 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
121 | </xs:appinfo> | ||
122 | </xs:annotation> | ||
123 | <xs:complexType> | ||
124 | <xs:attributeGroup ref="SearchCommonAttributes" /> | ||
125 | <xs:attribute name="Guid" type="xs:string" use="required"> | ||
126 | <xs:annotation> | ||
127 | <xs:documentation>Component to search for.</xs:documentation> | ||
128 | </xs:annotation> | ||
129 | </xs:attribute> | ||
130 | <xs:attribute name="ProductCode" type="xs:string"> | ||
131 | <xs:annotation> | ||
132 | <xs:documentation>Optional ProductCode to determine if the component is installed.</xs:documentation> | ||
133 | </xs:annotation> | ||
134 | </xs:attribute> | ||
135 | <xs:attribute name="Result"> | ||
136 | <xs:annotation> | ||
137 | <xs:documentation> | ||
138 | Rather than saving the matching key path into the variable, a ComponentSearch can save an attribute of the component instead. | ||
139 | </xs:documentation> | ||
140 | </xs:annotation> | ||
141 | <xs:simpleType> | ||
142 | <xs:restriction base="xs:NMTOKEN"> | ||
143 | <xs:enumeration value="directory"> | ||
144 | <xs:annotation> | ||
145 | <xs:documentation>Saves the parent directory for the component's file key path; other types of key path are returned unmodified.</xs:documentation> | ||
146 | </xs:annotation> | ||
147 | </xs:enumeration> | ||
148 | <xs:enumeration value="state"> | ||
149 | <xs:annotation> | ||
150 | <xs:documentation>Saves the state of the component: absent (2), locally installed (3), will run from source (4), or installed in default location (either local or from source) (5)</xs:documentation> | ||
151 | </xs:annotation> | ||
152 | </xs:enumeration> | ||
153 | <xs:enumeration value="keyPath"> | ||
154 | <xs:annotation> | ||
155 | <xs:documentation>Saves the key path of the component if installed. This is the default.</xs:documentation> | ||
156 | </xs:annotation> | ||
157 | </xs:enumeration> | ||
158 | </xs:restriction> | ||
159 | </xs:simpleType> | ||
160 | </xs:attribute> | ||
161 | </xs:complexType> | ||
162 | </xs:element> | ||
163 | <xs:element name="ComponentSearchRef"> | ||
164 | <xs:annotation> | ||
165 | <xs:documentation>References a ComponentSearch.</xs:documentation> | ||
166 | <xs:appinfo> | ||
167 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
168 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
169 | </xs:appinfo> | ||
170 | </xs:annotation> | ||
171 | <xs:complexType> | ||
172 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
173 | </xs:complexType> | ||
174 | </xs:element> | ||
175 | <xs:element name="DirectorySearch"> | ||
176 | <xs:annotation> | ||
177 | <xs:documentation>Describes a directory search.</xs:documentation> | ||
178 | <xs:appinfo> | ||
179 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
180 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
181 | </xs:appinfo> | ||
182 | </xs:annotation> | ||
183 | <xs:complexType> | ||
184 | <xs:attributeGroup ref="SearchCommonAttributes" /> | ||
185 | <xs:attribute name="Path" type="xs:string"> | ||
186 | <xs:annotation> | ||
187 | <xs:documentation>Directory path to search for.</xs:documentation> | ||
188 | </xs:annotation> | ||
189 | </xs:attribute> | ||
190 | <xs:attribute name="Result"> | ||
191 | <xs:annotation> | ||
192 | <xs:documentation> | ||
193 | Rather than saving the matching directory path into the variable, a DirectorySearch can save an | ||
194 | attribute of the matching directory instead. | ||
195 | </xs:documentation> | ||
196 | </xs:annotation> | ||
197 | <xs:simpleType> | ||
198 | <xs:restriction base="xs:NMTOKEN"> | ||
199 | <xs:enumeration value="exists"> | ||
200 | <xs:annotation> | ||
201 | <xs:documentation>Saves true if a matching directory is found; false otherwise.</xs:documentation> | ||
202 | </xs:annotation> | ||
203 | </xs:enumeration> | ||
204 | </xs:restriction> | ||
205 | </xs:simpleType> | ||
206 | </xs:attribute> | ||
207 | </xs:complexType> | ||
208 | </xs:element> | ||
209 | <xs:element name="DirectorySearchRef"> | ||
210 | <xs:annotation> | ||
211 | <xs:documentation>References a DirectorySearch.</xs:documentation> | ||
212 | <xs:appinfo> | ||
213 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
214 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
215 | </xs:appinfo> | ||
216 | </xs:annotation> | ||
217 | <xs:complexType> | ||
218 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
219 | </xs:complexType> | ||
220 | </xs:element> | ||
221 | <xs:element name="EventSource"> | ||
222 | <xs:annotation> | ||
223 | <xs:appinfo> | ||
224 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
225 | </xs:appinfo> | ||
226 | <xs:documentation>Creates an event source.</xs:documentation> | ||
227 | </xs:annotation> | ||
228 | <xs:complexType> | ||
229 | <xs:attribute name="CategoryCount" type="xs:integer"> | ||
230 | <xs:annotation> | ||
231 | <xs:documentation> | ||
232 | The number of categories in CategoryMessageFile. CategoryMessageFile | ||
233 | must be specified too. | ||
234 | </xs:documentation> | ||
235 | </xs:annotation> | ||
236 | </xs:attribute> | ||
237 | <xs:attribute name="CategoryMessageFile" type="xs:string"> | ||
238 | <xs:annotation> | ||
239 | <xs:documentation> | ||
240 | Name of the category message file. CategoryCount must be specified too. | ||
241 | Note that this is a formatted field, so you can use [#fileId] syntax to | ||
242 | refer to a file being installed. It is also written as a REG_EXPAND_SZ | ||
243 | string, so you can use %environment_variable% syntax to refer to a file | ||
244 | already present on the user's machine. | ||
245 | </xs:documentation> | ||
246 | </xs:annotation> | ||
247 | </xs:attribute> | ||
248 | <xs:attribute name="EventMessageFile" type="xs:string" use="required"> | ||
249 | <xs:annotation> | ||
250 | <xs:documentation> | ||
251 | Name of the event message file. | ||
252 | Note that this is a formatted field, so you can use [#fileId] syntax to | ||
253 | refer to a file being installed. It is also written as a REG_EXPAND_SZ | ||
254 | string, so you can use %environment_variable% syntax to refer to a file | ||
255 | already present on the user's machine. | ||
256 | </xs:documentation> | ||
257 | </xs:annotation> | ||
258 | </xs:attribute> | ||
259 | <xs:attribute name="KeyPath" type="YesNoType"> | ||
260 | <xs:annotation> | ||
261 | <xs:documentation> | ||
262 | Marks the EventSource registry as the key path of the component it belongs to. | ||
263 | </xs:documentation> | ||
264 | </xs:annotation> | ||
265 | </xs:attribute> | ||
266 | <xs:attribute name="Log" type="xs:string" use="required"> | ||
267 | <xs:annotation> | ||
268 | <xs:documentation>Name of the event source's log.</xs:documentation> | ||
269 | </xs:annotation> | ||
270 | </xs:attribute> | ||
271 | <xs:attribute name="Name" type="xs:string" use="required"> | ||
272 | <xs:annotation> | ||
273 | <xs:documentation>Name of the event source.</xs:documentation> | ||
274 | </xs:annotation> | ||
275 | </xs:attribute> | ||
276 | <xs:attribute name="ParameterMessageFile" type="xs:string"> | ||
277 | <xs:annotation> | ||
278 | <xs:documentation> | ||
279 | Name of the parameter message file. | ||
280 | Note that this is a formatted field, so you can use [#fileId] syntax to | ||
281 | refer to a file being installed. It is also written as a REG_EXPAND_SZ | ||
282 | string, so you can use %environment_variable% syntax to refer to a file | ||
283 | already present on the user's machine. | ||
284 | </xs:documentation> | ||
285 | </xs:annotation> | ||
286 | </xs:attribute> | ||
287 | <xs:attribute name="SupportsErrors" type="YesNoType"> | ||
288 | <xs:annotation> | ||
289 | <xs:documentation> | ||
290 | Equivalent to EVENTLOG_ERROR_TYPE. | ||
291 | </xs:documentation> | ||
292 | </xs:annotation> | ||
293 | </xs:attribute> | ||
294 | <xs:attribute name="SupportsFailureAudits" type="YesNoType"> | ||
295 | <xs:annotation> | ||
296 | <xs:documentation> | ||
297 | Equivalent to EVENTLOG_AUDIT_FAILURE. | ||
298 | </xs:documentation> | ||
299 | </xs:annotation> | ||
300 | </xs:attribute> | ||
301 | <xs:attribute name="SupportsInformationals" type="YesNoType"> | ||
302 | <xs:annotation> | ||
303 | <xs:documentation> | ||
304 | Equivalent to EVENTLOG_INFORMATION_TYPE. | ||
305 | </xs:documentation> | ||
306 | </xs:annotation> | ||
307 | </xs:attribute> | ||
308 | <xs:attribute name="SupportsSuccessAudits" type="YesNoType"> | ||
309 | <xs:annotation> | ||
310 | <xs:documentation> | ||
311 | Equivalent to EVENTLOG_AUDIT_SUCCESS. | ||
312 | </xs:documentation> | ||
313 | </xs:annotation> | ||
314 | </xs:attribute> | ||
315 | <xs:attribute name="SupportsWarnings" type="YesNoType"> | ||
316 | <xs:annotation> | ||
317 | <xs:documentation> | ||
318 | Equivalent to EVENTLOG_WARNING_TYPE. | ||
319 | </xs:documentation> | ||
320 | </xs:annotation> | ||
321 | </xs:attribute> | ||
322 | </xs:complexType> | ||
323 | </xs:element> | ||
324 | <xs:element name="FileSearch"> | ||
325 | <xs:annotation> | ||
326 | <xs:documentation>Describes a file search.</xs:documentation> | ||
327 | <xs:appinfo> | ||
328 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
329 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
330 | </xs:appinfo> | ||
331 | </xs:annotation> | ||
332 | <xs:complexType> | ||
333 | <xs:attributeGroup ref="SearchCommonAttributes" /> | ||
334 | <xs:attribute name="Path" type="xs:string"> | ||
335 | <xs:annotation> | ||
336 | <xs:documentation>File path to search for.</xs:documentation> | ||
337 | </xs:annotation> | ||
338 | </xs:attribute> | ||
339 | <xs:attribute name="Result"> | ||
340 | <xs:annotation> | ||
341 | <xs:documentation> | ||
342 | Rather than saving the matching file path into the variable, a FileSearch can save an attribute of the matching file instead. | ||
343 | </xs:documentation> | ||
344 | </xs:annotation> | ||
345 | <xs:simpleType> | ||
346 | <xs:restriction base="xs:NMTOKEN"> | ||
347 | <xs:enumeration value="exists"> | ||
348 | <xs:annotation> | ||
349 | <xs:documentation>Saves true if a matching file is found; false otherwise.</xs:documentation> | ||
350 | </xs:annotation> | ||
351 | </xs:enumeration> | ||
352 | <xs:enumeration value="version"> | ||
353 | <xs:annotation> | ||
354 | <xs:documentation>Saves the version information for files that have it (.exe, .dll); zero-version (0.0.0.0) otherwise.</xs:documentation> | ||
355 | </xs:annotation> | ||
356 | </xs:enumeration> | ||
357 | </xs:restriction> | ||
358 | </xs:simpleType> | ||
359 | </xs:attribute> | ||
360 | </xs:complexType> | ||
361 | </xs:element> | ||
362 | <xs:element name="FileSearchRef"> | ||
363 | <xs:annotation> | ||
364 | <xs:documentation>References a FileSearch.</xs:documentation> | ||
365 | <xs:appinfo> | ||
366 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
367 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
368 | </xs:appinfo> | ||
369 | </xs:annotation> | ||
370 | <xs:complexType> | ||
371 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
372 | </xs:complexType> | ||
373 | </xs:element> | ||
374 | <xs:element name="FileShare"> | ||
375 | <xs:annotation> | ||
376 | <xs:appinfo> | ||
377 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
378 | </xs:appinfo> | ||
379 | <xs:documentation>Creates a file share out of the component's directory.</xs:documentation> | ||
380 | </xs:annotation> | ||
381 | <xs:complexType> | ||
382 | <xs:sequence> | ||
383 | <xs:element ref="FileSharePermission" minOccurs="1" maxOccurs="unbounded"> | ||
384 | <xs:annotation> | ||
385 | <xs:documentation>ACL permission</xs:documentation> | ||
386 | </xs:annotation> | ||
387 | </xs:element> | ||
388 | </xs:sequence> | ||
389 | <xs:attribute name="Id" type="xs:string" use="required"> | ||
390 | <xs:annotation> | ||
391 | <xs:documentation>Identifier for the file share (primary key).</xs:documentation> | ||
392 | </xs:annotation> | ||
393 | </xs:attribute> | ||
394 | <xs:attribute name="Name" type="xs:string" use="required"> | ||
395 | <xs:annotation> | ||
396 | <xs:documentation>Name of the file share.</xs:documentation> | ||
397 | </xs:annotation> | ||
398 | </xs:attribute> | ||
399 | <xs:attribute name="Description" type="xs:string"> | ||
400 | <xs:annotation> | ||
401 | <xs:documentation>Description of the file share.</xs:documentation> | ||
402 | </xs:annotation> | ||
403 | </xs:attribute> | ||
404 | </xs:complexType> | ||
405 | </xs:element> | ||
406 | <xs:element name="FileSharePermission"> | ||
407 | <xs:annotation> | ||
408 | <xs:documentation> | ||
409 | Sets ACLs on a FileShare. This element has no Id attribute. | ||
410 | The table and key are taken from the parent element. | ||
411 | </xs:documentation> | ||
412 | </xs:annotation> | ||
413 | <xs:complexType> | ||
414 | <xs:attribute name="User" use="required" type="xs:string"></xs:attribute> | ||
415 | <!-- Common ACLs --> | ||
416 | <xs:attribute name="Read" type="YesNoType"></xs:attribute> | ||
417 | <xs:attribute name="Delete" type="YesNoType"></xs:attribute> | ||
418 | <xs:attribute name="ReadPermission" type="YesNoType"></xs:attribute> | ||
419 | <xs:attribute name="ChangePermission" type="YesNoType"></xs:attribute> | ||
420 | <xs:attribute name="TakeOwnership" type="YesNoType"></xs:attribute> | ||
421 | <!-- Folder and File ACLs --> | ||
422 | <xs:attribute name="ReadAttributes" type="YesNoType"></xs:attribute> | ||
423 | <xs:attribute name="WriteAttributes" type="YesNoType"></xs:attribute> | ||
424 | <xs:attribute name="ReadExtendedAttributes" type="YesNoType"></xs:attribute> | ||
425 | <xs:attribute name="WriteExtendedAttributes" type="YesNoType"></xs:attribute> | ||
426 | <xs:attribute name="Synchronize" type="YesNoType"></xs:attribute> | ||
427 | <!-- Folder only ACLs --> | ||
428 | <xs:attribute name="CreateFile" type="YesNoType"> | ||
429 | <xs:annotation> | ||
430 | <xs:documentation>For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
431 | </xs:annotation> | ||
432 | </xs:attribute> | ||
433 | <xs:attribute name="CreateChild" type="YesNoType"> | ||
434 | <xs:annotation> | ||
435 | <xs:documentation>For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
436 | </xs:annotation> | ||
437 | </xs:attribute> | ||
438 | <xs:attribute name="DeleteChild" type="YesNoType"> | ||
439 | <xs:annotation> | ||
440 | <xs:documentation>For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
441 | </xs:annotation> | ||
442 | </xs:attribute> | ||
443 | <xs:attribute name="Traverse" type="YesNoType"> | ||
444 | <xs:annotation> | ||
445 | <xs:documentation>For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
446 | </xs:annotation> | ||
447 | </xs:attribute> | ||
448 | <!-- Generic ACLs, mapped by system to appropriate permissions --> | ||
449 | <xs:attribute name="GenericAll" type="YesNoType"></xs:attribute> | ||
450 | <xs:attribute name="GenericExecute" type="YesNoType"></xs:attribute> | ||
451 | <xs:attribute name="GenericWrite" type="YesNoType"></xs:attribute> | ||
452 | <xs:attribute name="GenericRead" type="YesNoType"> | ||
453 | <xs:annotation> | ||
454 | <xs:documentation>specifying this will fail to grant read access</xs:documentation> | ||
455 | </xs:annotation> | ||
456 | </xs:attribute> | ||
457 | </xs:complexType> | ||
458 | </xs:element> | ||
459 | <xs:element name="FormatFile"> | ||
460 | <xs:annotation> | ||
461 | <xs:appinfo> | ||
462 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" /> | ||
463 | </xs:appinfo> | ||
464 | <xs:documentation> | ||
465 | Formats a file's contents at install time. The contents are formatted according to the rules of the | ||
466 | <html:a href="http://msdn.microsoft.com/library/aa368609.aspx" target="_blank">Formatted</html:a> data type. | ||
467 | </xs:documentation> | ||
468 | </xs:annotation> | ||
469 | <xs:complexType> | ||
470 | <xs:attribute name="BinaryKey" type="xs:string" use="required"> | ||
471 | <xs:annotation> | ||
472 | <xs:documentation> | ||
473 | The id of a Binary row that contains a copy of the file. The file in the Binary table overwrites whatever | ||
474 | file is installed by the parent component. | ||
475 | </xs:documentation> | ||
476 | </xs:annotation> | ||
477 | </xs:attribute> | ||
478 | </xs:complexType> | ||
479 | </xs:element> | ||
480 | <xs:element name="Group"> | ||
481 | <xs:annotation> | ||
482 | <xs:appinfo> | ||
483 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
484 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" /> | ||
485 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" /> | ||
486 | </xs:appinfo> | ||
487 | <xs:documentation> | ||
488 | Finds user groups on the local machine or specified Active Directory domain. The local machine will be | ||
489 | searched for the group first then fallback to looking in Active Directory. This element is not capable | ||
490 | of creating new groups but can be used to add new or existing users to an existing group. | ||
491 | </xs:documentation> | ||
492 | </xs:annotation> | ||
493 | <xs:complexType> | ||
494 | <xs:attribute name="Id" type="xs:string" use="required"> | ||
495 | <xs:annotation> | ||
496 | <xs:documentation>Unique identifier in your installation package for this group.</xs:documentation> | ||
497 | </xs:annotation> | ||
498 | </xs:attribute> | ||
499 | <xs:attribute name="Name" type="xs:string" use="required"> | ||
500 | <xs:annotation> | ||
501 | <xs:documentation>A <html:a href="http://msdn.microsoft.com/library/aa368609.aspx" target="_blank">Formatted</html:a> string that contains the name of the group to be found.</xs:documentation> | ||
502 | </xs:annotation> | ||
503 | </xs:attribute> | ||
504 | <xs:attribute name="Domain" type="xs:string"> | ||
505 | <xs:annotation> | ||
506 | <xs:documentation>An optional <html:a href="http://msdn.microsoft.com/library/aa368609.aspx" target="_blank">Formatted</html:a> string that specifies the domain for the group.</xs:documentation> | ||
507 | </xs:annotation> | ||
508 | </xs:attribute> | ||
509 | </xs:complexType> | ||
510 | </xs:element> | ||
511 | <xs:element name="GroupRef"> | ||
512 | <xs:annotation> | ||
513 | <xs:documentation>Used to join a user to a group</xs:documentation> | ||
514 | </xs:annotation> | ||
515 | <xs:complexType> | ||
516 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
517 | </xs:complexType> | ||
518 | </xs:element> | ||
519 | <xs:element name="InternetShortcut"> | ||
520 | <xs:annotation> | ||
521 | <xs:appinfo> | ||
522 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
523 | <xse:howtoRef href="files_and_registry/create_internet_shortcut.html">How To: Create a shortcut to a webpage</xse:howtoRef> | ||
524 | </xs:appinfo> | ||
525 | <xs:documentation>Creates a shortcut to a URL.</xs:documentation> | ||
526 | </xs:annotation> | ||
527 | <xs:complexType> | ||
528 | <xs:attribute name="Id" type="xs:string" use="required"> | ||
529 | <xs:annotation> | ||
530 | <xs:documentation>Unique identifier in your installation package for this Internet shortcut.</xs:documentation> | ||
531 | </xs:annotation> | ||
532 | </xs:attribute> | ||
533 | <xs:attribute name="Directory" type="xs:string"> | ||
534 | <xs:annotation> | ||
535 | <xs:documentation>Identifier reference to Directory element where shortcut is to be created. This attribute's value defaults to the parent Component directory.</xs:documentation> | ||
536 | </xs:annotation> | ||
537 | </xs:attribute> | ||
538 | <xs:attribute name="Name" type="xs:string" use="required"> | ||
539 | <xs:annotation> | ||
540 | <xs:documentation> | ||
541 | The name of the shortcut file, which is visible to the user. (The .lnk | ||
542 | extension is added automatically and by default, is not shown to the user.) | ||
543 | </xs:documentation> | ||
544 | </xs:annotation> | ||
545 | </xs:attribute> | ||
546 | <xs:attribute name="Target" type="xs:string" use="required"> | ||
547 | <xs:annotation> | ||
548 | <xs:documentation> | ||
549 | URL that should be opened when the user selects the shortcut. Windows | ||
550 | opens the URL in the appropriate handler for the protocol specified | ||
551 | in the URL. Note that this is a formatted field, so you can use | ||
552 | [#fileId] syntax to refer to a file being installed (using the file: | ||
553 | protocol). | ||
554 | </xs:documentation> | ||
555 | </xs:annotation> | ||
556 | </xs:attribute> | ||
557 | <xs:attribute name="Type"> | ||
558 | <xs:annotation> | ||
559 | <xs:documentation>Which type of shortcut should be created.</xs:documentation> | ||
560 | </xs:annotation> | ||
561 | <xs:simpleType> | ||
562 | <xs:restriction base="xs:NMTOKEN"> | ||
563 | <xs:enumeration value="url"> | ||
564 | <xs:annotation> | ||
565 | <xs:documentation>Creates .url files using IUniformResourceLocatorW.</xs:documentation> | ||
566 | </xs:annotation> | ||
567 | </xs:enumeration> | ||
568 | <xs:enumeration value="link"> | ||
569 | <xs:annotation> | ||
570 | <xs:documentation>Creates .lnk files using IShellLinkW (default).</xs:documentation> | ||
571 | </xs:annotation> | ||
572 | </xs:enumeration> | ||
573 | </xs:restriction> | ||
574 | </xs:simpleType> | ||
575 | </xs:attribute> | ||
576 | <xs:attribute name="IconFile" type="xs:string" use="optional"> | ||
577 | <xs:annotation> | ||
578 | <xs:documentation> | ||
579 | Icon file that should be displayed. Note that this is a formatted field, so you can use | ||
580 | [#fileId] syntax to refer to a file being installed (using the file: | ||
581 | protocol). | ||
582 | </xs:documentation> | ||
583 | </xs:annotation> | ||
584 | </xs:attribute> | ||
585 | <xs:attribute name="IconIndex" type="xs:integer" use="optional"> | ||
586 | <xs:annotation> | ||
587 | <xs:documentation> | ||
588 | Index of the icon being referenced | ||
589 | </xs:documentation> | ||
590 | </xs:annotation> | ||
591 | </xs:attribute> | ||
592 | </xs:complexType> | ||
593 | </xs:element> | ||
594 | <xs:element name="PerformanceCategory"> | ||
595 | <xs:annotation> | ||
596 | <xs:appinfo> | ||
597 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
598 | </xs:appinfo> | ||
599 | <xs:documentation>Used to create performance categories and configure performance counters.</xs:documentation> | ||
600 | </xs:annotation> | ||
601 | <xs:complexType> | ||
602 | <xs:sequence> | ||
603 | <xs:element ref="PerformanceCounter" minOccurs="0" maxOccurs="unbounded" /> | ||
604 | </xs:sequence> | ||
605 | <xs:attribute name="Id" type="xs:string"> | ||
606 | <xs:annotation> | ||
607 | <xs:documentation>Unique identifier in your installation package for this performance counter category.</xs:documentation> | ||
608 | </xs:annotation> | ||
609 | </xs:attribute> | ||
610 | <xs:attribute name="Name" type="xs:string" use="optional"> | ||
611 | <xs:annotation> | ||
612 | <xs:documentation>Name for the performance counter category. If this attribute is not provided the Id attribute is used as the name of the performance counter category.</xs:documentation> | ||
613 | </xs:annotation> | ||
614 | </xs:attribute> | ||
615 | <xs:attribute name="Help" type="xs:string" use="optional"> | ||
616 | <xs:annotation> | ||
617 | <xs:documentation>Optional help text for the performance counter category.</xs:documentation> | ||
618 | </xs:annotation> | ||
619 | </xs:attribute> | ||
620 | <xs:attribute name="MultiInstance" type="YesNoType" use="optional"> | ||
621 | <xs:annotation> | ||
622 | <xs:documentation>Flag that specifies whether the performance counter category is multi or single instanced. Default is single instance.</xs:documentation> | ||
623 | </xs:annotation> | ||
624 | </xs:attribute> | ||
625 | <xs:attribute name="Library" type="xs:string" use="optional"> | ||
626 | <xs:annotation> | ||
627 | <xs:documentation>DLL that contains the performance counter. The default is "netfxperf.dll" which should be used for all managed code performance counters.</xs:documentation> | ||
628 | </xs:annotation> | ||
629 | </xs:attribute> | ||
630 | <xs:attribute name="Open" type="xs:string" use="optional"> | ||
631 | <xs:annotation> | ||
632 | <xs:documentation>Function entry point in to the Library DLL called when opening the performance counter. The default is "OpenPerformanceData" which should be used for all managed code performance counters.</xs:documentation> | ||
633 | </xs:annotation> | ||
634 | </xs:attribute> | ||
635 | <xs:attribute name="Close" type="xs:string" use="optional"> | ||
636 | <xs:annotation> | ||
637 | <xs:documentation>Function entry point in to the Library DLL called when closing the performance counter. The default is "ClosePerformanceData" which should be used for all managed code performance counters.</xs:documentation> | ||
638 | </xs:annotation> | ||
639 | </xs:attribute> | ||
640 | <xs:attribute name="Collect" type="xs:string" use="optional"> | ||
641 | <xs:annotation> | ||
642 | <xs:documentation>Function entry point in to the Library DLL called when collecting data from the performance counter. The default is "CollectPerformanceData" which should be used for all managed code performance counters.</xs:documentation> | ||
643 | </xs:annotation> | ||
644 | </xs:attribute> | ||
645 | <xs:attribute name="DefaultLanguage" type="PerformanceCounterLanguageType"> | ||
646 | <xs:annotation> | ||
647 | <xs:documentation>Default language for the performance category and contained counters' names and help text.</xs:documentation> | ||
648 | </xs:annotation> | ||
649 | </xs:attribute> | ||
650 | </xs:complexType> | ||
651 | </xs:element> | ||
652 | <xs:element name="PerformanceCounter"> | ||
653 | <xs:annotation> | ||
654 | <xs:documentation>Creates a performance counter in a performance category.</xs:documentation> | ||
655 | </xs:annotation> | ||
656 | <xs:complexType> | ||
657 | <xs:attribute name="Name" type="xs:string"> | ||
658 | <xs:annotation> | ||
659 | <xs:documentation>Name for the performance counter.</xs:documentation> | ||
660 | </xs:annotation> | ||
661 | </xs:attribute> | ||
662 | <xs:attribute name="Help" type="xs:string" use="optional"> | ||
663 | <xs:annotation> | ||
664 | <xs:documentation>Optional help text for the performance counter.</xs:documentation> | ||
665 | </xs:annotation> | ||
666 | </xs:attribute> | ||
667 | <xs:attribute name="Type" type="PerformanceCounterTypesType"> | ||
668 | <xs:annotation> | ||
669 | <xs:documentation>Type of the performance counter.</xs:documentation> | ||
670 | </xs:annotation> | ||
671 | </xs:attribute> | ||
672 | <xs:attribute name="Language" type="PerformanceCounterLanguageType" use="optional"> | ||
673 | <xs:annotation> | ||
674 | <xs:documentation>Language for the peformance counter name and help. The default is to use the parent PerformanceCategory element's DefaultLanguage attribute.</xs:documentation> | ||
675 | </xs:annotation> | ||
676 | </xs:attribute> | ||
677 | </xs:complexType> | ||
678 | </xs:element> | ||
679 | <xs:element name="PerfCounter"> | ||
680 | <xs:annotation> | ||
681 | <xs:appinfo> | ||
682 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" /> | ||
683 | <xse:deprecated ref="PerformanceCounter" /> | ||
684 | </xs:appinfo> | ||
685 | <xs:documentation>Used to install Perfmon counters.</xs:documentation> | ||
686 | </xs:annotation> | ||
687 | <xs:complexType> | ||
688 | <xs:attribute name="Name" type="xs:string" /> | ||
689 | </xs:complexType> | ||
690 | </xs:element> | ||
691 | <xs:element name="PerfCounterManifest"> | ||
692 | <xs:annotation> | ||
693 | <xs:appinfo> | ||
694 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" /> | ||
695 | </xs:appinfo> | ||
696 | <xs:documentation> | ||
697 | Used to install Perfmon Counter Manifests. | ||
698 | Note that this functionality cannot be used with major upgrades that are scheduled after the InstallExecute, | ||
699 | InstallExecuteAgain, or InstallFinalize actions. For more information on major upgrade scheduling, see | ||
700 | <html:a href="http://msdn.microsoft.com/en-us/library/aa371197.aspx">RemoveExistingProducts Action</html:a>. | ||
701 | </xs:documentation> | ||
702 | </xs:annotation> | ||
703 | <xs:complexType> | ||
704 | <xs:attribute name="ResourceFileDirectory" type="xs:string" use="optional"> | ||
705 | <xs:annotation> | ||
706 | <xs:documentation>The directory that holds the resource file of the providers in the perfmon counter manifest. Often the resource file path cannot be determined until setup time. Put the directory here and during perfmon manifest registrtion the path will be updated in the registry. If not specified, Perfmon will look for the resource file in the same directory of the perfmon counter manifest file.</xs:documentation> | ||
707 | </xs:annotation> | ||
708 | </xs:attribute> | ||
709 | </xs:complexType> | ||
710 | </xs:element> | ||
711 | <xs:element name="EventManifest"> | ||
712 | <xs:annotation> | ||
713 | <xs:appinfo> | ||
714 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" /> | ||
715 | </xs:appinfo> | ||
716 | <xs:documentation>Used to install Event Manifests.</xs:documentation> | ||
717 | </xs:annotation> | ||
718 | <xs:complexType> | ||
719 | <xs:attribute name="MessageFile" type="xs:string" use="optional"> | ||
720 | <xs:annotation> | ||
721 | <xs:documentation>The message file (including path) of all the providers in the event manifest. Often the message file path cannot be determined until setup time. Put your MessageFile here and the messageFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. </xs:documentation> | ||
722 | </xs:annotation> | ||
723 | </xs:attribute> | ||
724 | <xs:attribute name="ParameterFile" type="xs:string" use="optional"> | ||
725 | <xs:annotation> | ||
726 | <xs:documentation>The parameter file (including path) of all the providers in the event manifest. Often the parameter file path cannot be determined until setup time. Put your ParameterFile here and the parameterFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. </xs:documentation> | ||
727 | </xs:annotation> | ||
728 | </xs:attribute> | ||
729 | <xs:attribute name="ResourceFile" type="xs:string" use="optional"> | ||
730 | <xs:annotation> | ||
731 | <xs:documentation>The resource file (including path) of all the providers in the event manifest. Often the resource file path cannot be determined until setup time. Put your ResourceFile here and the resourceFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. </xs:documentation> | ||
732 | </xs:annotation> | ||
733 | </xs:attribute> | ||
734 | </xs:complexType> | ||
735 | </xs:element> | ||
736 | <xs:element name="PermissionEx"> | ||
737 | <xs:annotation> | ||
738 | <xs:documentation> | ||
739 | Sets ACLs on File, Registry, CreateFolder, or ServiceInstall. When under a Registry element, this cannot be used | ||
740 | if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. | ||
741 | The table and key are taken from the parent element. | ||
742 | </xs:documentation> | ||
743 | <xs:appinfo> | ||
744 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="CreateFolder" /> | ||
745 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" /> | ||
746 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Registry" /> | ||
747 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="RegistryKey" /> | ||
748 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="RegistryValue" /> | ||
749 | </xs:appinfo> | ||
750 | </xs:annotation> | ||
751 | <xs:complexType> | ||
752 | <xs:attribute name="Domain" type="xs:string"></xs:attribute> | ||
753 | <xs:attribute name="User" use="required" type="xs:string"></xs:attribute> | ||
754 | <!-- Common ACLs --> | ||
755 | <xs:attribute name="Read" type="YesNoType"></xs:attribute> | ||
756 | <xs:attribute name="Delete" type="YesNoType"></xs:attribute> | ||
757 | <xs:attribute name="ReadPermission" type="YesNoType"></xs:attribute> | ||
758 | <xs:attribute name="ChangePermission" type="YesNoType"></xs:attribute> | ||
759 | <xs:attribute name="TakeOwnership" type="YesNoType"></xs:attribute> | ||
760 | <!-- Folder and File ACLs --> | ||
761 | <xs:attribute name="ReadAttributes" type="YesNoType"></xs:attribute> | ||
762 | <xs:attribute name="WriteAttributes" type="YesNoType"></xs:attribute> | ||
763 | <xs:attribute name="ReadExtendedAttributes" type="YesNoType"></xs:attribute> | ||
764 | <xs:attribute name="WriteExtendedAttributes" type="YesNoType"></xs:attribute> | ||
765 | <xs:attribute name="Synchronize" type="YesNoType"></xs:attribute> | ||
766 | <!-- Folder only ACLs --> | ||
767 | <xs:attribute name="CreateFile" type="YesNoType"> | ||
768 | <xs:annotation> | ||
769 | <xs:documentation>For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
770 | </xs:annotation> | ||
771 | </xs:attribute> | ||
772 | <xs:attribute name="CreateChild" type="YesNoType"> | ||
773 | <xs:annotation> | ||
774 | <xs:documentation>For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
775 | </xs:annotation> | ||
776 | </xs:attribute> | ||
777 | <xs:attribute name="DeleteChild" type="YesNoType"> | ||
778 | <xs:annotation> | ||
779 | <xs:documentation>For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
780 | </xs:annotation> | ||
781 | </xs:attribute> | ||
782 | <xs:attribute name="Traverse" type="YesNoType"> | ||
783 | <xs:annotation> | ||
784 | <xs:documentation>For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent.</xs:documentation> | ||
785 | </xs:annotation> | ||
786 | </xs:attribute> | ||
787 | <!-- File only ACLs --> | ||
788 | <xs:attribute name="Append" type="YesNoType"></xs:attribute> | ||
789 | <xs:attribute name="Execute" type="YesNoType"></xs:attribute> | ||
790 | <!-- File and Registry ACLs --> | ||
791 | <xs:attribute name="Write" type="YesNoType"></xs:attribute> | ||
792 | <!-- Registry only ACLs --> | ||
793 | <xs:attribute name="CreateSubkeys" type="YesNoType"></xs:attribute> | ||
794 | <xs:attribute name="EnumerateSubkeys" type="YesNoType"></xs:attribute> | ||
795 | <xs:attribute name="Notify" type="YesNoType"></xs:attribute> | ||
796 | <xs:attribute name="CreateLink" type="YesNoType"></xs:attribute> | ||
797 | <!-- Generic ACLs, mapped by system to appropriate permissions --> | ||
798 | <xs:attribute name="GenericAll" type="YesNoType"></xs:attribute> | ||
799 | <xs:attribute name="GenericExecute" type="YesNoType"></xs:attribute> | ||
800 | <xs:attribute name="GenericWrite" type="YesNoType"></xs:attribute> | ||
801 | <xs:attribute name="GenericRead" type="YesNoType"> | ||
802 | <xs:annotation> | ||
803 | <xs:documentation>specifying this will fail to grant read access</xs:documentation> | ||
804 | </xs:annotation> | ||
805 | </xs:attribute> | ||
806 | <!-- Service only ACLs --> | ||
807 | <xs:attribute name="ServiceQueryConfig" type="YesNoType"> | ||
808 | <xs:annotation> | ||
809 | <xs:documentation>Required to call the QueryServiceConfig and QueryServiceConfig2 functions to query the service configuration. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
810 | </xs:annotation> | ||
811 | </xs:attribute> | ||
812 | <xs:attribute name="ServiceChangeConfig" type="YesNoType"> | ||
813 | <xs:annotation> | ||
814 | <xs:documentation>Required to call the ChangeServiceConfig or ChangeServiceConfig2 function to change the service configuration. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
815 | </xs:annotation> | ||
816 | </xs:attribute> | ||
817 | <xs:attribute name="ServiceQueryStatus" type="YesNoType"> | ||
818 | <xs:annotation> | ||
819 | <xs:documentation>Required to call the QueryServiceStatus function to ask the service control manager about the status of the service. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
820 | </xs:annotation> | ||
821 | </xs:attribute> | ||
822 | <xs:attribute name="ServiceEnumerateDependents" type="YesNoType"> | ||
823 | <xs:annotation> | ||
824 | <xs:documentation>Required to call the EnumDependentServices function to enumerate all the services dependent on the service. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
825 | </xs:annotation> | ||
826 | </xs:attribute> | ||
827 | <xs:attribute name="ServiceStart" type="YesNoType"> | ||
828 | <xs:annotation> | ||
829 | <xs:documentation>Required to call the StartService function to start the service. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
830 | </xs:annotation> | ||
831 | </xs:attribute> | ||
832 | <xs:attribute name="ServiceStop" type="YesNoType"> | ||
833 | <xs:annotation> | ||
834 | <xs:documentation>Required to call the ControlService function to stop the service. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
835 | </xs:annotation> | ||
836 | </xs:attribute> | ||
837 | <xs:attribute name="ServicePauseContinue" type="YesNoType"> | ||
838 | <xs:annotation> | ||
839 | <xs:documentation>Required to call the ControlService function to pause or continue the service. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
840 | </xs:annotation> | ||
841 | </xs:attribute> | ||
842 | <xs:attribute name="ServiceInterrogate" type="YesNoType"> | ||
843 | <xs:annotation> | ||
844 | <xs:documentation>Required to call the ControlService function to ask the service to report its status immediately. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
845 | </xs:annotation> | ||
846 | </xs:attribute> | ||
847 | <xs:attribute name="ServiceUserDefinedControl" type="YesNoType"> | ||
848 | <xs:annotation> | ||
849 | <xs:documentation>Required to call the ControlService function to specify a user-defined control code. Only valid under a 'ServiceInstall' parent.</xs:documentation> | ||
850 | </xs:annotation> | ||
851 | </xs:attribute> | ||
852 | </xs:complexType> | ||
853 | </xs:element> | ||
854 | <xs:element name="ProductSearch"> | ||
855 | <xs:annotation> | ||
856 | <xs:documentation>Describes a product search.</xs:documentation> | ||
857 | <xs:appinfo> | ||
858 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
859 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
860 | </xs:appinfo> | ||
861 | </xs:annotation> | ||
862 | <xs:complexType> | ||
863 | <xs:attributeGroup ref="SearchCommonAttributes" /> | ||
864 | <xs:attribute name="Guid" type="xs:string"> | ||
865 | <xs:annotation> | ||
866 | <xs:documentation>The Guid attribute has been deprecated; use the ProductCode or UpgradeCode attribute instead. If this attribute is used, it is assumed to be a ProductCode.</xs:documentation> | ||
867 | </xs:annotation> | ||
868 | </xs:attribute> | ||
869 | <xs:attribute name="ProductCode" type="xs:string"> | ||
870 | <xs:annotation> | ||
871 | <xs:documentation>The ProductCode to use for the search. This attribute must be omitted if UpgradeCode is specified.</xs:documentation> | ||
872 | </xs:annotation> | ||
873 | </xs:attribute> | ||
874 | <xs:attribute name="UpgradeCode" type="xs:string"> | ||
875 | <xs:annotation> | ||
876 | <xs:documentation>The UpgradeCode to use for the search. This attribute must be omitted if ProductCode is specified. Note that if multiple products are found, the highest versioned product will be used for the result.</xs:documentation> | ||
877 | </xs:annotation> | ||
878 | </xs:attribute> | ||
879 | <xs:attribute name="Result"> | ||
880 | <xs:annotation> | ||
881 | <xs:documentation> | ||
882 | Rather than saving the product version into the variable, a ProductSearch can save another attribute of the matching product instead. | ||
883 | </xs:documentation> | ||
884 | </xs:annotation> | ||
885 | <xs:simpleType> | ||
886 | <xs:restriction base="xs:NMTOKEN"> | ||
887 | <xs:enumeration value="version"> | ||
888 | <xs:annotation> | ||
889 | <xs:documentation>Saves the version of a matching product if found; 0.0.0.0 otherwise. This is the default.</xs:documentation> | ||
890 | </xs:annotation> | ||
891 | </xs:enumeration> | ||
892 | <xs:enumeration value="language"> | ||
893 | <xs:annotation> | ||
894 | <xs:documentation>Saves the language of a matching product if found; empty otherwise.</xs:documentation> | ||
895 | </xs:annotation> | ||
896 | </xs:enumeration> | ||
897 | <xs:enumeration value="state"> | ||
898 | <xs:annotation> | ||
899 | <xs:documentation>Saves the state of the product: advertised (1), absent (2), or locally installed (5).</xs:documentation> | ||
900 | </xs:annotation> | ||
901 | </xs:enumeration> | ||
902 | <xs:enumeration value="assignment"> | ||
903 | <xs:annotation> | ||
904 | <xs:documentation>Saves the assignment type of the product: per-user (0), or per-machine (1).</xs:documentation> | ||
905 | </xs:annotation> | ||
906 | </xs:enumeration> | ||
907 | </xs:restriction> | ||
908 | </xs:simpleType> | ||
909 | </xs:attribute> | ||
910 | </xs:complexType> | ||
911 | </xs:element> | ||
912 | <xs:element name="ProductSearchRef"> | ||
913 | <xs:annotation> | ||
914 | <xs:documentation>References a ProductSearch.</xs:documentation> | ||
915 | <xs:appinfo> | ||
916 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
917 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
918 | </xs:appinfo> | ||
919 | </xs:annotation> | ||
920 | <xs:complexType> | ||
921 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
922 | </xs:complexType> | ||
923 | </xs:element> | ||
924 | <xs:element name="RemoveFolderEx"> | ||
925 | <xs:annotation> | ||
926 | <xs:appinfo> | ||
927 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
928 | <xse:msiRef table="RemoveFile" href="http://msdn.microsoft.com/library/aa371201.aspx"/> | ||
929 | <xse:remarks> | ||
930 | <html:p>The custom action that implements RemoveFolderEx does so by writing temporary rows to the RemoveFile table | ||
931 | for each subfolder of the root folder you specify. Because it might dramatically affect Windows Installer's | ||
932 | <html:a href="http://msdn.microsoft.com/en-us/library/aa368593.aspx">File Costing</html:a>, | ||
933 | the temporary rows must be written before the CostInitialize standard action. Unfortunately, MSI doesn't | ||
934 | create properties for the Directory hierarchy in your package until later, in the CostFinalize action.</html:p> | ||
935 | <html:p>An easy workaround for a typical use case of removing a folder during uninstall is to write the directory | ||
936 | path to the registry and to load it during uninstall. See | ||
937 | <html:a href="http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern">The WiX toolset's "Remember Property" pattern</html:a> | ||
938 | for an example.</html:p> | ||
939 | <html:p>If you use custom actions to set properties, ensure that they are scheduled before the WixRemoveFoldersEx custom action.</html:p> | ||
940 | </xse:remarks> | ||
941 | </xs:appinfo> | ||
942 | <xs:documentation> | ||
943 | Remove a folder and all contained files and folders if the parent component is selected for installation or removal. | ||
944 | The folder must be specified in the Property attribute as the name of a property that will have a value that resolves | ||
945 | to the full path of the folder before the CostInitialize action. Note that Directory ids cannot be used. | ||
946 | For more details, see the Remarks. | ||
947 | </xs:documentation> | ||
948 | </xs:annotation> | ||
949 | <xs:complexType> | ||
950 | <xs:attribute name="Id" type="xs:string"> | ||
951 | <xs:annotation> | ||
952 | <xs:documentation>Primary key used to identify this particular entry. If this is not specified, a stable identifier | ||
953 | will be generated at compile time based on the other attributes.</xs:documentation> | ||
954 | </xs:annotation> | ||
955 | </xs:attribute> | ||
956 | <xs:attribute name="Property" type="xs:string"> | ||
957 | <xs:annotation> | ||
958 | <xs:documentation> | ||
959 | The id of a property that resolves to the full path of the source directory. The property does not have | ||
960 | to exist in the installer database at creation time; it could be created at installation time by a custom | ||
961 | action, on the command line, etc. The property value can contain environment variables surrounded by | ||
962 | percent signs such as from a REG_EXPAND_SZ registry value; environment variables will be expanded before | ||
963 | being evaluated for a full path. | ||
964 | </xs:documentation> | ||
965 | </xs:annotation> | ||
966 | </xs:attribute> | ||
967 | <xs:attribute name="On"> | ||
968 | <xs:annotation> | ||
969 | <xs:documentation> | ||
970 | This value determines when the folder may be removed. | ||
971 | </xs:documentation> | ||
972 | </xs:annotation> | ||
973 | <xs:simpleType> | ||
974 | <xs:restriction base="xs:NMTOKEN"> | ||
975 | <xs:enumeration value="install"> | ||
976 | <xs:annotation> | ||
977 | <xs:documentation> | ||
978 | Removes the folder only when the parent component is being installed (msiInstallStateLocal or msiInstallStateSource). | ||
979 | </xs:documentation> | ||
980 | </xs:annotation> | ||
981 | </xs:enumeration> | ||
982 | <xs:enumeration value="uninstall"> | ||
983 | <xs:annotation> | ||
984 | <xs:documentation> | ||
985 | Default: Removes the folder only when the parent component is being removed (msiInstallStateAbsent). | ||
986 | </xs:documentation> | ||
987 | </xs:annotation> | ||
988 | </xs:enumeration> | ||
989 | <xs:enumeration value="both"> | ||
990 | <xs:annotation> | ||
991 | <xs:documentation> | ||
992 | Removes the folder when the parent component is being installed or removed. | ||
993 | </xs:documentation> | ||
994 | </xs:annotation> | ||
995 | </xs:enumeration> | ||
996 | </xs:restriction> | ||
997 | </xs:simpleType> | ||
998 | </xs:attribute> | ||
999 | </xs:complexType> | ||
1000 | </xs:element> | ||
1001 | <xs:element name="RestartResource"> | ||
1002 | <xs:annotation> | ||
1003 | <xs:documentation>Registers a resource with the Restart Manager.</xs:documentation> | ||
1004 | <xs:appinfo> | ||
1005 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
1006 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
1007 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" /> | ||
1008 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" /> | ||
1009 | </xs:appinfo> | ||
1010 | </xs:annotation> | ||
1011 | <xs:complexType> | ||
1012 | <xs:attribute name="Id" type="xs:string"> | ||
1013 | <xs:annotation> | ||
1014 | <xs:documentation>The unique identifier for this resource. A unique identifier will | ||
1015 | be generated automatically if not specified.</xs:documentation> | ||
1016 | </xs:annotation> | ||
1017 | </xs:attribute> | ||
1018 | <xs:attribute name="Path" type="xs:string"> | ||
1019 | <xs:annotation> | ||
1020 | <xs:documentation>The full path to the process module to register with the Restart Manager. | ||
1021 | This can be a formatted value that resolves to a full path.</xs:documentation> | ||
1022 | </xs:annotation> | ||
1023 | </xs:attribute> | ||
1024 | <xs:attribute name="ProcessName" type="xs:string"> | ||
1025 | <xs:annotation> | ||
1026 | <xs:documentation>The name of a process to register with the Restart Manager. | ||
1027 | This can be a formatted value that resolves to a process name.</xs:documentation> | ||
1028 | </xs:annotation> | ||
1029 | </xs:attribute> | ||
1030 | <xs:attribute name="ServiceName" type="xs:string"> | ||
1031 | <xs:annotation> | ||
1032 | <xs:documentation>The name of a Windows service to register with the Restart Manager. | ||
1033 | This can be a formatted value that resolves to a service name.</xs:documentation> | ||
1034 | </xs:annotation> | ||
1035 | </xs:attribute> | ||
1036 | </xs:complexType> | ||
1037 | </xs:element> | ||
1038 | <xs:element name="RegistrySearch"> | ||
1039 | <xs:annotation> | ||
1040 | <xs:documentation>Describes a registry search.</xs:documentation> | ||
1041 | <xs:appinfo> | ||
1042 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
1043 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
1044 | </xs:appinfo> | ||
1045 | </xs:annotation> | ||
1046 | <xs:complexType> | ||
1047 | <xs:attributeGroup ref="SearchCommonAttributes" /> | ||
1048 | <xs:attribute name="Root" use="required"> | ||
1049 | <xs:annotation> | ||
1050 | <xs:documentation>Registry root hive to search under.</xs:documentation> | ||
1051 | </xs:annotation> | ||
1052 | <xs:simpleType> | ||
1053 | <xs:restriction base="xs:NMTOKEN"> | ||
1054 | <xs:enumeration value="HKLM"> | ||
1055 | <xs:annotation> | ||
1056 | <xs:documentation>HKEY_LOCAL_MACHINE</xs:documentation> | ||
1057 | </xs:annotation> | ||
1058 | </xs:enumeration> | ||
1059 | <xs:enumeration value="HKCU"> | ||
1060 | <xs:annotation> | ||
1061 | <xs:documentation>HKEY_CURRENT_USER</xs:documentation> | ||
1062 | </xs:annotation> | ||
1063 | </xs:enumeration> | ||
1064 | <xs:enumeration value="HKCR"> | ||
1065 | <xs:annotation> | ||
1066 | <xs:documentation>HKEY_CLASSES_ROOT</xs:documentation> | ||
1067 | </xs:annotation> | ||
1068 | </xs:enumeration> | ||
1069 | <xs:enumeration value="HKU"> | ||
1070 | <xs:annotation> | ||
1071 | <xs:documentation>HKEY_USERS</xs:documentation> | ||
1072 | </xs:annotation> | ||
1073 | </xs:enumeration> | ||
1074 | </xs:restriction> | ||
1075 | </xs:simpleType> | ||
1076 | </xs:attribute> | ||
1077 | <xs:attribute name="Key" type="xs:string" use="required"> | ||
1078 | <xs:annotation> | ||
1079 | <xs:documentation>Key to search for.</xs:documentation> | ||
1080 | </xs:annotation> | ||
1081 | </xs:attribute> | ||
1082 | <xs:attribute name="Value" type="xs:string"> | ||
1083 | <xs:annotation> | ||
1084 | <xs:documentation>Optional value to search for under the given Key.</xs:documentation> | ||
1085 | </xs:annotation> | ||
1086 | </xs:attribute> | ||
1087 | <xs:attribute name="Format"> | ||
1088 | <xs:annotation> | ||
1089 | <xs:documentation>What format to return the value in.</xs:documentation> | ||
1090 | </xs:annotation> | ||
1091 | <xs:simpleType> | ||
1092 | <xs:restriction base="xs:NMTOKEN"> | ||
1093 | <xs:enumeration value="raw"> | ||
1094 | <xs:annotation> | ||
1095 | <xs:documentation>Returns the unformatted value directly from the registry. For example, a REG_DWORD value of '1' is returned as '1', not '#1'.</xs:documentation> | ||
1096 | </xs:annotation> | ||
1097 | </xs:enumeration> | ||
1098 | <xs:enumeration value="compatible"> | ||
1099 | <xs:annotation> | ||
1100 | <xs:documentation>Returns the value formatted as Windows Installer would. For example, a REG_DWORD value of '1' is returned as '#1', not '1'.</xs:documentation> | ||
1101 | </xs:annotation> | ||
1102 | </xs:enumeration> | ||
1103 | </xs:restriction> | ||
1104 | </xs:simpleType> | ||
1105 | </xs:attribute> | ||
1106 | <xs:attribute name="ExpandEnvironmentVariables" type="YesNoType"> | ||
1107 | <xs:annotation> | ||
1108 | <xs:documentation>Whether to expand any environment variables in REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ values.</xs:documentation> | ||
1109 | </xs:annotation> | ||
1110 | </xs:attribute> | ||
1111 | <xs:attribute name="Result"> | ||
1112 | <xs:annotation> | ||
1113 | <xs:documentation> | ||
1114 | Rather than saving the matching registry value into the variable, a RegistrySearch can save an attribute of the matching entry instead. | ||
1115 | </xs:documentation> | ||
1116 | </xs:annotation> | ||
1117 | <xs:simpleType> | ||
1118 | <xs:restriction base="xs:NMTOKEN"> | ||
1119 | <xs:enumeration value="exists"> | ||
1120 | <xs:annotation> | ||
1121 | <xs:documentation>Saves true if a matching registry entry is found; false otherwise.</xs:documentation> | ||
1122 | </xs:annotation> | ||
1123 | </xs:enumeration> | ||
1124 | <xs:enumeration value="value"> | ||
1125 | <xs:annotation> | ||
1126 | <xs:documentation>Saves the value of the registry key in the variable. This is the default.</xs:documentation> | ||
1127 | </xs:annotation> | ||
1128 | </xs:enumeration> | ||
1129 | </xs:restriction> | ||
1130 | </xs:simpleType> | ||
1131 | </xs:attribute> | ||
1132 | <xs:attribute name="Win64" type="YesNoType"> | ||
1133 | <xs:annotation> | ||
1134 | <xs:documentation>Instructs the search to look in the 64-bit registry when the value is 'yes'. When the value is 'no', the search looks in the 32-bit registry. The default value is 'no'.</xs:documentation> | ||
1135 | </xs:annotation> | ||
1136 | </xs:attribute> | ||
1137 | </xs:complexType> | ||
1138 | </xs:element> | ||
1139 | <xs:element name="RegistrySearchRef"> | ||
1140 | <xs:annotation> | ||
1141 | <xs:documentation>References a RegistrySearch.</xs:documentation> | ||
1142 | <xs:appinfo> | ||
1143 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" /> | ||
1144 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
1145 | </xs:appinfo> | ||
1146 | </xs:annotation> | ||
1147 | <xs:complexType> | ||
1148 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
1149 | </xs:complexType> | ||
1150 | </xs:element> | ||
1151 | <xs:element name="ServiceConfig"> | ||
1152 | <xs:annotation> | ||
1153 | <xs:documentation>Service configuration information for failure actions.</xs:documentation> | ||
1154 | <xs:appinfo> | ||
1155 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
1156 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="ServiceInstall" /> | ||
1157 | <xse:remarks> | ||
1158 | <html:dl> | ||
1159 | <html:dd>Nesting a ServiceConfig element under a ServiceInstall element will result in the service being installed to be configured.</html:dd> | ||
1160 | <html:dd>Nesting a ServiceConfig element under a component element will result in an already installed service to be configured. If the service does not exist prior to the install of the MSI package, the install will fail.</html:dd> | ||
1161 | </html:dl> | ||
1162 | </xse:remarks> | ||
1163 | </xs:appinfo> | ||
1164 | </xs:annotation> | ||
1165 | <xs:complexType> | ||
1166 | <xs:attribute name="ServiceName" type="xs:string"> | ||
1167 | <xs:annotation> | ||
1168 | <xs:documentation>Required if not under a ServiceInstall element.</xs:documentation> | ||
1169 | </xs:annotation> | ||
1170 | </xs:attribute> | ||
1171 | <xs:attribute name="FirstFailureActionType" use="required"> | ||
1172 | <xs:annotation> | ||
1173 | <xs:documentation>Action to take on the first failure of the service.</xs:documentation> | ||
1174 | </xs:annotation> | ||
1175 | <xs:simpleType> | ||
1176 | <xs:restriction base="xs:NMTOKEN"> | ||
1177 | <xs:enumeration value="none" /> | ||
1178 | <xs:enumeration value="reboot" /> | ||
1179 | <xs:enumeration value="restart" /> | ||
1180 | <xs:enumeration value="runCommand" /> | ||
1181 | </xs:restriction> | ||
1182 | </xs:simpleType> | ||
1183 | </xs:attribute> | ||
1184 | <xs:attribute name="SecondFailureActionType" use="required"> | ||
1185 | <xs:annotation> | ||
1186 | <xs:documentation>Action to take on the second failure of the service.</xs:documentation> | ||
1187 | </xs:annotation> | ||
1188 | <xs:simpleType> | ||
1189 | <xs:restriction base="xs:NMTOKEN"> | ||
1190 | <xs:enumeration value="none" /> | ||
1191 | <xs:enumeration value="reboot" /> | ||
1192 | <xs:enumeration value="restart" /> | ||
1193 | <xs:enumeration value="runCommand" /> | ||
1194 | </xs:restriction> | ||
1195 | </xs:simpleType> | ||
1196 | </xs:attribute> | ||
1197 | <xs:attribute name="ThirdFailureActionType" use="required"> | ||
1198 | <xs:annotation> | ||
1199 | <xs:documentation>Action to take on the third failure of the service.</xs:documentation> | ||
1200 | </xs:annotation> | ||
1201 | <xs:simpleType> | ||
1202 | <xs:restriction base="xs:NMTOKEN"> | ||
1203 | <xs:enumeration value="none" /> | ||
1204 | <xs:enumeration value="reboot" /> | ||
1205 | <xs:enumeration value="restart" /> | ||
1206 | <xs:enumeration value="runCommand" /> | ||
1207 | </xs:restriction> | ||
1208 | </xs:simpleType> | ||
1209 | </xs:attribute> | ||
1210 | <xs:attribute name="ResetPeriodInDays" type="xs:integer"> | ||
1211 | <xs:annotation> | ||
1212 | <xs:documentation>Number of days after which to reset the failure count to zero if there are no failures.</xs:documentation> | ||
1213 | </xs:annotation> | ||
1214 | </xs:attribute> | ||
1215 | <xs:attribute name="RestartServiceDelayInSeconds" type="xs:integer"> | ||
1216 | <xs:annotation> | ||
1217 | <xs:documentation>If any of the three *ActionType attributes is "restart", this specifies the number of seconds to wait before doing so.</xs:documentation> | ||
1218 | </xs:annotation> | ||
1219 | </xs:attribute> | ||
1220 | <xs:attribute name="ProgramCommandLine" type="xs:string"> | ||
1221 | <xs:annotation> | ||
1222 | <xs:documentation>If any of the three *ActionType attributes is "runCommand", this specifies the command to run when doing so. This value is formatted.</xs:documentation> | ||
1223 | </xs:annotation> | ||
1224 | </xs:attribute> | ||
1225 | <xs:attribute name="RebootMessage" type="xs:string"> | ||
1226 | <xs:annotation> | ||
1227 | <xs:documentation>If any of the three *ActionType attributes is "reboot", this specifies the message to broadcast to server users before doing so.</xs:documentation> | ||
1228 | </xs:annotation> | ||
1229 | </xs:attribute> | ||
1230 | </xs:complexType> | ||
1231 | </xs:element> | ||
1232 | <xs:element name="TouchFile"> | ||
1233 | <xs:annotation> | ||
1234 | <xs:documentation>Updates the last modified date/time of a file.</xs:documentation> | ||
1235 | <xs:appinfo> | ||
1236 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
1237 | </xs:appinfo> | ||
1238 | </xs:annotation> | ||
1239 | <xs:complexType> | ||
1240 | <xs:attribute name="Id" type="xs:string"> | ||
1241 | <xs:annotation> | ||
1242 | <xs:documentation>Identifier for the touch file operation. If the identifier is not specified it will be generated.</xs:documentation> | ||
1243 | </xs:annotation> | ||
1244 | </xs:attribute> | ||
1245 | <xs:attribute name="Path" use="required" type="xs:string"> | ||
1246 | <xs:annotation> | ||
1247 | <xs:documentation>Path of the file to update. This value is formatted.</xs:documentation> | ||
1248 | </xs:annotation> | ||
1249 | </xs:attribute> | ||
1250 | <xs:attribute name="OnInstall" type="YesNoType"> | ||
1251 | <xs:annotation> | ||
1252 | <xs:documentation>Specifies whether or not the modified time of the file should be updated on install. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'.</xs:documentation> | ||
1253 | </xs:annotation> | ||
1254 | </xs:attribute> | ||
1255 | <xs:attribute name="OnReinstall" type="YesNoType"> | ||
1256 | <xs:annotation> | ||
1257 | <xs:documentation>Specifies whether or not the modified time of the file should be updated on reinstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'.</xs:documentation> | ||
1258 | </xs:annotation> | ||
1259 | </xs:attribute> | ||
1260 | <xs:attribute name="OnUninstall" type="YesNoType"> | ||
1261 | <xs:annotation> | ||
1262 | <xs:documentation>Specifies whether or not the modified time of the file should be updated on uninstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'no'.</xs:documentation> | ||
1263 | </xs:annotation> | ||
1264 | </xs:attribute> | ||
1265 | <xs:attribute name="Nonvital" type="YesNoType"> | ||
1266 | <xs:annotation> | ||
1267 | <xs:documentation>Indicates the installation will succeed even if the modified time of the file cannot be updated. The default is 'no'.</xs:documentation> | ||
1268 | </xs:annotation> | ||
1269 | </xs:attribute> | ||
1270 | </xs:complexType> | ||
1271 | </xs:element> | ||
1272 | <xs:element name="User"> | ||
1273 | <xs:annotation> | ||
1274 | <xs:documentation>User for all kinds of things. When it is not nested under a component it is included in the MSI so it can be referenced by other elements such as the User attribute in the AppPool element. When it is nested under a Component element, the User will be created on install and can also be used for reference.</xs:documentation> | ||
1275 | <xs:appinfo> | ||
1276 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
1277 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" /> | ||
1278 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" /> | ||
1279 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" /> | ||
1280 | <xse:seeAlso ref="Group" /> | ||
1281 | <xse:seeAlso ref="GroupRef" /> | ||
1282 | </xs:appinfo> | ||
1283 | </xs:annotation> | ||
1284 | <xs:complexType> | ||
1285 | <xs:sequence> | ||
1286 | <xs:element ref="GroupRef" minOccurs="0" maxOccurs="unbounded" /> | ||
1287 | </xs:sequence> | ||
1288 | <xs:attribute name="Id" type="xs:string" use="required" /> | ||
1289 | <xs:attribute name="Name" use="required" type="xs:string"> | ||
1290 | <xs:annotation> | ||
1291 | <xs:documentation>A <a href="http://msdn.microsoft.com/library/aa368609.aspx" target="_blank">Formatted</a> string that contains the name of the user account.</xs:documentation> | ||
1292 | </xs:annotation> | ||
1293 | </xs:attribute> | ||
1294 | <xs:attribute name="Domain" type="xs:string"> | ||
1295 | <xs:annotation> | ||
1296 | <xs:documentation>A <a href="http://msdn.microsoft.com/library/aa368609.aspx" target="_blank">Formatted</a> string that contains the local machine or Active Directory domain for the user.</xs:documentation> | ||
1297 | </xs:annotation> | ||
1298 | </xs:attribute> | ||
1299 | <xs:attribute name="Password" type="xs:string"> | ||
1300 | <xs:annotation> | ||
1301 | <xs:documentation>Usually a Property that is passed in on the command-line to keep it more secure.</xs:documentation> | ||
1302 | </xs:annotation> | ||
1303 | </xs:attribute> | ||
1304 | <xs:attribute name="PasswordNeverExpires" type="YesNoType"> | ||
1305 | <xs:annotation> | ||
1306 | <xs:documentation>The account's password never expires. Equivalent to UF_DONT_EXPIRE_PASSWD.</xs:documentation> | ||
1307 | </xs:annotation> | ||
1308 | </xs:attribute> | ||
1309 | <xs:attribute name="CanNotChangePassword" type="YesNoType"> | ||
1310 | <xs:annotation> | ||
1311 | <xs:documentation>The user cannot change the account's password. Equivalent to UF_PASSWD_CANT_CHANGE.</xs:documentation> | ||
1312 | </xs:annotation> | ||
1313 | </xs:attribute> | ||
1314 | <xs:attribute name="RemoveOnUninstall" type="YesNoType"> | ||
1315 | <xs:annotation> | ||
1316 | <xs:documentation>Indicates whether the user account should be removed or left behind on uninstall.</xs:documentation> | ||
1317 | </xs:annotation> | ||
1318 | </xs:attribute> | ||
1319 | <xs:attribute name="FailIfExists" type="YesNoType"> | ||
1320 | <xs:annotation> | ||
1321 | <xs:documentation>Indicates if the install should fail if the user already exists.</xs:documentation> | ||
1322 | </xs:annotation> | ||
1323 | </xs:attribute> | ||
1324 | <xs:attribute name="LogonAsService" type="YesNoType"> | ||
1325 | <xs:annotation> | ||
1326 | <xs:documentation>Indicates whether or not the user can logon as a serivce. User creation can be skipped if all that is desired is to set this access right on the user.</xs:documentation> | ||
1327 | </xs:annotation> | ||
1328 | </xs:attribute> | ||
1329 | <xs:attribute name="LogonAsBatchJob" type="YesNoType"> | ||
1330 | <xs:annotation> | ||
1331 | <xs:documentation>Indicates whether or not the user can logon as a batch job. User creation can be skipped if all that is desired is to set this access right on the user.</xs:documentation> | ||
1332 | </xs:annotation> | ||
1333 | </xs:attribute> | ||
1334 | <xs:attribute name="UpdateIfExists" type="YesNoType"> | ||
1335 | <xs:annotation> | ||
1336 | <xs:documentation>Indicates if the user account properties should be updated if the user already exists.</xs:documentation> | ||
1337 | </xs:annotation> | ||
1338 | </xs:attribute> | ||
1339 | <xs:attribute name="PasswordExpired" type="YesNoType"> | ||
1340 | <xs:annotation> | ||
1341 | <xs:documentation>Indicates whether the user must change their password on their first login.</xs:documentation> | ||
1342 | </xs:annotation> | ||
1343 | </xs:attribute> | ||
1344 | <xs:attribute name="Disabled" type="YesNoType"> | ||
1345 | <xs:annotation> | ||
1346 | <xs:documentation>The account is disabled. Equivalent to UF_ACCOUNTDISABLE.</xs:documentation> | ||
1347 | </xs:annotation> | ||
1348 | </xs:attribute> | ||
1349 | <xs:attribute name="CreateUser" type="YesNoType"> | ||
1350 | <xs:annotation> | ||
1351 | <xs:documentation>Indicates whether or not to create the user. User creation can be skipped if all that is desired is to join a user to groups.</xs:documentation> | ||
1352 | </xs:annotation> | ||
1353 | </xs:attribute> | ||
1354 | <xs:attribute name="Vital" type="YesNoType" default="yes"> | ||
1355 | <xs:annotation> | ||
1356 | <xs:documentation>Indicates whether failure to create the user or add the user to a group fails the installation. The default value is "yes".</xs:documentation> | ||
1357 | </xs:annotation> | ||
1358 | </xs:attribute> | ||
1359 | </xs:complexType> | ||
1360 | </xs:element> | ||
1361 | <xs:element name="XmlFile"> | ||
1362 | <xs:annotation> | ||
1363 | <xs:documentation> | ||
1364 | Adds or removes .xml file entries. If you use the XmlFile element you must reference WixUtilExtension.dll as it contains the XmlFile custom actions. | ||
1365 | </xs:documentation> | ||
1366 | <xs:appinfo> | ||
1367 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
1368 | </xs:appinfo> | ||
1369 | </xs:annotation> | ||
1370 | <xs:complexType> | ||
1371 | <xs:attribute name="Id" use="required" type="xs:string"> | ||
1372 | <xs:annotation> | ||
1373 | <xs:documentation>Identifier for xml file modification.</xs:documentation> | ||
1374 | </xs:annotation> | ||
1375 | </xs:attribute> | ||
1376 | <xs:attribute name="ElementPath" use="required" type="xs:string"> | ||
1377 | <xs:annotation> | ||
1378 | <xs:documentation>The XPath of the element to be modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.</xs:documentation> | ||
1379 | </xs:annotation> | ||
1380 | </xs:attribute> | ||
1381 | <xs:attribute name="File" use="required" type="xs:string"> | ||
1382 | <xs:annotation> | ||
1383 | <xs:documentation>Path of the .xml file to configure.</xs:documentation> | ||
1384 | </xs:annotation> | ||
1385 | </xs:attribute> | ||
1386 | <xs:attribute name="Name" type="xs:string"> | ||
1387 | <xs:annotation> | ||
1388 | <xs:documentation>Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set.</xs:documentation> | ||
1389 | </xs:annotation> | ||
1390 | </xs:attribute> | ||
1391 | <xs:attribute name="Value" type="xs:string"> | ||
1392 | <xs:annotation> | ||
1393 | <xs:documentation> | ||
1394 | The value to be written. See the <html:a href="http://msdn.microsoft.com/library/aa368609(VS.85).aspx" target="_blank">Formatted topic</html:a> for information how to escape square brackets in the value. | ||
1395 | </xs:documentation> | ||
1396 | </xs:annotation> | ||
1397 | </xs:attribute> | ||
1398 | <xs:attribute name="Action" use="required"> | ||
1399 | <xs:annotation> | ||
1400 | <xs:documentation>The type of modification to be made to the XML file when the component is installed.</xs:documentation> | ||
1401 | </xs:annotation> | ||
1402 | <xs:simpleType> | ||
1403 | <xs:restriction base="xs:NMTOKEN"> | ||
1404 | <xs:enumeration value="createElement"> | ||
1405 | <xs:annotation> | ||
1406 | <xs:documentation>Creates a new element under the element specified in ElementPath. The Name attribute is required in this case and specifies the name of the new element. The Value attribute is not necessary when createElement is specified as the action. If the Value attribute is set, it will cause the new element's text value to be set.</xs:documentation> | ||
1407 | </xs:annotation> | ||
1408 | </xs:enumeration> | ||
1409 | <xs:enumeration value="deleteValue"> | ||
1410 | <xs:annotation> | ||
1411 | <xs:documentation>Deletes a value from the element specified in the ElementPath. If Name is specified, the attribute with that name is deleted. If Name is not specified, the text value of the element specified in the ElementPath is deleted. The Value attribute is ignored if deleteValue is the action specified.</xs:documentation> | ||
1412 | </xs:annotation> | ||
1413 | </xs:enumeration> | ||
1414 | <xs:enumeration value="setValue"> | ||
1415 | <xs:annotation> | ||
1416 | <xs:documentation>Sets a value in the element specified in the ElementPath. If Name is specified, and attribute with that name is set to the value specified in Value. If Name is not specified, the text value of the element is set. Value is a required attribute if setValue is the action specified.</xs:documentation> | ||
1417 | </xs:annotation> | ||
1418 | </xs:enumeration> | ||
1419 | <xs:enumeration value="bulkSetValue"> | ||
1420 | <xs:annotation> | ||
1421 | <xs:documentation>Sets all the values in the elements that match the ElementPath. If Name is specified, attributes with that name are set to the same value specified in Value. If Name is not specified, the text values of the elements are set. Value is a required attribute if setBulkValue is the action specified.</xs:documentation> | ||
1422 | </xs:annotation> | ||
1423 | </xs:enumeration> | ||
1424 | </xs:restriction> | ||
1425 | </xs:simpleType> | ||
1426 | </xs:attribute> | ||
1427 | <xs:attribute name="Permanent" type="YesNoType"> | ||
1428 | <xs:annotation> | ||
1429 | <xs:documentation>Specifies whether or not the modification should be removed on uninstall. This has no effect on uninstall if the action was deleteValue.</xs:documentation> | ||
1430 | </xs:annotation> | ||
1431 | </xs:attribute> | ||
1432 | <xs:attribute name="PreserveModifiedDate" type="YesNoType"> | ||
1433 | <xs:annotation> | ||
1434 | <xs:documentation>Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made.</xs:documentation> | ||
1435 | </xs:annotation> | ||
1436 | </xs:attribute> | ||
1437 | <xs:attribute name="Sequence" use="optional" type="xs:integer"> | ||
1438 | <xs:annotation> | ||
1439 | <xs:documentation>Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them.</xs:documentation> | ||
1440 | </xs:annotation> | ||
1441 | </xs:attribute> | ||
1442 | <xs:attribute name="SelectionLanguage"> | ||
1443 | <xs:annotation> | ||
1444 | <xs:documentation> | ||
1445 | Specify whether the DOM object should use XPath language or the old XSLPattern language (default) as the query language. | ||
1446 | </xs:documentation> | ||
1447 | </xs:annotation> | ||
1448 | <xs:simpleType> | ||
1449 | <xs:restriction base="xs:NMTOKEN"> | ||
1450 | <xs:enumeration value="XPath" /> | ||
1451 | <xs:enumeration value="XSLPattern" /> | ||
1452 | </xs:restriction> | ||
1453 | </xs:simpleType> | ||
1454 | </xs:attribute> | ||
1455 | </xs:complexType> | ||
1456 | </xs:element> | ||
1457 | <xs:element name="XmlConfig"> | ||
1458 | <xs:annotation> | ||
1459 | <xs:documentation> | ||
1460 | Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions. | ||
1461 | </xs:documentation> | ||
1462 | <xs:appinfo> | ||
1463 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" /> | ||
1464 | </xs:appinfo> | ||
1465 | </xs:annotation> | ||
1466 | <xs:complexType mixed="true"> | ||
1467 | <xs:sequence> | ||
1468 | <xs:element ref="XmlConfig" minOccurs="0" maxOccurs="unbounded" /> | ||
1469 | </xs:sequence> | ||
1470 | <xs:attribute name="Id" use="required" type="xs:string"> | ||
1471 | <xs:annotation> | ||
1472 | <xs:documentation>Identifier for xml file modification.</xs:documentation> | ||
1473 | </xs:annotation> | ||
1474 | </xs:attribute> | ||
1475 | <xs:attribute name="Action"> | ||
1476 | <xs:simpleType> | ||
1477 | <xs:restriction base="xs:NMTOKEN"> | ||
1478 | <xs:enumeration value="create" /> | ||
1479 | <xs:enumeration value="delete" /> | ||
1480 | </xs:restriction> | ||
1481 | </xs:simpleType> | ||
1482 | </xs:attribute> | ||
1483 | <xs:attribute name="ElementId" type="xs:string"> | ||
1484 | <xs:annotation> | ||
1485 | <xs:documentation>The Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted.</xs:documentation> | ||
1486 | </xs:annotation> | ||
1487 | </xs:attribute> | ||
1488 | <xs:attribute name="ElementPath" type="xs:string"> | ||
1489 | <xs:annotation> | ||
1490 | <xs:documentation>The XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.</xs:documentation> | ||
1491 | </xs:annotation> | ||
1492 | </xs:attribute> | ||
1493 | <xs:attribute name="File" use="required" type="xs:string"> | ||
1494 | <xs:annotation> | ||
1495 | <xs:documentation>Path of the .xml file to configure.</xs:documentation> | ||
1496 | </xs:annotation> | ||
1497 | </xs:attribute> | ||
1498 | <xs:attribute name="Name" type="xs:string"> | ||
1499 | <xs:annotation> | ||
1500 | <xs:documentation>Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set.</xs:documentation> | ||
1501 | </xs:annotation> | ||
1502 | </xs:attribute> | ||
1503 | <xs:attribute name="Node"> | ||
1504 | <xs:simpleType> | ||
1505 | <xs:restriction base="xs:NMTOKEN"> | ||
1506 | <xs:enumeration value="element" /> | ||
1507 | <xs:enumeration value="value" /> | ||
1508 | <xs:enumeration value="document" /> | ||
1509 | </xs:restriction> | ||
1510 | </xs:simpleType> | ||
1511 | </xs:attribute> | ||
1512 | <xs:attribute name="On"> | ||
1513 | <xs:simpleType> | ||
1514 | <xs:restriction base="xs:NMTOKEN"> | ||
1515 | <xs:enumeration value="install" /> | ||
1516 | <xs:enumeration value="uninstall" /> | ||
1517 | </xs:restriction> | ||
1518 | </xs:simpleType> | ||
1519 | </xs:attribute> | ||
1520 | <xs:attribute name="PreserveModifiedDate" type="YesNoType"> | ||
1521 | <xs:annotation> | ||
1522 | <xs:documentation>Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made.</xs:documentation> | ||
1523 | </xs:annotation> | ||
1524 | </xs:attribute> | ||
1525 | <xs:attribute name="Sequence" use="optional" type="xs:integer"> | ||
1526 | <xs:annotation> | ||
1527 | <xs:documentation>Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them.</xs:documentation> | ||
1528 | </xs:annotation> | ||
1529 | </xs:attribute> | ||
1530 | <xs:attribute name="Value" type="xs:string"> | ||
1531 | <xs:annotation> | ||
1532 | <xs:documentation> | ||
1533 | The value to be written. See the <html:a href="http://msdn.microsoft.com/library/aa368609(VS.85).aspx" target="_blank">Formatted topic</html:a> for information how to escape square brackets in the value. | ||
1534 | </xs:documentation> | ||
1535 | </xs:annotation> | ||
1536 | </xs:attribute> | ||
1537 | <xs:attribute name="VerifyPath" type="xs:string"> | ||
1538 | <xs:annotation> | ||
1539 | <xs:documentation>The XPath to the element being modified. This is required for 'delete' actions. For 'create' actions, VerifyPath is used to decide if the element already exists. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.</xs:documentation> | ||
1540 | </xs:annotation> | ||
1541 | </xs:attribute> | ||
1542 | </xs:complexType> | ||
1543 | </xs:element> | ||
1544 | <xs:attributeGroup name="SearchCommonAttributes"> | ||
1545 | <xs:attribute name="Id" type="xs:string"> | ||
1546 | <xs:annotation> | ||
1547 | <xs:documentation>Id of the search for ordering and dependency.</xs:documentation> | ||
1548 | </xs:annotation> | ||
1549 | </xs:attribute> | ||
1550 | <xs:attribute name="Variable" type="xs:string" use="required"> | ||
1551 | <xs:annotation> | ||
1552 | <xs:documentation>Name of the variable in which to place the result of the search.</xs:documentation> | ||
1553 | </xs:annotation> | ||
1554 | </xs:attribute> | ||
1555 | <xs:attribute name="Condition" type="xs:string"> | ||
1556 | <xs:annotation> | ||
1557 | <xs:documentation>Condition for evaluating the search. If this evaluates to false, the search is not executed at all.</xs:documentation> | ||
1558 | </xs:annotation> | ||
1559 | </xs:attribute> | ||
1560 | <xs:attribute name="After" type="xs:string"> | ||
1561 | <xs:annotation> | ||
1562 | <xs:documentation>Id of the search that this one should come after.</xs:documentation> | ||
1563 | </xs:annotation> | ||
1564 | </xs:attribute> | ||
1565 | </xs:attributeGroup> | ||
1566 | <xs:simpleType name="YesNoType"> | ||
1567 | <xs:annotation> | ||
1568 | <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation> | ||
1569 | </xs:annotation> | ||
1570 | <xs:restriction base="xs:NMTOKEN"> | ||
1571 | <xs:enumeration value="no" /> | ||
1572 | <xs:enumeration value="yes" /> | ||
1573 | </xs:restriction> | ||
1574 | </xs:simpleType> | ||
1575 | <xs:simpleType name="PerformanceCounterLanguageType"> | ||
1576 | <xs:annotation> | ||
1577 | <xs:documentation>Enumeration of valid languages for performance counters.</xs:documentation> | ||
1578 | </xs:annotation> | ||
1579 | <xs:restriction base="xs:NMTOKEN"> | ||
1580 | <xs:enumeration value="afrikaans" /> | ||
1581 | <xs:enumeration value="albanian" /> | ||
1582 | <xs:enumeration value="arabic" /> | ||
1583 | <xs:enumeration value="armenian" /> | ||
1584 | <xs:enumeration value="assamese" /> | ||
1585 | <xs:enumeration value="azeri" /> | ||
1586 | <xs:enumeration value="basque" /> | ||
1587 | <xs:enumeration value="belarusian" /> | ||
1588 | <xs:enumeration value="bengali" /> | ||
1589 | <xs:enumeration value="bulgarian" /> | ||
1590 | <xs:enumeration value="catalan" /> | ||
1591 | <xs:enumeration value="chinese" /> | ||
1592 | <xs:enumeration value="croatian" /> | ||
1593 | <xs:enumeration value="czech" /> | ||
1594 | <xs:enumeration value="danish" /> | ||
1595 | <xs:enumeration value="divehi" /> | ||
1596 | <xs:enumeration value="dutch" /> | ||
1597 | <xs:enumeration value="english" /> | ||
1598 | <xs:enumeration value="estonian" /> | ||
1599 | <xs:enumeration value="faeroese" /> | ||
1600 | <xs:enumeration value="farsi" /> | ||
1601 | <xs:enumeration value="finnish" /> | ||
1602 | <xs:enumeration value="french" /> | ||
1603 | <xs:enumeration value="galician" /> | ||
1604 | <xs:enumeration value="georgian" /> | ||
1605 | <xs:enumeration value="german" /> | ||
1606 | <xs:enumeration value="greek" /> | ||
1607 | <xs:enumeration value="gujarati" /> | ||
1608 | <xs:enumeration value="hebrew" /> | ||
1609 | <xs:enumeration value="hindi" /> | ||
1610 | <xs:enumeration value="hungarian" /> | ||
1611 | <xs:enumeration value="icelandic" /> | ||
1612 | <xs:enumeration value="indonesian" /> | ||
1613 | <xs:enumeration value="italian" /> | ||
1614 | <xs:enumeration value="japanese" /> | ||
1615 | <xs:enumeration value="kannada" /> | ||
1616 | <xs:enumeration value="kashmiri" /> | ||
1617 | <xs:enumeration value="kazak" /> | ||
1618 | <xs:enumeration value="konkani" /> | ||
1619 | <xs:enumeration value="korean" /> | ||
1620 | <xs:enumeration value="kyrgyz" /> | ||
1621 | <xs:enumeration value="latvian" /> | ||
1622 | <xs:enumeration value="lithuanian" /> | ||
1623 | <xs:enumeration value="macedonian" /> | ||
1624 | <xs:enumeration value="malay" /> | ||
1625 | <xs:enumeration value="malayalam" /> | ||
1626 | <xs:enumeration value="manipuri" /> | ||
1627 | <xs:enumeration value="marathi" /> | ||
1628 | <xs:enumeration value="mongolian" /> | ||
1629 | <xs:enumeration value="nepali" /> | ||
1630 | <xs:enumeration value="norwegian" /> | ||
1631 | <xs:enumeration value="oriya" /> | ||
1632 | <xs:enumeration value="polish" /> | ||
1633 | <xs:enumeration value="portuguese" /> | ||
1634 | <xs:enumeration value="punjabi" /> | ||
1635 | <xs:enumeration value="romanian" /> | ||
1636 | <xs:enumeration value="russian" /> | ||
1637 | <xs:enumeration value="sanskrit" /> | ||
1638 | <xs:enumeration value="serbian" /> | ||
1639 | <xs:enumeration value="sindhi" /> | ||
1640 | <xs:enumeration value="slovak" /> | ||
1641 | <xs:enumeration value="slovenian" /> | ||
1642 | <xs:enumeration value="spanish" /> | ||
1643 | <xs:enumeration value="swahili" /> | ||
1644 | <xs:enumeration value="swedish" /> | ||
1645 | <xs:enumeration value="syriac" /> | ||
1646 | <xs:enumeration value="tamil" /> | ||
1647 | <xs:enumeration value="tatar" /> | ||
1648 | <xs:enumeration value="telugu" /> | ||
1649 | <xs:enumeration value="thai" /> | ||
1650 | <xs:enumeration value="turkish" /> | ||
1651 | <xs:enumeration value="ukrainian" /> | ||
1652 | <xs:enumeration value="urdu" /> | ||
1653 | <xs:enumeration value="uzbek" /> | ||
1654 | <xs:enumeration value="vietnamese" /> | ||
1655 | </xs:restriction> | ||
1656 | </xs:simpleType> | ||
1657 | <xs:simpleType name="PerformanceCounterTypesType"> | ||
1658 | <xs:annotation> | ||
1659 | <xs:documentation>Enumeration of valid types for performance counters.</xs:documentation> | ||
1660 | </xs:annotation> | ||
1661 | <xs:restriction base="xs:NMTOKEN"> | ||
1662 | <xs:enumeration value="averageBase" /> | ||
1663 | <xs:enumeration value="averageCount64" /> | ||
1664 | <xs:enumeration value="averageTimer32" /> | ||
1665 | <xs:enumeration value="counterDelta32" /> | ||
1666 | <xs:enumeration value="counterTimerInverse" /> | ||
1667 | <xs:enumeration value="sampleFraction" /> | ||
1668 | <xs:enumeration value="timer100Ns" /> | ||
1669 | <xs:enumeration value="counterTimer" /> | ||
1670 | <xs:enumeration value="rawFraction" /> | ||
1671 | <xs:enumeration value="timer100NsInverse" /> | ||
1672 | <xs:enumeration value="counterMultiTimer" /> | ||
1673 | <xs:enumeration value="counterMultiTimer100Ns" /> | ||
1674 | <xs:enumeration value="counterMultiTimerInverse" /> | ||
1675 | <xs:enumeration value="counterMultiTimer100NsInverse" /> | ||
1676 | <xs:enumeration value="elapsedTime" /> | ||
1677 | <xs:enumeration value="sampleBase" /> | ||
1678 | <xs:enumeration value="rawBase" /> | ||
1679 | <xs:enumeration value="counterMultiBase" /> | ||
1680 | <xs:enumeration value="rateOfCountsPerSecond64" /> | ||
1681 | <xs:enumeration value="rateOfCountsPerSecond32" /> | ||
1682 | <xs:enumeration value="countPerTimeInterval64" /> | ||
1683 | <xs:enumeration value="countPerTimeInterval32" /> | ||
1684 | <xs:enumeration value="sampleCounter" /> | ||
1685 | <xs:enumeration value="counterDelta64" /> | ||
1686 | <xs:enumeration value="numberOfItems64" /> | ||
1687 | <xs:enumeration value="numberOfItems32" /> | ||
1688 | <xs:enumeration value="numberOfItemsHEX64" /> | ||
1689 | <xs:enumeration value="numberOfItemsHEX32" /> | ||
1690 | </xs:restriction> | ||
1691 | </xs:simpleType> | ||
1692 | </xs:schema> | ||
diff --git a/src/wixlib/UtilExtension.wxs b/src/wixlib/UtilExtension.wxs new file mode 100644 index 00000000..ac11c788 --- /dev/null +++ b/src/wixlib/UtilExtension.wxs | |||
@@ -0,0 +1,430 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | <?include caerr.wxi ?> | ||
7 | |||
8 | <Fragment> | ||
9 | <UI Id="ConfigureUsersErrorText"> | ||
10 | <Error Id="$(var.msierrUSRFailedUserCreate)">!(loc.msierrUSRFailedUserCreate)</Error> | ||
11 | <Error Id="$(var.msierrUSRFailedUserCreatePswd)">!(loc.msierrUSRFailedUserCreatePswd)</Error> | ||
12 | <Error Id="$(var.msierrUSRFailedUserGroupAdd)">!(loc.msierrUSRFailedUserGroupAdd)</Error> | ||
13 | <Error Id="$(var.msierrUSRFailedGrantLogonAsService)">Failed to grant 'logon as service' rights to user. ([2] [3] [4] [5])</Error> | ||
14 | <Error Id="$(var.msierrUSRFailedUserCreateExists)">!(loc.msierrUSRFailedUserCreateExists)</Error> | ||
15 | </UI> | ||
16 | </Fragment> | ||
17 | |||
18 | <Fragment> | ||
19 | <UI Id="ConfigureSmbErrorsText"> | ||
20 | <Error Id="$(var.msierrSMBFailedCreate)">!(loc.msierrSMBFailedCreate)</Error> | ||
21 | <Error Id="$(var.msierrSMBFailedDrop)">!(loc.msierrSMBFailedDrop)</Error> | ||
22 | </UI> | ||
23 | </Fragment> | ||
24 | |||
25 | <Fragment> | ||
26 | <UI Id="PerCounterDataErrorsText"> | ||
27 | <Error Id="$(var.msierrInstallPerfCounterData)">!(loc.msierrInstallPerfCounterData)</Error> | ||
28 | <Error Id="$(var.msierrUninstallPerfCounterData)">!(loc.msierrUninstallPerfCounterData)</Error> | ||
29 | </UI> | ||
30 | </Fragment> | ||
31 | |||
32 | <Fragment> | ||
33 | <UI Id="ConfigurePerfmonErrorsText"> | ||
34 | <Error Id="$(var.msierrPERFMONFailedRegisterDLL)">!(loc.msierrPERFMONFailedRegisterDLL)</Error> | ||
35 | <Error Id="$(var.msierrPERFMONFailedUnregisterDLL)">!(loc.msierrPERFMONFailedUnregisterDLL)</Error> | ||
36 | </UI> | ||
37 | </Fragment> | ||
38 | |||
39 | <Fragment> | ||
40 | <UI Id="SecureObjectsErrors"> | ||
41 | <Error Id="$(var.msierrSecureObjectsFailedCreateSD)">!(loc.msierrSecureObjectsFailedCreateSD)</Error> | ||
42 | <Error Id="$(var.msierrSecureObjectsFailedSet)">!(loc.msierrSecureObjectsFailedSet)</Error> | ||
43 | <Error Id="$(var.msierrSecureObjectsUnknownType)">!(loc.msierrSecureObjectsUnknownType)</Error> | ||
44 | </UI> | ||
45 | </Fragment> | ||
46 | |||
47 | <Fragment> | ||
48 | <UI Id="XmlFileErrorsText"> | ||
49 | <Error Id="$(var.msierrXmlFileFailedRead)">!(loc.msierrXmlFileFailedRead)</Error> | ||
50 | <Error Id="$(var.msierrXmlFileFailedOpen)">!(loc.msierrXmlFileFailedOpen)</Error> | ||
51 | <Error Id="$(var.msierrXmlFileFailedSelect)">!(loc.msierrXmlFileFailedSelect)</Error> | ||
52 | <Error Id="$(var.msierrXmlFileFailedSave)">!(loc.msierrXmlFileFailedSave)</Error> | ||
53 | </UI> | ||
54 | </Fragment> | ||
55 | |||
56 | <Fragment> | ||
57 | <UI Id="XmlConfigErrorsText"> | ||
58 | <Error Id="$(var.msierrXmlConfigFailedRead)">!(loc.msierrXmlConfigFailedRead)</Error> | ||
59 | <Error Id="$(var.msierrXmlConfigFailedOpen)">!(loc.msierrXmlConfigFailedOpen)</Error> | ||
60 | <Error Id="$(var.msierrXmlConfigFailedSelect)">!(loc.msierrXmlConfigFailedSelect)</Error> | ||
61 | <Error Id="$(var.msierrXmlConfigFailedSave)">!(loc.msierrXmlConfigFailedSave)</Error> | ||
62 | </UI> | ||
63 | </Fragment> | ||
64 | |||
65 | <Fragment> | ||
66 | <CustomAction Id="WixFailWhenDeferred" BinaryKey="WixCA" DllEntry="WixFailWhenDeferred" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
67 | |||
68 | <InstallExecuteSequence> | ||
69 | <Custom Action="WixFailWhenDeferred" Before="InstallFinalize" Overridable="yes">WIXFAILWHENDEFERRED=1 AND VersionNT > 400</Custom> | ||
70 | </InstallExecuteSequence> | ||
71 | </Fragment> | ||
72 | |||
73 | <Fragment> | ||
74 | <CustomAction Id="WixWaitForEvent" BinaryKey="WixCA" DllEntry="WixWaitForEvent" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
75 | |||
76 | <InstallExecuteSequence> | ||
77 | <Custom Action="WixWaitForEvent" Before="InstallFinalize" Overridable="yes" /> | ||
78 | </InstallExecuteSequence> | ||
79 | </Fragment> | ||
80 | |||
81 | <Fragment> | ||
82 | <CustomAction Id="WixWaitForEventDeferred" BinaryKey="WixCA" DllEntry="WixWaitForEvent" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
83 | |||
84 | <InstallExecuteSequence> | ||
85 | <Custom Action="WixWaitForEventDeferred" After="InstallInitialize" Overridable="yes" /> | ||
86 | </InstallExecuteSequence> | ||
87 | </Fragment> | ||
88 | |||
89 | <Fragment> | ||
90 | <CustomAction Id="WixExitEarlyWithSuccess" BinaryKey="WixCA" DllEntry="WixExitEarlyWithSuccess" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
91 | |||
92 | <InstallExecuteSequence> | ||
93 | <Custom Action="WixExitEarlyWithSuccess" After="FindRelatedProducts" Overridable="yes">NEWERVERSIONDETECTED AND VersionNT > 400</Custom> | ||
94 | </InstallExecuteSequence> | ||
95 | </Fragment> | ||
96 | |||
97 | <Fragment> | ||
98 | <CustomAction Id="WixRemoveFoldersEx" BinaryKey="WixCA" DllEntry="WixRemoveFoldersEx" Execute="immediate" Return="ignore" /> | ||
99 | |||
100 | <InstallExecuteSequence> | ||
101 | <Custom Action="WixRemoveFoldersEx" Before="CostInitialize" /> | ||
102 | </InstallExecuteSequence> | ||
103 | </Fragment> | ||
104 | |||
105 | <Fragment> | ||
106 | <CustomAction Id="WixBroadcastSettingChange" BinaryKey="WixCA" DllEntry="WixBroadcastSettingChange" Execute="immediate" Return="ignore" SuppressModularization="yes" /> | ||
107 | |||
108 | <InstallExecuteSequence> | ||
109 | <Custom Action="WixBroadcastSettingChange" After="InstallFinalize" Overridable="yes" /> | ||
110 | </InstallExecuteSequence> | ||
111 | </Fragment> | ||
112 | |||
113 | <Fragment> | ||
114 | <CustomAction Id="WixBroadcastEnvironmentChange" BinaryKey="WixCA" DllEntry="WixBroadcastEnvironmentChange" Execute="immediate" Return="ignore" SuppressModularization="yes" /> | ||
115 | |||
116 | <InstallExecuteSequence> | ||
117 | <Custom Action="WixBroadcastEnvironmentChange" After="InstallFinalize" Overridable="yes" /> | ||
118 | </InstallExecuteSequence> | ||
119 | </Fragment> | ||
120 | |||
121 | <!-- WiX OS-detection properties and custom action --> | ||
122 | <Fragment> | ||
123 | <CustomAction Id="WixQueryOsInfo" BinaryKey="WixCA" DllEntry="WixQueryOsInfo" Execute="firstSequence" Return="check" SuppressModularization="yes" /> | ||
124 | |||
125 | <InstallExecuteSequence> | ||
126 | <Custom Action="WixQueryOsInfo" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
127 | </InstallExecuteSequence> | ||
128 | |||
129 | <InstallUISequence> | ||
130 | <Custom Action="WixQueryOsInfo" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
131 | </InstallUISequence> | ||
132 | </Fragment> | ||
133 | |||
134 | <Fragment> | ||
135 | <Property Id="WIX_SUITE_BACKOFFICE" Secure="yes" /> | ||
136 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
137 | </Fragment> | ||
138 | <Fragment> | ||
139 | <Property Id="WIX_SUITE_BLADE" Secure="yes" /> | ||
140 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
141 | </Fragment> | ||
142 | <Fragment> | ||
143 | <Property Id="WIX_SUITE_COMMUNICATIONS" Secure="yes" /> | ||
144 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
145 | </Fragment> | ||
146 | <Fragment> | ||
147 | <Property Id="WIX_SUITE_COMPUTE_SERVER" Secure="yes" /> | ||
148 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
149 | </Fragment> | ||
150 | <Fragment> | ||
151 | <Property Id="WIX_SUITE_DATACENTER" Secure="yes" /> | ||
152 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
153 | </Fragment> | ||
154 | <Fragment> | ||
155 | <Property Id="WIX_SUITE_EMBEDDED_RESTRICTED" Secure="yes" /> | ||
156 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
157 | </Fragment> | ||
158 | <Fragment> | ||
159 | <Property Id="WIX_SUITE_EMBEDDEDNT" Secure="yes" /> | ||
160 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
161 | </Fragment> | ||
162 | <Fragment> | ||
163 | <Property Id="WIX_SUITE_ENTERPRISE" Secure="yes" /> | ||
164 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
165 | </Fragment> | ||
166 | <Fragment> | ||
167 | <Property Id="WIX_SUITE_MEDIACENTER" Secure="yes" /> | ||
168 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
169 | </Fragment> | ||
170 | <Fragment> | ||
171 | <Property Id="WIX_SUITE_PERSONAL" Secure="yes" /> | ||
172 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
173 | </Fragment> | ||
174 | <Fragment> | ||
175 | <Property Id="WIX_SUITE_SECURITY_APPLIANCE" Secure="yes" /> | ||
176 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
177 | </Fragment> | ||
178 | <Fragment> | ||
179 | <Property Id="WIX_SUITE_SERVERR2" Secure="yes" /> | ||
180 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
181 | </Fragment> | ||
182 | <Fragment> | ||
183 | <Property Id="WIX_SUITE_SINGLEUSERTS" Secure="yes" /> | ||
184 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
185 | </Fragment> | ||
186 | <Fragment> | ||
187 | <Property Id="WIX_SUITE_SMALLBUSINESS" Secure="yes" /> | ||
188 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
189 | </Fragment> | ||
190 | <Fragment> | ||
191 | <Property Id="WIX_SUITE_SMALLBUSINESS_RESTRICTED" Secure="yes" /> | ||
192 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
193 | </Fragment> | ||
194 | <Fragment> | ||
195 | <Property Id="WIX_SUITE_STARTER" Secure="yes" /> | ||
196 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
197 | </Fragment> | ||
198 | <Fragment> | ||
199 | <Property Id="WIX_SUITE_STORAGE_SERVER" Secure="yes" /> | ||
200 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
201 | </Fragment> | ||
202 | <Fragment> | ||
203 | <Property Id="WIX_SUITE_TABLETPC" Secure="yes" /> | ||
204 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
205 | </Fragment> | ||
206 | <Fragment> | ||
207 | <Property Id="WIX_SUITE_TERMINAL" Secure="yes" /> | ||
208 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
209 | </Fragment> | ||
210 | <Fragment> | ||
211 | <Property Id="WIX_SUITE_WH_SERVER" Secure="yes" /> | ||
212 | <CustomActionRef Id="WixQueryOsInfo" /> | ||
213 | </Fragment> | ||
214 | |||
215 | <Fragment> | ||
216 | <CustomAction Id="WixQueryOsDirs" BinaryKey="WixCA" DllEntry="WixQueryOsDirs" Execute="firstSequence" Return="check" SuppressModularization="yes" /> | ||
217 | |||
218 | <InstallExecuteSequence> | ||
219 | <Custom Action="WixQueryOsDirs" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
220 | </InstallExecuteSequence> | ||
221 | |||
222 | <InstallUISequence> | ||
223 | <Custom Action="WixQueryOsDirs" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
224 | </InstallUISequence> | ||
225 | </Fragment> | ||
226 | |||
227 | <Fragment> | ||
228 | <Property Id="WIX_DIR_ADMINTOOLS" Secure="yes" /> | ||
229 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
230 | </Fragment> | ||
231 | <Fragment> | ||
232 | <Property Id="WIX_DIR_ALTSTARTUP" Secure="yes" /> | ||
233 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
234 | </Fragment> | ||
235 | <Fragment> | ||
236 | <Property Id="WIX_DIR_CDBURN_AREA" Secure="yes" /> | ||
237 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
238 | </Fragment> | ||
239 | <Fragment> | ||
240 | <Property Id="WIX_DIR_COMMON_ADMINTOOLS" Secure="yes" /> | ||
241 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
242 | </Fragment> | ||
243 | <Fragment> | ||
244 | <Property Id="WIX_DIR_COMMON_ALTSTARTUP" Secure="yes" /> | ||
245 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
246 | </Fragment> | ||
247 | <Fragment> | ||
248 | <Property Id="WIX_DIR_COMMON_DOCUMENTS" Secure="yes" /> | ||
249 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
250 | </Fragment> | ||
251 | <Fragment> | ||
252 | <Property Id="WIX_DIR_COMMON_FAVORITES" Secure="yes" /> | ||
253 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
254 | </Fragment> | ||
255 | <Fragment> | ||
256 | <Property Id="WIX_DIR_COMMON_MUSIC" Secure="yes" /> | ||
257 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
258 | </Fragment> | ||
259 | <Fragment> | ||
260 | <Property Id="WIX_DIR_COMMON_PICTURES" Secure="yes" /> | ||
261 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
262 | </Fragment> | ||
263 | <Fragment> | ||
264 | <Property Id="WIX_DIR_COMMON_VIDEO" Secure="yes" /> | ||
265 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
266 | </Fragment> | ||
267 | <Fragment> | ||
268 | <Property Id="WIX_DIR_COOKIES" Secure="yes" /> | ||
269 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
270 | </Fragment> | ||
271 | <Fragment> | ||
272 | <Property Id="WIX_DIR_DESKTOP" Secure="yes" /> | ||
273 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
274 | </Fragment> | ||
275 | <Fragment> | ||
276 | <Property Id="WIX_DIR_HISTORY" Secure="yes" /> | ||
277 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
278 | </Fragment> | ||
279 | <Fragment> | ||
280 | <Property Id="WIX_DIR_INTERNET_CACHE" Secure="yes" /> | ||
281 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
282 | </Fragment> | ||
283 | <Fragment> | ||
284 | <Property Id="WIX_DIR_MYMUSIC" Secure="yes" /> | ||
285 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
286 | </Fragment> | ||
287 | <Fragment> | ||
288 | <Property Id="WIX_DIR_MYPICTURES" Secure="yes" /> | ||
289 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
290 | </Fragment> | ||
291 | <Fragment> | ||
292 | <Property Id="WIX_DIR_MYVIDEO" Secure="yes" /> | ||
293 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
294 | </Fragment> | ||
295 | <Fragment> | ||
296 | <Property Id="WIX_DIR_NETHOOD" Secure="yes" /> | ||
297 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
298 | </Fragment> | ||
299 | <Fragment> | ||
300 | <Property Id="WIX_DIR_PERSONAL" Secure="yes" /> | ||
301 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
302 | </Fragment> | ||
303 | <Fragment> | ||
304 | <Property Id="WIX_DIR_PRINTHOOD" Secure="yes" /> | ||
305 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
306 | </Fragment> | ||
307 | <Fragment> | ||
308 | <Property Id="WIX_DIR_PROFILE" Secure="yes" /> | ||
309 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
310 | </Fragment> | ||
311 | <Fragment> | ||
312 | <Property Id="WIX_DIR_RECENT" Secure="yes" /> | ||
313 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
314 | </Fragment> | ||
315 | <Fragment> | ||
316 | <Property Id="WIX_DIR_RESOURCES" Secure="yes" /> | ||
317 | <CustomActionRef Id="WixQueryOsDirs" /> | ||
318 | </Fragment> | ||
319 | |||
320 | <Fragment> | ||
321 | <CustomAction Id="WixQueryOsWellKnownSID" BinaryKey="WixCA" DllEntry="WixQueryOsWellKnownSID" Execute="firstSequence" Return="check" SuppressModularization="yes" /> | ||
322 | |||
323 | <InstallExecuteSequence> | ||
324 | <Custom Action="WixQueryOsWellKnownSID" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
325 | </InstallExecuteSequence> | ||
326 | |||
327 | <InstallUISequence> | ||
328 | <Custom Action="WixQueryOsWellKnownSID" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
329 | </InstallUISequence> | ||
330 | </Fragment> | ||
331 | |||
332 | <Fragment> | ||
333 | <Property Id="WIX_ACCOUNT_LOCALSYSTEM" Secure="yes" /> | ||
334 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
335 | </Fragment> | ||
336 | <Fragment> | ||
337 | <Property Id="WIX_ACCOUNT_LOCALSERVICE" Secure="yes" /> | ||
338 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
339 | </Fragment> | ||
340 | <Fragment> | ||
341 | <Property Id="WIX_ACCOUNT_NETWORKSERVICE" Secure="yes" /> | ||
342 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
343 | </Fragment> | ||
344 | <Fragment> | ||
345 | <Property Id="WIX_ACCOUNT_ADMINISTRATORS" Secure="yes" /> | ||
346 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
347 | </Fragment> | ||
348 | <Fragment> | ||
349 | <Property Id="WIX_ACCOUNT_USERS" Secure="yes" /> | ||
350 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
351 | </Fragment> | ||
352 | <Fragment> | ||
353 | <Property Id="WIX_ACCOUNT_GUESTS" Secure="yes" /> | ||
354 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
355 | </Fragment> | ||
356 | <Fragment> | ||
357 | <Property Id="WIX_ACCOUNT_PERFLOGUSERS" Secure="yes" /> | ||
358 | <Property Id="WIX_ACCOUNT_PERFLOGUSERS_NODOMAIN" Secure="yes" /> | ||
359 | <CustomActionRef Id="WixQueryOsWellKnownSID" /> | ||
360 | </Fragment> | ||
361 | |||
362 | <Fragment> | ||
363 | <CustomAction Id="WixQueryOsDriverInfo" BinaryKey="WixCA" DllEntry="WixQueryOsDriverInfo" Execute="firstSequence" Return="check" SuppressModularization="yes" /> | ||
364 | |||
365 | <InstallExecuteSequence> | ||
366 | <Custom Action="WixQueryOsDriverInfo" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
367 | </InstallExecuteSequence> | ||
368 | |||
369 | <InstallUISequence> | ||
370 | <Custom Action="WixQueryOsDriverInfo" After="AppSearch" Overridable="yes">VersionNT > 400 OR (VersionNT = 400 AND ServicePackLevel > 3)</Custom> | ||
371 | </InstallUISequence> | ||
372 | </Fragment> | ||
373 | |||
374 | <Fragment> | ||
375 | <Property Id="WIX_WDDM_DRIVER_PRESENT" Secure="yes" /> | ||
376 | <CustomActionRef Id="WixQueryOsDriverInfo" /> | ||
377 | </Fragment> | ||
378 | |||
379 | <Fragment> | ||
380 | <Property Id="WIX_DWM_COMPOSITION_ENABLED" Secure="yes" /> | ||
381 | <CustomActionRef Id="WixQueryOsDriverInfo" /> | ||
382 | </Fragment> | ||
383 | |||
384 | <!-- ShellExec custom actions (for when only one is needed; multiple executions need their own IDs) --> | ||
385 | <Fragment> | ||
386 | <PropertyRef Id="WixShellExecBinaryId" /> | ||
387 | <CustomAction Id="WixShellExecBinary" BinaryKey="WixCA" DllEntry="WixShellExecBinary" Execute="immediate" Return="check" Impersonate="yes" /> | ||
388 | </Fragment> | ||
389 | |||
390 | <Fragment> | ||
391 | <PropertyRef Id="WixShellExecTarget" /> | ||
392 | <CustomAction Id="WixShellExec" BinaryKey="WixCA" DllEntry="WixShellExec" Execute="immediate" Return="check" Impersonate="yes" /> | ||
393 | </Fragment> | ||
394 | |||
395 | <Fragment> | ||
396 | <PropertyRef Id="WixUnelevatedShellExecTarget" /> | ||
397 | <CustomAction Id="WixUnelevatedShellExec" BinaryKey="WixCA" DllEntry="WixUnelevatedShellExec" Execute="immediate" Return="check" Impersonate="yes" /> | ||
398 | </Fragment> | ||
399 | |||
400 | <Fragment> | ||
401 | <PropertyRef Id="QtExecCmdLine" /> | ||
402 | <CustomAction Id="QtExec" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check" Impersonate="yes" /> | ||
403 | </Fragment> | ||
404 | |||
405 | <Fragment> | ||
406 | <PropertyRef Id="QtExec64CmdLine" /> | ||
407 | <CustomAction Id="QtExec64" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="immediate" Return="check" Impersonate="yes" /> | ||
408 | </Fragment> | ||
409 | |||
410 | <Fragment> | ||
411 | <PropertyRef Id="WixQuietExecCmdLine" /> | ||
412 | <CustomAction Id="WixQuietExec" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="check" Impersonate="yes" /> | ||
413 | </Fragment> | ||
414 | |||
415 | <Fragment> | ||
416 | <PropertyRef Id="WixQuietExec64CmdLine" /> | ||
417 | <CustomAction Id="WixQuietExec64" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="immediate" Return="check" Impersonate="yes" /> | ||
418 | </Fragment> | ||
419 | |||
420 | <!-- SilentExec custom actions differ from QtExec in that they do not log the commandline or output of the exe --> | ||
421 | <Fragment> | ||
422 | <PropertyRef Id="WixSilentExecCmdLine" /> | ||
423 | <CustomAction Id="WixSilentExec" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="check" Impersonate="yes" /> | ||
424 | </Fragment> | ||
425 | |||
426 | <Fragment> | ||
427 | <PropertyRef Id="WixSilentExec64CmdLine" /> | ||
428 | <CustomAction Id="WixSilentExec64" BinaryKey="WixCA" DllEntry="WixSilentExec64" Execute="immediate" Return="check" Impersonate="yes" /> | ||
429 | </Fragment> | ||
430 | </Wix> | ||
diff --git a/src/wixlib/UtilExtension_Platform.wxi b/src/wixlib/UtilExtension_Platform.wxi new file mode 100644 index 00000000..8328577f --- /dev/null +++ b/src/wixlib/UtilExtension_Platform.wxi | |||
@@ -0,0 +1,224 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | |||
7 | <?include caSuffix.wxi ?> | ||
8 | |||
9 | <!-- | ||
10 | The following actions do not support X64. | ||
11 | --> | ||
12 | <?if $(var.platform)!=x64 ?> | ||
13 | |||
14 | <Fragment> | ||
15 | <CustomAction Id="WixCheckRebootRequired$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixCheckRebootRequired" Execute="immediate" Return="ignore" SuppressModularization="yes" /> | ||
16 | |||
17 | <InstallExecuteSequence> | ||
18 | <!-- Condition this so it runs on install and MMode, but not uninstall --> | ||
19 | <Custom Action="WixCheckRebootRequired$(var.Suffix)" After="InstallFinalize" Overridable="yes">NOT REMOVE~="ALL" AND VersionNT > 400</Custom> | ||
20 | </InstallExecuteSequence> | ||
21 | </Fragment> | ||
22 | |||
23 | <Fragment> | ||
24 | <CustomAction Id="WixCloseApplications$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixCloseApplications" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
25 | <CustomAction Id="WixCloseApplicationsDeferred$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixCloseApplicationsDeferred" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
26 | <CustomActionRef Id="WixCheckRebootRequired$(var.Suffix)" /> | ||
27 | |||
28 | <InstallExecuteSequence> | ||
29 | <Custom Action="WixCloseApplications$(var.Suffix)" Before="InstallFiles" Overridable="yes">VersionNT > 400</Custom> | ||
30 | </InstallExecuteSequence> | ||
31 | </Fragment> | ||
32 | |||
33 | <Fragment> | ||
34 | <CustomAction Id="WixRegisterRestartResources$(var.Suffix)" BinaryKey="WixCA" DllEntry="WixRegisterRestartResources$(var.Suffix)" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
35 | |||
36 | <InstallExecuteSequence> | ||
37 | <Custom Action="WixRegisterRestartResources$(var.Suffix)" Before="InstallValidate" Overridable="yes" /> | ||
38 | </InstallExecuteSequence> | ||
39 | </Fragment> | ||
40 | |||
41 | <Fragment> | ||
42 | <UIRef Id="ConfigureUsersErrorText" /> | ||
43 | |||
44 | <CustomAction Id="ConfigureUsers$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigureUsers" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
45 | <CustomAction Id="CreateUser$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CreateUser" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
46 | <CustomAction Id="CreateUserRollback$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RemoveUser" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
47 | <!-- RemoveUser is a type commit action because it is not possible to rollback the removal of a user --> | ||
48 | <CustomAction Id="RemoveUser$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RemoveUser" Impersonate="no" Execute="commit" Return="ignore" HideTarget="yes" SuppressModularization="yes" /> | ||
49 | |||
50 | <InstallExecuteSequence> | ||
51 | <Custom Action="ConfigureUsers$(var.Suffix)" Before="InstallFiles" Overridable="yes">VersionNT > 400</Custom> | ||
52 | </InstallExecuteSequence> | ||
53 | </Fragment> | ||
54 | |||
55 | <Fragment> | ||
56 | <UIRef Id="ConfigureSmbErrorsText" /> | ||
57 | |||
58 | <CustomAction Id="ConfigureSmbInstall$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigureSmbInstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
59 | <CustomAction Id="ConfigureSmbUninstall$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigureSmbUninstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
60 | <CustomAction Id="CreateSmb$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CreateSmb" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
61 | <CustomAction Id="CreateSmbRollback$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="DropSmb" Impersonate="no" Execute="rollback" Return="ignore" HideTarget="yes" SuppressModularization="yes" /> | ||
62 | <CustomAction Id="DropSmb$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="DropSmb" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
63 | <CustomAction Id="DropSmbRollback$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CreateSmb" Impersonate="no" Execute="rollback" Return="ignore" HideTarget="yes" SuppressModularization="yes" /> | ||
64 | |||
65 | <InstallExecuteSequence> | ||
66 | <Custom Action="ConfigureSmbInstall$(var.Suffix)" After="InstallFiles" Overridable="yes">VersionNT > 400</Custom> | ||
67 | <Custom Action="ConfigureSmbUninstall$(var.Suffix)" After="RemoveFiles" Overridable="yes">VersionNT > 400</Custom> | ||
68 | </InstallExecuteSequence> | ||
69 | </Fragment> | ||
70 | |||
71 | <Fragment> | ||
72 | <UIRef Id="PerCounterDataErrorsText" /> | ||
73 | |||
74 | <CustomAction Id="InstallPerfCounterData$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="InstallPerfCounterData" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
75 | <CustomAction Id="UninstallPerfCounterData$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="UninstallPerfCounterData" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
76 | <CustomAction Id="RegisterPerfCounterData$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RegisterPerfCounterData" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
77 | <CustomAction Id="UnregisterPerfCounterData$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="UnregisterPerfCounterData" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
78 | <CustomAction Id="RollbackRegisterPerfCounterData$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="UnregisterPerfCounterData" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
79 | <CustomAction Id="RollbackUnregisterPerfCounterData$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RegisterPerfCounterData" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
80 | |||
81 | <InstallExecuteSequence> | ||
82 | <Custom Action="InstallPerfCounterData$(var.Suffix)" After="WriteRegistryValues" Overridable="yes">VersionNT > 400</Custom> | ||
83 | <Custom Action="UninstallPerfCounterData$(var.Suffix)" Before="RemoveRegistryValues" Overridable="yes">VersionNT > 400</Custom> | ||
84 | </InstallExecuteSequence> | ||
85 | </Fragment> | ||
86 | |||
87 | <Fragment> | ||
88 | <UIRef Id="ConfigurePerfmonErrorsText" /> | ||
89 | |||
90 | <CustomAction Id="ConfigurePerfmonInstall$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigurePerfmonInstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
91 | <CustomAction Id="ConfigurePerfmonUninstall$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigurePerfmonUninstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
92 | <CustomAction Id="RegisterPerfmon$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RegisterPerfmon" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
93 | <CustomAction Id="UnregisterPerfmon$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="UnregisterPerfmon" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
94 | <CustomAction Id="RollbackRegisterPerfmon$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="UnregisterPerfmon" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" /> | ||
95 | <CustomAction Id="RollbackUnregisterPerfmon$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RegisterPerfmon" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" /> | ||
96 | |||
97 | <InstallExecuteSequence> | ||
98 | <Custom Action="ConfigurePerfmonInstall$(var.Suffix)" After="WriteRegistryValues" Overridable="yes">VersionNT > 400</Custom> | ||
99 | <Custom Action="ConfigurePerfmonUninstall$(var.Suffix)" Before="RemoveRegistryValues" Overridable="yes">VersionNT > 400</Custom> | ||
100 | </InstallExecuteSequence> | ||
101 | </Fragment> | ||
102 | |||
103 | <Fragment> | ||
104 | <CustomAction Id="ConfigurePerfmonManifestRegister$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigurePerfmonManifestRegister" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
105 | <CustomAction Id="ConfigurePerfmonManifestUnregister$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigurePerfmonManifestUnregister" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
106 | <CustomAction Id="RegisterPerfmonManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
107 | <CustomAction Id="UnregisterPerfmonManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="ignore" SuppressModularization="yes" /> | ||
108 | <CustomAction Id="RollbackRegisterPerfmonManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="ignore" SuppressModularization="yes" /> | ||
109 | <CustomAction Id="RollbackUnregisterPerfmonManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" /> | ||
110 | |||
111 | <InstallExecuteSequence> | ||
112 | <Custom Action="ConfigurePerfmonManifestRegister$(var.Suffix)" After="InstallFiles" Overridable="yes">VersionNT > 400</Custom> | ||
113 | <Custom Action="ConfigurePerfmonManifestUnregister$(var.Suffix)" After="RemoveRegistryValues" Overridable="yes">VersionNT > 400</Custom> | ||
114 | </InstallExecuteSequence> | ||
115 | </Fragment> | ||
116 | |||
117 | <Fragment> | ||
118 | <CustomAction Id="ConfigureEventManifestRegister$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigureEventManifestRegister" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
119 | <CustomAction Id="ConfigureEventManifestUnregister$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ConfigureEventManifestUnregister" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
120 | <CustomAction Id="RegisterEventManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
121 | <CustomAction Id="UnregisterEventManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="deferred" Return="ignore" SuppressModularization="yes" /> | ||
122 | <CustomAction Id="RollbackRegisterEventManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="ignore" SuppressModularization="yes" /> | ||
123 | <CustomAction Id="RollbackUnregisterEventManifest$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="CAQuietExec" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" /> | ||
124 | |||
125 | <InstallExecuteSequence> | ||
126 | <Custom Action="ConfigureEventManifestRegister$(var.Suffix)" After="SchedXmlFile" Overridable="yes">VersionNT > 400</Custom> | ||
127 | <Custom Action="ConfigureEventManifestUnregister$(var.Suffix)" After="RemoveRegistryValues" Overridable="yes">VersionNT > 400</Custom> | ||
128 | </InstallExecuteSequence> | ||
129 | </Fragment> | ||
130 | |||
131 | <Fragment> | ||
132 | <CustomAction Id="SchedServiceConfig$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="SchedServiceConfig" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
133 | <CustomAction Id="ExecServiceConfig$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecServiceConfig" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> | ||
134 | <CustomAction Id="RollbackServiceConfig$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="RollbackServiceConfig" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> | ||
135 | |||
136 | <InstallExecuteSequence> | ||
137 | <!-- Condition this so it runs on install and MMode, but not uninstall --> | ||
138 | <Custom Action="SchedServiceConfig$(var.Suffix)" After="InstallServices" Overridable="yes">NOT REMOVE~="ALL" AND VersionNT > 400</Custom> | ||
139 | </InstallExecuteSequence> | ||
140 | </Fragment> | ||
141 | |||
142 | <Fragment> | ||
143 | <CustomAction Id="WixTouchFileDuringInstall" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixTouchFileDuringInstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
144 | <CustomAction Id="WixTouchFileDuringUninstall" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixTouchFileDuringUninstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
145 | <CustomAction Id="WixExecuteTouchFile" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixExecuteTouchFile" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> | ||
146 | <CustomAction Id="WixRollbackTouchFile" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixExecuteTouchFile" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> | ||
147 | |||
148 | <InstallExecuteSequence> | ||
149 | <Custom Action="WixTouchFileDuringUninstall" Before="RemoveFiles" Overridable="yes" /> | ||
150 | <Custom Action="WixTouchFileDuringInstall" After="InstallFiles" Overridable="yes" /> | ||
151 | </InstallExecuteSequence> | ||
152 | </Fragment> | ||
153 | |||
154 | <Fragment> | ||
155 | <UIRef Id="XmlFileErrorsText" /> | ||
156 | |||
157 | <CustomAction Id="SchedXmlFile$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="SchedXmlFile" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
158 | <CustomAction Id="ExecXmlFile$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecXmlFile" Execute="deferred" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
159 | <CustomAction Id="ExecXmlFileRollback$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecXmlFileRollback" Execute="rollback" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
160 | |||
161 | <InstallExecuteSequence> | ||
162 | <Custom Action="SchedXmlFile$(var.Suffix)" After="DuplicateFiles" Overridable="yes">VersionNT > 400</Custom> | ||
163 | </InstallExecuteSequence> | ||
164 | </Fragment> | ||
165 | |||
166 | <Fragment> | ||
167 | <UIRef Id="XmlConfigErrorsText" /> | ||
168 | |||
169 | <CustomAction Id="SchedXmlConfig$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="SchedXmlConfig" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
170 | <CustomAction Id="ExecXmlConfig$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecXmlConfig" Execute="deferred" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
171 | <CustomAction Id="ExecXmlConfigRollback$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecXmlConfigRollback" Execute="rollback" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
172 | |||
173 | <InstallExecuteSequence> | ||
174 | <Custom Action="SchedXmlConfig$(var.Suffix)" After="DuplicateFiles" Overridable="yes">VersionNT > 400</Custom> | ||
175 | </InstallExecuteSequence> | ||
176 | </Fragment> | ||
177 | |||
178 | <Fragment> | ||
179 | <CustomAction Id="WixSchedInternetShortcuts$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixSchedInternetShortcuts" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
180 | <CustomAction Id="WixRollbackInternetShortcuts$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixRollbackInternetShortcuts" Impersonate="no" Execute="rollback" Return="check" SuppressModularization="yes" /> | ||
181 | <CustomAction Id="WixCreateInternetShortcuts$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixCreateInternetShortcuts" Impersonate="no" Execute="deferred" Return="check" SuppressModularization="yes" /> | ||
182 | |||
183 | <InstallExecuteSequence> | ||
184 | <Custom Action="WixSchedInternetShortcuts$(var.Suffix)" Before="RemoveFolders" Overridable="yes">VersionNT > 400</Custom> | ||
185 | <Custom Action="WixRollbackInternetShortcuts$(var.DeferredSuffix)" Before="WixCreateInternetShortcuts$(var.DeferredSuffix)" Overridable="yes">VersionNT > 400</Custom> | ||
186 | <Custom Action="WixCreateInternetShortcuts$(var.DeferredSuffix)" After="CreateShortcuts" Overridable="yes">VersionNT > 400</Custom> | ||
187 | </InstallExecuteSequence> | ||
188 | </Fragment> | ||
189 | |||
190 | <?endif ?> | ||
191 | |||
192 | |||
193 | <!-- | ||
194 | The following actions do support all platforms. | ||
195 | --> | ||
196 | <Fragment> | ||
197 | <UIRef Id="SecureObjectsErrors" /> | ||
198 | |||
199 | <CustomAction Id="SchedSecureObjects$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="SchedSecureObjects" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
200 | <CustomAction Id="SchedSecureObjectsRollback$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="SchedSecureObjectsRollback" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
201 | <CustomAction Id="ExecSecureObjects$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecSecureObjects" Execute="deferred" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
202 | <CustomAction Id="ExecSecureObjectsRollback$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="ExecSecureObjectsRollback" Execute="rollback" Impersonate="no" Return="check" HideTarget="yes" SuppressModularization="yes" /> | ||
203 | |||
204 | <InstallExecuteSequence> | ||
205 | <!-- Condition this so it runs on install and MMode, but not uninstall --> | ||
206 | <Custom Action="SchedSecureObjects$(var.Suffix)" After="InstallServices" Overridable="yes">NOT REMOVE~="ALL" AND VersionNT > 400</Custom> | ||
207 | <Custom Action="SchedSecureObjectsRollback$(var.Suffix)" After="UnpublishFeatures" Overridable="yes">VersionNT > 400</Custom> | ||
208 | </InstallExecuteSequence> | ||
209 | </Fragment> | ||
210 | |||
211 | <Fragment> | ||
212 | <CustomAction Id="WixSchedFormatFiles$(var.Suffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixSchedFormatFiles" Execute="immediate" Return="check" SuppressModularization="yes" /> | ||
213 | <CustomAction Id="WixExecFormatFiles$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixExecFormatFiles" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> | ||
214 | <CustomAction Id="WixRollbackFormatFiles$(var.DeferredSuffix)" BinaryKey="UtilCA$(var.Suffix)" DllEntry="WixExecFormatFiles" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> | ||
215 | |||
216 | <InstallExecuteSequence> | ||
217 | <Custom Action="WixSchedFormatFiles$(var.Suffix)" After="InstallFiles" /> | ||
218 | </InstallExecuteSequence> | ||
219 | </Fragment> | ||
220 | |||
221 | <Fragment> | ||
222 | <Binary Id="UtilCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))utilca.dll" /> | ||
223 | </Fragment> | ||
224 | </Include> | ||
diff --git a/src/wixlib/UtilExtension_x64.wxs b/src/wixlib/UtilExtension_x64.wxs new file mode 100644 index 00000000..e902f97a --- /dev/null +++ b/src/wixlib/UtilExtension_x64.wxs | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
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 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | <?define platform=x64 ?> | ||
7 | <?include UtilExtension_Platform.wxi ?> | ||
8 | </Wix> | ||
diff --git a/src/wixlib/UtilExtension_x86.wxs b/src/wixlib/UtilExtension_x86.wxs new file mode 100644 index 00000000..ff4f08c4 --- /dev/null +++ b/src/wixlib/UtilExtension_x86.wxs | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
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 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | <?define platform=x86 ?> | ||
7 | <?include UtilExtension_Platform.wxi ?> | ||
8 | </Wix> | ||
diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi new file mode 100644 index 00000000..a56a2393 --- /dev/null +++ b/src/wixlib/caSuffix.wxi | |||
@@ -0,0 +1,28 @@ | |||
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. --> | ||
3 | |||
4 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?ifndef platform ?> | ||
6 | <?error Required value "platform" not defined in include caSuffix.wxi ?> | ||
7 | <?endif ?> | ||
8 | |||
9 | <?ifdef Suffix ?> | ||
10 | <?undef Suffix ?> | ||
11 | <?undef DeferredSuffix ?> | ||
12 | <?endif ?> | ||
13 | |||
14 | <?if $(var.platform)="x86" ?> | ||
15 | <?define Suffix="" ?> | ||
16 | <?define DeferredSuffix="" ?> | ||
17 | <?endif ?> | ||
18 | |||
19 | <?if $(var.platform)="x64" ?> | ||
20 | <?define Suffix="_x64" ?> | ||
21 | <?define DeferredSuffix="_64" ?> | ||
22 | <?endif ?> | ||
23 | |||
24 | <?if $(var.platform)="arm" ?> | ||
25 | <?define Suffix="_ARM" ?> | ||
26 | <?define DeferredSuffix="_ARM" ?> | ||
27 | <?endif ?> | ||
28 | </Include> | ||
diff --git a/src/wixlib/caerr.wxi b/src/wixlib/caerr.wxi new file mode 100644 index 00000000..141942f2 --- /dev/null +++ b/src/wixlib/caerr.wxi | |||
@@ -0,0 +1,96 @@ | |||
1 | <Include> | ||
2 | <?define msierrSecureObjectsFailedCreateSD = 25520?> | ||
3 | <?define msierrSecureObjectsFailedSet = 25521?> | ||
4 | <?define msierrSecureObjectsUnknownType = 25522?> | ||
5 | <?define msierrXmlFileFailedRead = 25530?> | ||
6 | <?define msierrXmlFileFailedOpen = 25531?> | ||
7 | <?define msierrXmlFileFailedSelect = 25532?> | ||
8 | <?define msierrXmlFileFailedSave = 25533?> | ||
9 | <?define msierrXmlConfigFailedRead = 25540?> | ||
10 | <?define msierrXmlConfigFailedOpen = 25541?> | ||
11 | <?define msierrXmlConfigFailedSelect = 25542?> | ||
12 | <?define msierrXmlConfigFailedSave = 25543?> | ||
13 | <?define msierrFirewallCannotConnect = 25580?> | ||
14 | <?define msierrIISCannotConnect = 26001?> | ||
15 | <?define msierrIISFailedReadWebSite = 26002?> | ||
16 | <?define msierrIISFailedReadWebDirs = 26003?> | ||
17 | <?define msierrIISFailedReadVDirs = 26004?> | ||
18 | <?define msierrIISFailedReadFilters = 26005?> | ||
19 | <?define msierrIISFailedReadAppPool = 26006?> | ||
20 | <?define msierrIISFailedReadMimeMap = 26007?> | ||
21 | <?define msierrIISFailedReadProp = 26008?> | ||
22 | <?define msierrIISFailedReadWebSvcExt = 26009?> | ||
23 | <?define msierrIISFailedReadWebError = 26010?> | ||
24 | <?define msierrIISFailedReadHttpHeader = 26011?> | ||
25 | <?define msierrIISFailedSchedTransaction = 26031?> | ||
26 | <?define msierrIISFailedSchedInstallWebs = 26032?> | ||
27 | <?define msierrIISFailedSchedInstallWebDirs = 26033?> | ||
28 | <?define msierrIISFailedSchedInstallVDirs = 26034?> | ||
29 | <?define msierrIISFailedSchedInstallFilters = 26035?> | ||
30 | <?define msierrIISFailedSchedInstallAppPool = 26036?> | ||
31 | <?define msierrIISFailedSchedInstallProp = 26037?> | ||
32 | <?define msierrIISFailedSchedInstallWebSvcExt = 26038?> | ||
33 | <?define msierrIISFailedSchedUninstallWebs = 26051?> | ||
34 | <?define msierrIISFailedSchedUninstallWebDirs = 26052?> | ||
35 | <?define msierrIISFailedSchedUninstallVDirs = 26053?> | ||
36 | <?define msierrIISFailedSchedUninstallFilters = 26054?> | ||
37 | <?define msierrIISFailedSchedUninstallAppPool = 26055?> | ||
38 | <?define msierrIISFailedSchedUninstallProp = 26056?> | ||
39 | <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?> | ||
40 | <?define msierrIISFailedStartTransaction = 26101?> | ||
41 | <?define msierrIISFailedOpenKey = 26102?> | ||
42 | <?define msierrIISFailedCreateKey = 26103?> | ||
43 | <?define msierrIISFailedWriteData = 26104?> | ||
44 | <?define msierrIISFailedCreateApp = 26105?> | ||
45 | <?define msierrIISFailedDeleteKey = 26106?> | ||
46 | <?define msierrIISFailedDeleteApp = 26107?> | ||
47 | <?define msierrIISFailedDeleteValue = 26108?> | ||
48 | <?define msierrIISFailedCommitInUse = 26109?> | ||
49 | <?define msierrSQLFailedCreateDatabase = 26201?> | ||
50 | <?define msierrSQLFailedDropDatabase = 26202?> | ||
51 | <?define msierrSQLFailedConnectDatabase = 26203?> | ||
52 | <?define msierrSQLFailedExecString = 26204?> | ||
53 | <?define msierrSQLDatabaseAlreadyExists = 26205?> | ||
54 | <?define msierrPERFMONFailedRegisterDLL = 26251?> | ||
55 | <?define msierrPERFMONFailedUnregisterDLL = 26252?> | ||
56 | <?define msierrInstallPerfCounterData = 26253?> | ||
57 | <?define msierrUninstallPerfCounterData = 26254?> | ||
58 | <?define msierrSMBFailedCreate = 26301?> | ||
59 | <?define msierrSMBFailedDrop = 26302?> | ||
60 | <?define msierrCERTFailedOpen = 26351?> | ||
61 | <?define msierrCERTFailedAdd = 26352?> | ||
62 | <?define msierrUSRFailedUserCreate = 26401?> | ||
63 | <?define msierrUSRFailedUserCreatePswd = 26402?> | ||
64 | <?define msierrUSRFailedUserGroupAdd = 26403?> | ||
65 | <?define msierrUSRFailedUserCreateExists = 26404?> | ||
66 | <?define msierrUSRFailedGrantLogonAsService = 26405?> | ||
67 | <?define msierrDependencyMissingDependencies = 26451?> | ||
68 | <?define msierrDependencyHasDependents = 26452?> | ||
69 | <?define msierrDotNetRuntimeRequired = 27000?> | ||
70 | <?define msierrComPlusCannotConnect = 28001?> | ||
71 | <?define msierrComPlusPartitionReadFailed = 28002?> | ||
72 | <?define msierrComPlusPartitionRoleReadFailed = 28003?> | ||
73 | <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?> | ||
74 | <?define msierrComPlusPartitionUserReadFailed = 28005?> | ||
75 | <?define msierrComPlusApplicationReadFailed = 28006?> | ||
76 | <?define msierrComPlusApplicationRoleReadFailed = 28007?> | ||
77 | <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?> | ||
78 | <?define msierrComPlusAssembliesReadFailed = 28009?> | ||
79 | <?define msierrComPlusSubscriptionReadFailed = 28010?> | ||
80 | <?define msierrComPlusPartitionDependency = 28011?> | ||
81 | <?define msierrComPlusPartitionNotFound = 28012?> | ||
82 | <?define msierrComPlusPartitionIdConflict = 28013?> | ||
83 | <?define msierrComPlusPartitionNameConflict = 28014?> | ||
84 | <?define msierrComPlusApplicationDependency = 28015?> | ||
85 | <?define msierrComPlusApplicationNotFound = 28016?> | ||
86 | <?define msierrComPlusApplicationIdConflict = 28017?> | ||
87 | <?define msierrComPlusApplicationNameConflict = 28018?> | ||
88 | <?define msierrComPlusApplicationRoleDependency = 28019?> | ||
89 | <?define msierrComPlusApplicationRoleNotFound = 28020?> | ||
90 | <?define msierrComPlusApplicationRoleConflict = 28021?> | ||
91 | <?define msierrComPlusAssemblyDependency = 28022?> | ||
92 | <?define msierrComPlusSubscriptionIdConflict = 28023?> | ||
93 | <?define msierrComPlusSubscriptionNameConflict = 28024?> | ||
94 | <?define msierrComPlusFailedLookupNames = 28025?> | ||
95 | <?define msierrMsmqCannotConnect = 28101?> | ||
96 | </Include> \ No newline at end of file | ||
diff --git a/src/wixlib/de-de.wxl b/src/wixlib/de-de.wxl new file mode 100644 index 00000000..47bfaaaa --- /dev/null +++ b/src/wixlib/de-de.wxl | |||
@@ -0,0 +1,33 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <WixLocalization Culture="de-de" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
6 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">Konnte den Benutzer nicht anlegen. ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">Konnte den Benutzer auf Grund eines falschen Passwortes nicht anlegen. ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">Konnte Benutzer nicht zur Gruppe hinzufügen. ([2] [3] [4] [5])</String> | ||
9 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">Konnte den Benutzer nicht anlegen, da er bereits existierte. ([2] [3] [4] [5])</String> | ||
10 | |||
11 | <String Id="msierrSMBFailedCreate" Overridable="yes">Konnte Netzwerkfreigabe nicht anlegen. ([2] [3] [4] [5])</String> | ||
12 | <String Id="msierrSMBFailedDrop" Overridable="yes">Konnte Netzwerkfreigabe nicht entfernen. ([2] [3] [4] [5])</String> | ||
13 | |||
14 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">Konnte die DLL nicht für PerfMon registrieren. ([2] [3] [4] [5])</String> | ||
15 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">Konnte die DLL nicht für PerfMon deregistrieren. ([2] [3] [4] [5])</String> | ||
16 | |||
17 | <String Id="msierrInstallPerfCounterData" Overridable="yes">Konnte die Daten der Leistungsüberwachung (performance counters) nicht installieren. ([2] [3] [4] [5])</String> | ||
18 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">Konnte die Daten der Leistungsüberwachung (performance counters) nicht deinstallieren. ([2] [3] [4] [5])</String> | ||
19 | |||
20 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">Konnte keinen Security Descriptor für [3]\[4] erstellen, System Fehler: [2]</String> | ||
21 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">Konnte keinen Security Descriptor für das Objekt [3] erstellen, System Fehler: [2]</String> | ||
22 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">Unbekannter Objekt Typ [3], System Fehler: [2]</String> | ||
23 | |||
24 | <String Id="msierrXmlFileFailedRead" Overridable="yes">Beim Lesen der XML Dateien trat ein Fehler auf.</String> | ||
25 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">Konnte XML Datei [3] nicht öffnen, System Fehler: [2]</String> | ||
26 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">Konnte Knoten [3] in der XML Datei [4] nicht finden, System Fehler: [2]</String> | ||
27 | <String Id="msierrXmlFileFailedSave" Overridable="yes">Beim Speichern der Änderungen an der XML Datei [3] trat ein Fehler auf, System Fehler: [2]</String> | ||
28 | |||
29 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">Bei der Konfiguration der XML Dateien trat ein Fehler auf.</String> | ||
30 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">Konnte XML Datei [3] nicht öffnen, System Fehler: [2]</String> | ||
31 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">Konnte Knoten [3] in der XML Datei [4] nicht finden, System Fehler: [2]</String> | ||
32 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">Beim Speichern der Änderungen an der XML Datei [3] trat ein Fehler auf, System Fehler: [2]</String> | ||
33 | </WixLocalization> | ||
diff --git a/src/wixlib/en-us.wxl b/src/wixlib/en-us.wxl new file mode 100644 index 00000000..25ac4d5d --- /dev/null +++ b/src/wixlib/en-us.wxl | |||
@@ -0,0 +1,33 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
6 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">Failed to create user. ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">Failed to create user due to invalid password. ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">Failed to add user to group. ([2] [3] [4] [5])</String> | ||
9 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">Failed to create user because it already exists. ([2] [3] [4] [5])</String> | ||
10 | |||
11 | <String Id="msierrSMBFailedCreate" Overridable="yes">Failed to create network share. ([2] [3] [4] [5])</String> | ||
12 | <String Id="msierrSMBFailedDrop" Overridable="yes">Failed to drop network share. ([2] [3] [4] [5])</String> | ||
13 | |||
14 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">Failed to register DLL with PerfMon. ([2] [3] [4] [5])</String> | ||
15 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">Failed to unregister DLL with PerfMon. ([2] [3] [4] [5])</String> | ||
16 | |||
17 | <String Id="msierrInstallPerfCounterData" Overridable="yes">Failed to install performance counters. ([2] [3] [4] [5])</String> | ||
18 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">Failed to uninstall performance counters. ([2] [3] [4] [5])</String> | ||
19 | |||
20 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">Failed to create security descriptor for [3]\[4], system error: [2]</String> | ||
21 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">Failed to set security descriptor on object [3], system error: [2]</String> | ||
22 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">Unknown Object Type [3], system error: [2]</String> | ||
23 | |||
24 | <String Id="msierrXmlFileFailedRead" Overridable="yes">There was a failure while configuring XML files.</String> | ||
25 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">Failed to open XML file [3], system error: [2]</String> | ||
26 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">Failed to find node: [3] in XML file: [4], system error: [2]</String> | ||
27 | <String Id="msierrXmlFileFailedSave" Overridable="yes">Failed to save changes to XML file [3], system error: [2]</String> | ||
28 | |||
29 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">There was a failure while configuring XML files.</String> | ||
30 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">Failed to open XML file [3], system error: [2]</String> | ||
31 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">Failed to find node: [3] in XML file: [4], system error: [2]</String> | ||
32 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">Failed to save changes to XML file [3], system error: [2]</String> | ||
33 | </WixLocalization> | ||
diff --git a/src/wixlib/es-es.wxl b/src/wixlib/es-es.wxl new file mode 100644 index 00000000..9001d52e --- /dev/null +++ b/src/wixlib/es-es.wxl | |||
@@ -0,0 +1,32 @@ | |||
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. --> | ||
3 | |||
4 | <WixLocalization Culture="es-es" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
5 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">La creación del usuario ha fracasado. ([2] [3] [4] [5])</String> | ||
6 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">La creación del usuario ha fracasado porque la contraseña es incorrecta. ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">El aditamento del usuario al grupo ha fracasado. ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">La creación del usuario ha fracasado porque ya existe. ([2] [3] [4] [5])</String> | ||
9 | |||
10 | <String Id="msierrSMBFailedCreate" Overridable="yes">La creación de la red compartida ha fracasado. ([2] [3] [4] [5])</String> | ||
11 | <String Id="msierrSMBFailedDrop" Overridable="yes">La eliminación de la red compartida ha fracasado. ([2] [3] [4] [5])</String> | ||
12 | |||
13 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">La inscripción al registro de la DLL con PerfMon ha fracasado. ([2] [3] [4] [5])</String> | ||
14 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">La cancelación de la inscripción al registro de la DLL con PerfMon ha fracasado. ([2] [3] [4] [5])</String> | ||
15 | |||
16 | <String Id="msierrInstallPerfCounterData" Overridable="yes">La instalación de los contadores de rendimiento ha fracasado. ([2] [3] [4] [5])</String> | ||
17 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">La desinstalación de los contadores de rendimiento ha fracasado. ([2] [3] [4] [5])</String> | ||
18 | |||
19 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">La creación de los ACLs ha fracasado por [3]\[4], error del sistema : [2]</String> | ||
20 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">El posicionamiento de los ACLs por el objecto [3] ha fracasado, error del sistema: [2]</String> | ||
21 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">Tipo de objecto no conocido [3], error del sistema: [2]</String> | ||
22 | |||
23 | <String Id="msierrXmlFileFailedRead" Overridable="yes">Un problema ha aparecido durante la configuración de los ficheros XML.</String> | ||
24 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">Fracaso de la apertura de los ficheros XML [3], error del sistema: [2]</String> | ||
25 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">Fracaso de la búsqueda del nodo: [3] en el fichero XML: [4], error del sistema: [2]</String> | ||
26 | <String Id="msierrXmlFileFailedSave" Overridable="yes">Fracaso durante la salvaguardia de las modificaciones en el fichero XML [3], error del sistema: [2]</String> | ||
27 | |||
28 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">Un problema ha aparecido durante la configuración de los ficheros XML.</String> | ||
29 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">Fracaso de la apertura de los ficheros XML [3], error del sistema: [2]</String> | ||
30 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">Fracaso de la búsqueda del nodo: [3] en el fichero XML: [4], error del sistema: [2]</String> | ||
31 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">Fracaso durante la salvaguardia de las modificaciones en el fichero XML [3], error del sistema: [2]</String> | ||
32 | </WixLocalization> \ No newline at end of file | ||
diff --git a/src/wixlib/fr-fr.wxl b/src/wixlib/fr-fr.wxl new file mode 100644 index 00000000..066e7f81 --- /dev/null +++ b/src/wixlib/fr-fr.wxl | |||
@@ -0,0 +1,32 @@ | |||
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. --> | ||
3 | |||
4 | <WixLocalization Culture="fr-fr" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
5 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">La création de l'utilisateur a échoué. ([2] [3] [4] [5])</String> | ||
6 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">La création de l'utilisateur a échoué car le mot de passe est invalide. ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">L'ajout de l'utilisateur au groupe a échoué. ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">La création de l'utilisateur a échoué car il existe dejà. ([2] [3] [4] [5])</String> | ||
9 | |||
10 | <String Id="msierrSMBFailedCreate" Overridable="yes">La création du partage reseau a échoué. ([2] [3] [4] [5])</String> | ||
11 | <String Id="msierrSMBFailedDrop" Overridable="yes">La suppression du partage reseau a échoué. ([2] [3] [4] [5])</String> | ||
12 | |||
13 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">L'inscription au registre de la DLL avec PerfMon a échoué. ([2] [3] [4] [5])</String> | ||
14 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">La desinscription au registre de la DLL avec PerfMon a échoué. ([2] [3] [4] [5])</String> | ||
15 | |||
16 | <String Id="msierrInstallPerfCounterData" Overridable="yes">L'installation des compteurs de performance a échoué. ([2] [3] [4] [5])</String> | ||
17 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">La desinstallation des compteurs de performance a échoué. ([2] [3] [4] [5])</String> | ||
18 | |||
19 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">La création des ACLs a échoué pour [3]\[4], erreur systeme: [2]</String> | ||
20 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">Le positionnement des ACLs pour l'objet [3] a échoué, erreur systeme: [2]</String> | ||
21 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">Type d'objet inconnu [3], erreur systeme: [2]</String> | ||
22 | |||
23 | <String Id="msierrXmlFileFailedRead" Overridable="yes">Un problème est survenu lors de la configuration des fichiers XML.</String> | ||
24 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">Echec de l'ouverture des fichiers XML [3], erreur systeme: [2]</String> | ||
25 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">Echec de la recherche du noeud: [3] dans le fichier XML: [4], erreur systeme: [2]</String> | ||
26 | <String Id="msierrXmlFileFailedSave" Overridable="yes">Echec lors de la sauvegarde des modifications dans le fichier XML [3], erreur systeme: [2]</String> | ||
27 | |||
28 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">Un problème est survenu lors de la configuration des fichiers XML.</String> | ||
29 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">Echec de l'ouverture des fichiers XML [3], erreur systeme: [2]</String> | ||
30 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">Echec de la recherche du noeud: [3] dans le fichier XML: [4], erreur systeme: [2]</String> | ||
31 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">Echec lors de la sauvegarde des modifications dans le fichier XML [3], erreur systeme: [2]</String> | ||
32 | </WixLocalization> \ No newline at end of file | ||
diff --git a/src/wixlib/it-it.wxl b/src/wixlib/it-it.wxl new file mode 100644 index 00000000..35c62fc9 --- /dev/null +++ b/src/wixlib/it-it.wxl | |||
@@ -0,0 +1,33 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <WixLocalization Culture="it-it" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
6 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">Impossibile creare l'utente. ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">Impossibile creare l'utente perchè la password è errata. ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">Impossibile aggiungere l'utente al gruppo. ([2] [3] [4] [5])</String> | ||
9 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">Impossibile creare l'utente perchè già esistente. ([2] [3] [4] [5])</String> | ||
10 | |||
11 | <String Id="msierrSMBFailedCreate" Overridable="yes">Impossibile creare la risorsa di rete. ([2] [3] [4] [5])</String> | ||
12 | <String Id="msierrSMBFailedDrop" Overridable="yes">Impossibile eliminare la risorsa di rete. ([2] [3] [4] [5])</String> | ||
13 | |||
14 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">Impossibile registrare la DLL con PerfMon. ([2] [3] [4] [5])</String> | ||
15 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">Impossibile rimuovere la registrazione della DLL con PerfMon. ([2] [3] [4] [5])</String> | ||
16 | |||
17 | <String Id="msierrInstallPerfCounterData" Overridable="yes">Impossibile installare i contatori delle prestazioni. ([2] [3] [4] [5])</String> | ||
18 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">Impossibile rimuovere i contatori delle prestazioni. ([2] [3] [4] [5])</String> | ||
19 | |||
20 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">Impossibile creare i descrittori di sicurezza per [3]\[4], errore di sistema: [2]</String> | ||
21 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">Impossibile impostare i descrittori di sicurezza sull'oggetto [3], errore di sistema: [2]</String> | ||
22 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">Tipo di oggetto sconosciuto [3], errore di sistema: [2]</String> | ||
23 | |||
24 | <String Id="msierrXmlFileFailedRead" Overridable="yes">Si è verificato un errore durante la configurazione dei file XML.</String> | ||
25 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">Impossibile aprire il file XML [3], errore di sistema: [2]</String> | ||
26 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">Impossibile trovare il nodo: [3] nel file XML: [4], errore di sistema: [2]</String> | ||
27 | <String Id="msierrXmlFileFailedSave" Overridable="yes">Impossible salvare le modifiche al file XML [3], errore di sistema: [2]</String> | ||
28 | |||
29 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">Si è verificato un errore durante la configurazione dei file XML.</String> | ||
30 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">Impossibile aprire il file XML [3], errore di sistema: [2]</String> | ||
31 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">Impossibile trovare il nodo: [3] nel file XML: [4], errore di sistema: [2]</String> | ||
32 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">Impossibile salvare le modifiche al file XML [3], errore di sitema: [2]</String> | ||
33 | </WixLocalization> | ||
diff --git a/src/wixlib/ja-jp.wxl b/src/wixlib/ja-jp.wxl new file mode 100644 index 00000000..6206da64 --- /dev/null +++ b/src/wixlib/ja-jp.wxl | |||
@@ -0,0 +1,33 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <WixLocalization Culture="ja-jp" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
6 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">ユーザー作成に失敗しました。 ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">パスワードが無効のためユーザー作成に失敗しました。 ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">ユーザーをグループに追加でいませんでした。 ([2] [3] [4] [5])</String> | ||
9 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">ユーザーが既に存在するため作成できませんでした。 ([2] [3] [4] [5])</String> | ||
10 | |||
11 | <String Id="msierrSMBFailedCreate" Overridable="yes">ネットワーク共有の作成に失敗しました。 ([2] [3] [4] [5])</String> | ||
12 | <String Id="msierrSMBFailedDrop" Overridable="yes">ネットワーク共有の削除に失敗しました。 ([2] [3] [4] [5])</String> | ||
13 | |||
14 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">DLL を PerfMon に登録でいませんでした。 ([2] [3] [4] [5])</String> | ||
15 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">DLL を PerfMon より登録解除できませんでした。 ([2] [3] [4] [5])</String> | ||
16 | |||
17 | <String Id="msierrInstallPerfCounterData" Overridable="yes">パフォーマンス カウンタをインストールできませんでした。 ([2] [3] [4] [5])</String> | ||
18 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">パフォーマンス カウンタをアンインストールできませんでした。 ([2] [3] [4] [5])</String> | ||
19 | |||
20 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">[3]\[4] 用セキュリティ ディスクリプターを作成できませんでした、システム エラー: [2]</String> | ||
21 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">オブジェクト [3] 上のセキュリティ ディスクリプターを設定できませんでした、システム エラー: [2]</String> | ||
22 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">不明なオブジェクト種別 [3]、システム エラー: [2]</String> | ||
23 | |||
24 | <String Id="msierrXmlFileFailedRead" Overridable="yes">XML ファイル構成中に失敗しました。</String> | ||
25 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">XML ファイル [3] を開けませんでした、システム エラー: [2]</String> | ||
26 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">XML ファイル [4] 内にノード [3] が見つかりませんでした、システム エラー: [2]</String> | ||
27 | <String Id="msierrXmlFileFailedSave" Overridable="yes">XML ファイル [3] へ変更を保存できませんでした、システム エラー: [2]</String> | ||
28 | |||
29 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">XML ファイル構成中に失敗しました。</String> | ||
30 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">XML ファイル [3] を開けませんでした、システム エラー: [2]</String> | ||
31 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">XML ファイル [4] 内にノード [3] が見つかりませんでした、システム エラー: [2]</String> | ||
32 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">XML ファイル [3] へ変更を保存できませんでした、システム エラー: [2]</String> | ||
33 | </WixLocalization> | ||
diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config new file mode 100644 index 00000000..89544f1d --- /dev/null +++ b/src/wixlib/packages.config | |||
@@ -0,0 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <packages> | ||
3 | <package id="Nerdbank.GitVersioning" version="2.1.7" developmentDependency="true" targetFramework="net40" /> | ||
4 | <package id="WixToolset.Core.InternalPackage" version="4.0.60" targetFramework="net40" developmentDependency="true" /> | ||
5 | </packages> \ No newline at end of file | ||
diff --git a/src/wixlib/pt-br.wxl b/src/wixlib/pt-br.wxl new file mode 100644 index 00000000..b2af3425 --- /dev/null +++ b/src/wixlib/pt-br.wxl | |||
@@ -0,0 +1,27 @@ | |||
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. --> | ||
3 | |||
4 | |||
5 | <WixLocalization Culture="pt-br" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
6 | <String Id="msierrUSRFailedUserCreate" Overridable="yes">Falha ao criar usuário. ([2] [3] [4] [5])</String> | ||
7 | <String Id="msierrUSRFailedUserCreatePswd" Overridable="yes">Falha ao criar usuário devido a senha inválida. ([2] [3] [4] [5])</String> | ||
8 | <String Id="msierrUSRFailedUserGroupAdd" Overridable="yes">Falha ao adicionar o usuário ao grupo. ([2] [3] [4] [5])</String> | ||
9 | <String Id="msierrUSRFailedUserCreateExists" Overridable="yes">Falha ao criar o usuário, porque ele já existe. ([2] [3] [4] [5])</String> | ||
10 | <String Id="msierrSMBFailedCreate" Overridable="yes">Falha ao criar o compartilhamento de rede. ([2] [3] [4] [5])</String> | ||
11 | <String Id="msierrSMBFailedDrop" Overridable="yes">Falha ao cair compartilhamento de rede. ([2] [3] [4] [5])</String> | ||
12 | <String Id="msierrPERFMONFailedRegisterDLL" Overridable="yes">Falha ao registrar DLL com PerfMon. ([2] [3] [4] [5])</String> | ||
13 | <String Id="msierrPERFMONFailedUnregisterDLL" Overridable="yes">Falha ao cancelar o registro de DLL com PerfMon. ([2] [3] [4] [5])</String> | ||
14 | <String Id="msierrInstallPerfCounterData" Overridable="yes">Falha ao instalar contadores de desempenho. ([2] [3] [4] [5])</String> | ||
15 | <String Id="msierrUninstallPerfCounterData" Overridable="yes">Falha ao desinstalar contadores de desempenho. ([2] [3] [4] [5])</String> | ||
16 | <String Id="msierrSecureObjectsFailedCreateSD" Overridable="yes">Falha ao criar o descritor de segurança [3] \ [4], erro do sistema: [2]</String> | ||
17 | <String Id="msierrSecureObjectsFailedSet" Overridable="yes">Falha ao definir o descritor de segurança sobre o objeto [3], erro do sistema: [2]</String> | ||
18 | <String Id="msierrSecureObjectsUnknownType" Overridable="yes">Objeto Desconhecido Tipo [3], erro do sistema: [2]</String> | ||
19 | <String Id="msierrXmlFileFailedRead" Overridable="yes">Houve uma falha ao configurar arquivos XML.</String> | ||
20 | <String Id="msierrXmlFileFailedOpen" Overridable="yes">Falha ao abrir o arquivo XML [3], erro do sistema: [2]</String> | ||
21 | <String Id="msierrXmlFileFailedSelect" Overridable="yes">Falha ao localizar nó: [3] no arquivo XML: [4], erro do sistema: [2]</String> | ||
22 | <String Id="msierrXmlFileFailedSave" Overridable="yes">Falha ao salvar as alterações para o arquivo XML [3], erro do sistema: [2]</String> | ||
23 | <String Id="msierrXmlConfigFailedRead" Overridable="yes">Houve uma falha ao configurar arquivos XML.</String> | ||
24 | <String Id="msierrXmlConfigFailedOpen" Overridable="yes">Falha ao abrir o arquivo XML [3], erro do sistema: [2]</String> | ||
25 | <String Id="msierrXmlConfigFailedSelect" Overridable="yes">Falha ao localizar nó: [3] no arquivo XML: [4], erro do sistema: [2]</String> | ||
26 | <String Id="msierrXmlConfigFailedSave" Overridable="yes">Falha ao salvar as alterações para o arquivo XML [3], erro do sistema: [2]</String> | ||
27 | </WixLocalization> | ||
diff --git a/src/wixlib/util.wixproj b/src/wixlib/util.wixproj new file mode 100644 index 00000000..2fc8c589 --- /dev/null +++ b/src/wixlib/util.wixproj | |||
@@ -0,0 +1,52 @@ | |||
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. --> | ||
3 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> | ||
4 | <Import Project="..\..\packages\WixToolset.Core.InternalPackage.4.0.60\build\WixToolset.Core.InternalPackage.props" Condition="Exists('..\..\packages\WixToolset.Core.InternalPackage.4.0.60\build\WixToolset.Core.InternalPackage.props')" /> | ||
5 | <Import Project="..\FindLocalWix.props" /> | ||
6 | <PropertyGroup> | ||
7 | <ProjectGuid>{1ACFFEFD-505A-41A5-ACBF-A02B7B473AA2}</ProjectGuid> | ||
8 | <OutputName>util</OutputName> | ||
9 | <OutputType>Library</OutputType> | ||
10 | <BindFiles>true</BindFiles> | ||
11 | <Pedantic>true</Pedantic> | ||
12 | </PropertyGroup> | ||
13 | <ItemGroup> | ||
14 | <Compile Include="UtilExtension.wxs" /> | ||
15 | <Compile Include="UtilExtension_x86.wxs" /> | ||
16 | <Compile Include="UtilExtension_x64.wxs" /> | ||
17 | <EmbeddedResource Include="en-us.wxl" /> | ||
18 | <EmbeddedResource Include="de-de.wxl" /> | ||
19 | <EmbeddedResource Include="es-es.wxl" /> | ||
20 | <EmbeddedResource Include="fr-fr.wxl" /> | ||
21 | <EmbeddedResource Include="ja-jp.wxl" /> | ||
22 | <EmbeddedResource Include="pt-br.wxl" /> | ||
23 | <EmbeddedResource Include="it-it.wxl" /> | ||
24 | </ItemGroup> | ||
25 | <ItemGroup> | ||
26 | <None Include="packages.config" /> | ||
27 | </ItemGroup> | ||
28 | <ItemGroup> | ||
29 | <ProjectReference Include="..\ca\utilca.vcxproj"> | ||
30 | <Name>utilca</Name> | ||
31 | <Project>{076018F7-19BD-423A-ABBF-229273DA08D8}</Project> | ||
32 | </ProjectReference> | ||
33 | </ItemGroup> | ||
34 | <ItemGroup> | ||
35 | <None Include="caerr.wxi" /> | ||
36 | <None Include="caSuffix.wxi" /> | ||
37 | <None Include="UtilExtension_Platform.wxi" /> | ||
38 | </ItemGroup> | ||
39 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " /> | ||
40 | <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " /> | ||
41 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
42 | <Error Text="FG-WiX or WiX Toolset build tools (v3.11 or later) must be installed to build this project. To download FG-WiX, go to https://www.firegiant.com/downloads/. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
43 | </Target> | ||
44 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
45 | <PropertyGroup> | ||
46 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
47 | </PropertyGroup> | ||
48 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets'))" /> | ||
49 | <Error Condition="!Exists('..\..\packages\WixToolset.Core.InternalPackage.4.0.60\build\WixToolset.Core.InternalPackage.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Core.InternalPackage.4.0.60\build\WixToolset.Core.InternalPackage.props'))" /> | ||
50 | </Target> | ||
51 | <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets')" /> | ||
52 | </Project> \ No newline at end of file | ||