forked from cschneegans/unattend-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.cs
More file actions
36 lines (34 loc) · 1016 Bytes
/
Copy pathExample.cs
File metadata and controls
36 lines (34 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Immutable;
using System.Xml;
namespace Schneegans.Unattend;
class Example
{
public static void Main(string[] args)
{
UnattendGenerator generator = new();
XmlDocument xml = generator.GenerateXml(
Configuration.Default with
{
LanguageSettings = new UnattendedLanguageSettings(
ImageLanguage: generator.Lookup<ImageLanguage>("en-US"),
UserLocale: generator.Lookup<UserLocale>("en-US"),
InputLocale: generator.Lookup<KeyboardIdentifier>("0409:00000409"),
GeoLocation: generator.Lookup<GeoLocation>("244")
),
Bloatwares = ImmutableList.CreateRange(
[
generator.Lookup<Bloatware>("RemoveTeams"),
generator.Lookup<Bloatware>("RemoveOutlook"),
]
),
}
);
using XmlWriter writer = XmlWriter.Create(Console.Out, new XmlWriterSettings()
{
CloseOutput = false,
Indent = true,
});
xml.WriteTo(writer);
}
}