Skip to content

Commit 0c7b00b

Browse files
committed
Proofread markdown documentation.
1 parent 170528d commit 0c7b00b

File tree

5 files changed

+78
-46
lines changed

5 files changed

+78
-46
lines changed

README.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Windows Answer File Generator
22

3-
The Answer File Generator is a command line application and [library](#ookiianswerfile-library) for
3+
The Answer File Generator is a command line application and [library](doc/Library.md) for
44
generating answer files for unattended Windows installations. These files are commonly called
55
unattend.xml or autounattend.xml (depending on the installation method used).
66

@@ -31,7 +31,7 @@ Below, the core functionality is explained with several examples. You can also c
3131

3232
See [what's new in Answer File Generator](doc/ChangeLog.md).
3333

34-
If you need additional customization, you will need to edit the generated answer file. If you'd like
34+
If you need additional customization, you will have to edit the generated answer file. If you'd like
3535
any other options to be available through the tool, you can
3636
[file an issue](https://github.com/SvenGroot/GenerateAnswerFile/issues) or
3737
[submit a pull request](https://github.com/SvenGroot/GenerateAnswerFile/pulls).
@@ -103,7 +103,7 @@ syntax to continue a command on the next line.
103103
```
104104

105105
The resulting answer file will install a 64 bit version of Windows on the first disk of a UEFI
106-
system, and activates it using the specified product key.
106+
system, using the default UEFI partition layout, and activates it using the specified product key.
107107

108108
### Installing a 32 bit OS
109109

@@ -114,31 +114,31 @@ system, and activates it using the specified product key.
114114
-ProductKey ABCDE-12345-ABCDE-12345-ABCDE
115115
```
116116

117-
By default, the generated answer files are for 64 bit editions of Windows. Use the
118-
[`-ProcessorArchitecture`][] argument to specify a different CPU architecture.
117+
By default, the generated answer files are for Windows editions running on 64 bit Intel or AMD
118+
processors. Use the [`-ProcessorArchitecture`][] argument to specify a different CPU architecture,
119+
such as "x86" for 32 bit processors, or "arm64" for ARM based systems.
119120

120121
### Creating a user during installation
121122

122123
```text
123124
./GenerateAnswerFile autounattend.xml `
124125
-Install CleanEfi `
125-
-LocalAccount "John,Password" `
126-
-AutoLogonUser John `
127-
-AutoLogonPassword Password `
126+
-LocalAccount "John,Password" "Steve,OtherPassword" `
128127
-ProductKey ABCDE-12345-ABCDE-12345-ABCDE
129128
```
130129

131-
This example creates a user named "John" with the password "Password" (don't do this, obviously),
132-
and logs in with that user automatically on first boot[^1]. To log in automatically more often, use
133-
the [`-AutoLogonCount`][] argument.
130+
This example creates a user named "John" with the password "Password" (don't use that as your
131+
password, obviously), and a user named "Steve" with the password "OtherPassword". The
132+
[`-LocalAccount`][] argument takes one or more values, allowing the creation of any number of
133+
accounts.
134134

135-
The [`-LocalAccount`][] argument takes multiple values, if you want to create more than one account.
135+
All accounts created during this method will be members of the local Administrators group.
136136

137137
### Joining a domain and automatic log-on
138138

139139
```text
140140
./GenerateAnswerFile unattend.xml `
141-
-ComputerName my-pc `
141+
-ComputerName mypc `
142142
-JoinDomain mydomain `
143143
-JoinDomainUser domainuser `
144144
-JoinDomainPassword Password `
@@ -147,25 +147,32 @@ The [`-LocalAccount`][] argument takes multiple values, if you want to create mo
147147
-AutoLogonPassword Password
148148
```
149149

150-
The answer file created by this command sets the computer name to "my-pc" and joins it to the domain
151-
"mydomain", using the supplied credentials. It also adds the account "domainuser" to the local
152-
administrators group and logs in using that account automatically on first boot[^1].
150+
The answer file created by this command sets the computer name to "mypc" and joins it to the domain
151+
"mydomain", using the supplied credentials. It also adds the account "domainuser" from the
152+
"mydomain" domain to the local Administrators group, and logs in using that account automatically on
153+
first boot.
153154

154155
This sample does not use the [`-Install`][] argument, so it creates an answer file suitable for
155-
pre-installed Windows images, such as those created using sysprep or DISM tools. The [`-JoinDomain`][]
156-
argument can be used with any install method, however.
156+
pre-installed Windows images, such as those created using sysprep or DISM tools. The
157+
[`-JoinDomain`][] argument can be used with any install method, however.
158+
159+
The [`-AutoLogonUser`][] argument can be used for both domain or local accounts; to use a local
160+
account, specify the user name only, without a domain. To log in automatically more than once, use
161+
the [`-AutoLogonCount`][] argument[^1].
157162

158163
### Custom partition layout
159164

160165
If you use the `CleanEfi` or `CleanBios`, you can choose to customize the partition layout for the
161166
disk specified by [`-InstallToDisk`][], by using the [`-Partition`][] argument. This argument accepts
162-
multiple values, each creating a partition on that disk in the order specified. If this argument is
163-
not specified, a default partition layout is used.
167+
multiple values, each creating a partition on that disk in the order specified.
164168

165-
Each partition uses the format `label:size`, where label is the volume label, and size is the size
166-
of the partition. The size can use multiple-byte units, such as GB or MB, and will be rounded down
167-
to a whole number of megabytes. If the size is `*`, it indicates the partition will fill the
168-
remainder of the disk.
169+
If the [`-Partition`][] argument is not specified, the default partition layout for the install
170+
method is used, as specified in the table above.
171+
172+
The [`-Partition`][] argument uses the format `label:size`, where label is the volume label, and
173+
size is the size of the partition. The size can use multiple-byte units, such as GB or MB[^2], and
174+
will be rounded down to a whole number of megabytes. If the size is `*`, it indicates the partition
175+
will fill the remainder of the disk.
169176

170177
```text
171178
./GenerateAnswerFile autounattend.xml `
@@ -181,8 +188,8 @@ remainder of the disk.
181188
Several values for the volume label are used to create special partition types.
182189

183190
Label | Meaning
184-
--------------------------|-----------------------------------------------------------------------------------------------------------------------------------
185-
**System** | For `CleanEfi`, creates the special EFI partition. For `CleanBios`, creates the system partition holding the Windows boot manager.
191+
--------------------------|----------------------------------------------------------------------------------------------------------------------------------------
192+
**System** | For `CleanEfi`, creates the EFI system partition (ESP). For `CleanBios`, creates the system partition holding the Windows boot manager.
186193
**MSR** | Creates a partition with the Microsoft Reserved partition type. For use with `CleanEfi` only.
187194
**WinRE** or **Recovery** | Marks the partition as a utility partition.
188195

@@ -236,7 +243,7 @@ using sysprep, or by using DISM tools.
236243
```text
237244
./GenerateAnswerFile autounattend.xml `
238245
-Install CleanEfi `
239-
-FirstLogonCommand "reg add "HKCU\Software\MyCompany\" /v ImportantRegistryKey /t REG_DWORD /d 1 /f" `
246+
-FirstLogonCommand "reg add HKCU\Software\MyCompany /v ImportantRegistryKey /t REG_DWORD /d 1 /f" `
240247
-SetupScript "\\server\share\script.ps1 -Argument" `
241248
-LocalAccount "John,Password" `
242249
-AutoLogonUser John `
@@ -287,6 +294,10 @@ any other adverse effects caused by the use of answer files generated by this to
287294
which causes it to be inaccurate. The Answer File Generator adjusts the count and uses a first
288295
log-on command if needed to ensure the `-AutoLogonCount` argument is accurate.
289296

297+
[^2]: All sizes use powers of two, so 1MB is 1,048,576 bytes. You can also use IEC units such as MiB
298+
or GiB, with the same meaning.
299+
300+
[`-AutoLogonUser`]: doc/CommandLine.md#-autologonuser
290301
[`-AutoLogonCount`]: doc/CommandLine.md#-autologoncount
291302
[`-Feature`]: doc/CommandLine.md#-feature
292303
[`-FirstLogonCommand`]: doc/CommandLine.md#-firstlogoncommand

doc/ChangeLog.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,30 @@
33
## Answer File Generator 1.1
44

55
- Apply a workaround for a [known issue with the `LogonCount` element](https://learn.microsoft.com/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup-autologon-logoncount),
6-
so that the `-AutoLogonCount` argument is accurate.
7-
- Add the `-Partition` argument, which adds the ability to specify a custom partition layout when
8-
using the `CleanEfi` or `CleanBios` installation method.
9-
- Add the `-FirstLogonCommand` argument to run commands that are not PowerShell scripts.
10-
- Add the `-DisableServerManager` option to disable the automatic launching of Server Manager on
6+
so that the [`-AutoLogonCount`][] argument is accurate.
7+
- Add the [`-Partition`][] argument, which adds the ability to specify a custom partition layout
8+
when using the `CleanEfi` or `CleanBios` installation method.
9+
- Add the [`-FirstLogonCommand`][] argument to run commands that are not PowerShell scripts.
10+
- Add the [`-DisableServerManager`][] option to disable the automatic launching of Server Manager on
1111
Windows Server SKUs.
12-
- The `-JoinDomainUser` argument allows the use of a user from a different domain than the one being
13-
joined.
14-
- Using the `-SetupScript` argument no longer changes the global execution policy for Windows
12+
- The [`-JoinDomainUser`][] argument allows the use of a user from a different domain than the one
13+
being joined.
14+
- Using the [`-SetupScript`][] argument no longer changes the global execution policy for Windows
1515
PowerShell.
1616
- The local and online account screens are no longer skipped if you do not specify either the
17-
`-LocalAccount` or the `-JoinDomain` arguments.
18-
- [Source Link](https://github.com/dotnet/sourcelink) support for the Ookii.AnswerFile library.
17+
[`-LocalAccount`][] or the [`-JoinDomain`][] arguments.
18+
- [Source Link](https://github.com/dotnet/sourcelink) support for the
19+
[Ookii.AnswerFile library](Library.md).
1920

2021
## Answer File Generator 1.0 (2023-01-25)
2122

2223
- This is the first release of Answer File Generator
24+
25+
[`-AutoLogonCount`]: CommandLine.md#-autologoncount
26+
[`-DisableServerManager`]: CommandLine.md#-disableservermanager
27+
[`-FirstLogonCommand`]: CommandLine.md#-firstlogoncommand
28+
[`-JoinDomain`]: CommandLine.md#-joindomain
29+
[`-JoinDomainUser`]: CommandLine.md#-joindomainuser
30+
[`-LocalAccount`]: CommandLine.md#-localaccount
31+
[`-Partition`]: CommandLine.md#-partition
32+
[`-SetupScript`]: CommandLine.md#-setupscript

doc/CommandLine.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Command line arguments
22

3-
This page describes the command line arguments supported by Answer File Generator, which are used
4-
to customize the generated answer file. All argument names are case insensitive.
3+
This page describes the command line arguments supported by the Answer File Generator, which are
4+
used to customize the generated answer file. All argument names are case insensitive.
55

6-
Argument values can be specified as either `-JoinDomain mydomain`, `-JoinDomain:mydomain` or
6+
Argument values can be specified as either e.g. `-JoinDomain mydomain`, `-JoinDomain:mydomain` or
77
`-JoinDomain=mydomain`.
88

99
Some arguments can be specified multiple times. This can be done by listing several values after
@@ -13,7 +13,7 @@ the argument:
1313
-LocalAccount "John,Password" "Dave,OtherPassword" -EnableRemoteDesktop
1414
```
1515

16-
Or, by repeating the argument multiple times:
16+
Or, by repeating the argument multiple times, potentially interleaving other arguments:
1717

1818
```text
1919
-LocalAccount "John,Password" -EnableRemoteDesktop -LocalAccount "Dave,OtherPassword"
@@ -28,6 +28,7 @@ $arguments = @{
2828
"OutputPath" = "unattend.xml"
2929
"InstallMethod" = "CleanEfi"
3030
"Feature" = "Microsoft-Windows-Subsystem-Linux","VirtualMachinePlatform"
31+
"WindowsVersion" = "10.0.22621.1"
3132
"EnableRemoteDesktop" = $true
3233
}
3334

doc/Library.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ partition layout or optional features, are set in those classes.
1616
Leave the [`GeneratorOptions.InstallOptions`][] set to null to generate an answer file for a
1717
pre-installed image, such as one created by sysprep or DISM tools.
1818

19-
The below sample sets various options to perform a clean installation on a UEFI-based system,
20-
enabling some optional features and remote desktop. It creates a user account, and sets it be logged
21-
on automatically at first boot.
19+
The below example sets various options to perform a clean installation on a UEFI-based system,
20+
enabling some optional features and remote desktop. It creates a user account, and sets it to be
21+
logged on automatically at first boot.
2222

2323
```csharp
2424
var options = new GeneratorOptions()
@@ -33,8 +33,8 @@ var options = new GeneratorOptions()
3333
EnableRemoteDesktop = true,
3434
LocalAccounts = { new LocalCredential("MyUser", "Password") },
3535
AutoLogon = new AutoLogonOptions(new DomainUser(null, "MyUser"), "Password"),
36-
ProductKey = "ABCDE-12345-ABCDE-12345-ABCDE"
37-
DisplayResolution = new Size(1280, 1024)
36+
ProductKey = "ABCDE-12345-ABCDE-12345-ABCDE",
37+
DisplayResolution = new Size(1920, 1080)
3838
};
3939

4040
Generator.Generate("unattend.xml", options);

doc/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Windows Answer File Generator
2+
3+
This folder contains documentation for the Windows Answer File Generator.
4+
5+
## Contents
6+
7+
- [Usage documentation](../README.md)
8+
- [What's new in Answer File Generator](ChangeLog.md)
9+
- [Command line arguments](CommandLine.md)
10+
- [Ookii.AnswerFile library](Library.md)

0 commit comments

Comments
 (0)