]> wimlib.net Git - wimlib/blob - doc/man1/imagex-apply.1.in
Update version number in preparation of eventual v1.6.3 release
[wimlib] / doc / man1 / imagex-apply.1.in
1 .TH WIMLIB-IMAGEX "1" "May 2014" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
2 .SH NAME
3 @IMAGEX_PROGNAME@-apply \- Extract one image, or all images, from a WIM archive
4 .SH SYNOPSIS
5 \fB@IMAGEX_PROGNAME@ apply\fR \fIWIMFILE\fR [\fIIMAGE\fR] \fITARGET\fR [\fIOPTION\fR...]
6 .SH DESCRIPTION
7 \fB@IMAGEX_PROGNAME@ apply\fR extracts an image, or all images, from the Windows
8 Imaging (WIM) file \fIWIMFILE\fR.  This command is also available as simply
9 \fBwimapply\fR if the appropriate hard link or batch file has been installed.
10 .PP
11 This command is designed to extract, or "apply", one or more full WIM images.
12 If you instead want to extract only certain files or directories contained in a
13 WIM image, consider using \fB@IMAGEX_PROGNAME@ extract\fR or
14 \fB@IMAGEX_PROGNAME@ mount\fR instead.  (\fB@IMAGEX_PROGNAME@ mount\fR is not
15 supported on Windows.)
16 .PP
17 \fIIMAGE\fR specifies the WIM image in \fIWIMFILE\fR to extract.  It may be a
18 1-based index of an image in \fIWIMFILE\fR, the name of an image in
19 \fIWIMFILE\fR, or the keyword "all" to indicate that all images in \fIWIMFILE\fR
20 are to be extracted.  Use the \fB@IMAGEX_PROGNAME@ info\fR (1) command to show
21 what images a WIM file contains.  \fIIMAGE\fR may be omitted if \fIWIMFILE\fR
22 contains only one image.
23 .PP
24 \fITARGET\fR specifies where to extract the WIM image to.  If \fITARGET\fR
25 specifies a directory, the WIM image is extracted to that directory (see
26 \fBDIRECTORY EXTRACTION (UNIX)\fR or \fBDIRECTORY EXTRACTION (WINDOWS)\fR).
27 Similarly, if \fITARGET\fR specifies a non-existent file, a directory is created
28 in that location and the WIM image is extracted to that directory.
29 .PP
30 If \fIIMAGE\fR is specified as "all", then all the images in \fIWIMFILE\fR are
31 actually extracted into subdirectories of \fITARGET\fR, each of which is given
32 the name of the corresponding image, falling back to the image index in the case
33 of an image with no name or a name not valid as a filename.
34 .PP
35 Alternatively, on UNIX-like systems only, if \fITARGET\fR specifies a regular
36 file or block device, it is interpreted as an NTFS volume to which the WIM image
37 is to be extracted (see \fBNTFS VOLUME EXTRACTION (UNIX)\fR).  Only a single
38 image can be extracted in this mode, and only extracting to the root of the NTFS
39 volume (not a subdirectory thereof) is supported.
40 .PP
41 \fIWIMFILE\fR may be "-" to read the WIM from standard input rather than from a
42 file, but see \fBPIPABLE WIMS\fR for more information.
43 .PP
44 \fB@IMAGEX_PROGNAME@ apply\fR supports applying images from stand-alone WIMs as
45 well as split WIMs.  See \fBSPLIT WIMS\fR.
46 .SH DIRECTORY EXTRACTION (UNIX)
47 This section documents how \fB@IMAGEX_PROGNAME@ apply\fR (and also
48 \fB@IMAGEX_PROGNAME@ extract\fR) extract a WIM image (or a possibly a subset
49 thereof, in the case of \fB@IMAGEX_PROGNAME@ extract\fR) to a directory on
50 UNIX-like systems.  See \fBDIRECTORY EXTRACTION (WINDOWS)\fR for the
51 corresponding documentation for Windows.
52
53 As mentioned, a WIM image can be applied to a directory on a UNIX-like system by
54 providing a \fITARGET\fR directory.  However, it is important to keep in mind
55 that the WIM format was designed for Windows, and as a result WIM files can
56 contain data or metadata that cannot be represented on UNIX-like systems.  The
57 main information that \fB@IMAGEX_PROGNAME@\fR will \fInot\fR be able to extract
58 on UNIX-like systems is the following:
59 .IP \[bu] 4
60 Windows security descriptors (which include the file owner, group, and ACLs).
61 .IP \[bu]
62 Named data streams.
63 .IP \[bu]
64 Reparse points other than symbolic links and junction points.
65 .IP \[bu]
66 Certain file attributes such as compression, encryption, and sparseness.
67 .IP \[bu]
68 Short (DOS) names for files.
69 .IP \[bu]
70 File creation timestamps.
71 .PP
72 Notes: Unsupported data and metadata is simply not extracted, but
73 \fB@IMAGEX_PROGNAME@\fR will attempt to warn you when the contents of the WIM
74 image can't be exactly represented when extracted.  Last access and last
75 modification timestamps are specified to 100 nanosecond granularity in the WIM
76 file, but will only be extracted to the highest precision supported by the
77 underlying operating system, C library, and filesystem.  Compressed files will
78 be extracted as uncompressed, while encrypted files will not be extracted at
79 all.
80 .SH NTFS VOLUME EXTRACTION (UNIX)
81 This section documents how \fB@IMAGEX_PROGNAME@ apply\fR extracts a WIM image
82 directly to an NTFS volume image on UNIX-like systems.
83 .PP
84 As mentioned, \fB@IMAGEX_PROGNAME@\fR running on a UNIX-like system can apply a
85 WIM image directly to an NTFS volume by specifying \fITARGET\fR as a regular file
86 or block device containing an NTFS filesystem.  The NTFS filesystem need not be
87 empty, although it's expected that it be empty for the intended use cases.  A
88 new NTFS filesystem can be created using the \fBmkntfs\fR(8) command provided
89 with \fBntfs-3g\fR.
90 .PP
91 In this NTFS volume extraction mode, the WIM image is extracted to the root of
92 the NTFS volume in a way preserves almost all information contained in the WIM
93 image.  It therefore does not suffer from the limitations described in
94 \fBDIRECTORY EXTRACTION (UNIX)\fR.  This support relies on libntfs-3g to write
95 to the NTFS volume and handle NTFS-specific and Windows-specific data.
96 .PP
97 Please note that this NTFS volume extraction mode is \fInot\fR entered if
98 \fITARGET\fR is a directory, even if an NTFS filesystem is mounted on
99 \fITARGET\fR.  You must specify the NTFS volume itself (and it must be
100 unmounted, and you must have permission to write to it).
101 .PP
102 This NTFS volume extraction mode attempts to extract as much information as
103 possible, including:
104 .IP \[bu] 4
105 All data streams of all files except encrypted files, including the unnamed data
106 stream as well as all named data streams.
107 .IP \[bu]
108 Reparse points, including symbolic links, junction points, and other reparse
109 points.
110 .IP \[bu]
111 File and directory creation, access, and modification timestamps, using the
112 native NTFS resolution of 100 nanoseconds.
113 .IP \[bu]
114 Windows security descriptors, including all components (owner, group, DACL, and
115 SACL).
116 .IP \[bu]
117 DOS/Windows file attribute flags.
118 .IP \[bu]
119 All names of all files, including names in the Win32 namespace, DOS namespace,
120 Win32+DOS namespace, and POSIX namespace.  This includes hard links.
121 .PP
122 However, there are also several known limitations of the NTFS volume extraction
123 mode:
124 .IP \[bu] 4
125 Encrypted files will not be extracted.
126 .IP \[bu]
127 Although sparse file attributes will be applied, the full data will be extracted
128 to each sparse file, so extracted "sparse" files may not actually contain any
129 sparse regions.
130 .PP
131 Regardless, since almost all information from the WIM image is restored in this
132 mode, it is possible to restore an image of an actual Windows installation using
133 \fB@IMAGEX_PROGNAME@\fR on UNIX-like systems in addition to with
134 \fB@IMAGEX_PROGNAME@\fR on Windows.  In the examples at the end of this manual
135 page, there is an example of applying an image from the "install.wim" file
136 contained in the installation media for Windows Vista, Windows 7, and Windows 8
137 in the "sources" directory.
138 .PP
139 But in order to actually boot Windows from an applied image, you must understand
140 the boot process of Windows versions Vista and later.  Basically, it is the
141 following:
142 .nr step 1 1
143 .IP \n[step]. 3
144 The Master Boot Record loads the Volume Boot Record (also called the Boot
145 Sector) of the active partition, which is on an NTFS filesystem.  This partition
146 is called the "system partition".
147 .IP \n+[step].
148 The "bootmgr" program on the "system partition" is loaded (\\BOOTMGR).
149 .IP \n+[step].
150 bootmgr loads the Boot Configuration Data (\\Boot\\BCD) from the "system
151 partition".
152 .IP \n+[step].
153 Based on the information contained in the Boot Configuration Data, a loader for
154 the Windows kernel is executed from the "Boot" partition, which is where Windows
155 is installed.
156 .PP
157 So let's say you applied an image from an existing "install.wim" as in the
158 example, or you've applied a custom Windows image that you've created using the
159 \fB@IMAGEX_PROGNAME@ capture\fR (1) command.  You've just applied the "Boot" partition, or
160 the main Windows partition, but there is no "System" partition yet (i.e.  no
161 \\BOOTMGR and no \\Boot\\BCD).
162 .PP
163 A "System" partition can be created created by running the "bcdboot.exe" program
164 from within Windows or Windows PE.  Alternatively, you can capture a separate
165 WIM image containing the "System" partition.  Or, the "System" partition may the
166 same as the "Boot" partition, so the two "partitions" may be combined in one WIM
167 image.  However, as the \\Boot\\BCD file contains the Windows bootloader
168 configuration, a WIM containing it can only be used on systems where you are
169 setting up the same bootloader configuration, including the same partition
170 layout.
171 .PP
172 Besides setting up the files on the "System" partition, don't forget to set the
173 bootable flag on it, and have a master boot record that loads the bootable
174 partition (Windows' MBR does, and SYSLINUX provides an equivalent MBR).
175 .SH DIRECTORY EXTRACTION (WINDOWS)
176 On Windows, \fB@IMAGEX_PROGNAME@ apply\fR and \fB@IMAGEX_PROGNAME@ extract\fR
177 natively support Windows-specific and NTFS-specific data.  For best results, the
178 target directory should be located on an NTFS volume and \fB@IMAGEX_PROGNAME@\fR
179 should be run with Administrator privileges; however, non-NTFS filesystems and
180 running without Administrator privileges are also supported.
181 .PP
182 On Windows, \fB@IMAGEX_PROGNAME@ apply\fR and \fB@IMAGEX_PROGNAME@ extract\fR
183 try to extract as much data and metadata as possible, including:
184 .IP \[bu] 4
185 All data streams of all files.  This includes the default file contents, as well
186 as named data streams if supported by the target volume.
187 .IP \[bu]
188 Reparse points, including symbolic links, junction points, and other reparse
189 points, if supported by the target volume.  (Note: see \fB--rpfix\fR and
190 \fB--norpfix\fR for documentation on exactly how absolute symbolic links and
191 junctions are extracted.)  However, as per the default security settings of
192 Windows, it is impossible to create a symbolic link or junction point without
193 Administrator privileges; therefore, you must run \fB@IMAGEX_PROGNAME@\fR as the
194 Administrator if you wish to fully restore an image containing symbolic links
195 and/or junction points.  (Otherwise, merely a warning will be issued when a
196 symbolic link or junction point cannot be extracted due to insufficient
197 privileges.)
198 .IP \[bu]
199 File and directory creation, access, and modification timestamps, to the highest
200 resolution supported by the target volume.
201 .IP \[bu]
202 Security descriptors, if supported by the filesystem and \fB--no-acls\fR is not
203 specified.  Furthermore, unless \fB--strict-acls\fR is specified, the security
204 descriptors for individual files or directories may be omitted or only partially
205 set if the user does not have permission to set them, which can be a problem if
206 \fB@IMAGEX_PROGNAME@\fR is run as a non-Administrator.
207 .IP \[bu]
208 File attributes, including hidden, sparse, compressed, encrypted, etc, when
209 supported by the filesystem.
210 .IP \[bu]
211 DOS names (8.3) names of files; however, the failure to set them is not
212 considered an error condition.
213 .IP \[bu]
214 Hard links, if supported by the filesystem.
215 .PP
216 Additional notes about extracting files on Windows:
217 .IP \[bu] 4
218 \fB@IMAGEX_PROGNAME@\fR will issue a warning when it is unable to extract the
219 exact metadata and data of the WIM image, for example due to features mentioned
220 above not being supported by the target filesystem.
221 .IP \[bu]
222 Since encrypted files (with FILE_ATTRIBUTE_ENCRYPTED) are not stored in
223 plaintext in the WIM image, \fB@IMAGEX_PROGNAME@\fR cannot restore encrypted
224 files to filesystems not supporting encryption.  Therefore, on such filesystems,
225 encrypted files will not be extracted.  Furthermore, even if encrypted
226 files are restored to a filesystem that supports encryption, they will only be
227 decryptable if the decryption key is available.
228 .IP \[bu]
229 Files with names that cannot be represented on Windows will not
230 be extracted by default; see \fB--include-invalid-names\fR.
231 .IP \[bu]
232 Files with full paths over 260 characters (the so-called MAX_PATH) will be
233 extracted, but beware that such files will be inaccessible to most Windows
234 software and may not be able to be deleted easily.
235 .IP \[bu]
236 On Windows, unless the \fB--no-acls\fR option is specified, wimlib will attempt
237 to restore files' security descriptors exactly as they are provided in the WIM
238 image.  Beware that typical Windows installations contain files whose security
239 descriptors do not allow the Administrator to delete them.  Therefore, such
240 files will not be able to be deleted, or in some cases even read, after
241 extracting, unless processed with a specialized program that knows to acquire
242 the SE_RESTORE_NAME and/or SE_BACKUP_NAME privileges which allow overriding
243 access control lists.  This is not a bug in wimlib, which works as designed to
244 correctly restore the data that was archived, but rather a problem with the
245 access rights Windows uses on certain files.  But if you just want the file data
246 and don't care about security descriptors, use \fB--no-acls\fR to skip restoring
247 all security descriptors.
248 .IP \[bu]
249 A similar caveat to the above applies to file attributes such as Readonly,
250 Hidden, and System.  By design, on Windows wimlib will restore such file
251 attributes; therefore, extracted files may have those attributes.  If this is
252 not what you want, use the \fB--no-attributes\fR option.
253 .SH SPLIT WIMS
254 You may use \fB@IMAGEX_PROGNAME@ apply\fR to apply images from a split WIM.  The
255 \fIWIMFILE\fR argument must specify the first part of the split WIM, while the
256 additional parts of the split WIM must be specified in one or more
257 \fB--ref\fR="\fIGLOB\fR" options.  Since globbing is built into the \fB--ref\fR
258 option, typically only one \fB--ref\fR option is necessary.  For example, the
259 names for the split WIM parts usually go something like:
260 .RS
261 .PP
262 .nf
263 mywim.swm
264 mywim2.swm
265 mywim3.swm
266 mywim4.swm
267 mywim5.swm
268 .RE
269 .fi
270 .PP
271 To apply the first image of this split WIM to the directory "dir", run:
272 .PP
273 .RS
274 @IMAGEX_PROGNAME@ apply mywim.swm 1 dir --ref="mywim*.swm"
275 .RE
276 .PP
277 As a special case, if you are applying an image from standard input from a split
278 WIM that is also pipable (as described in \fBPIPABLE WIMS\fR), the \fB--ref\fR
279 option is unneeded; instead you must ensure that all the split WIM parts are
280 concatenated together on standard input.  They can be provided in any order,
281 with the exception of the first part, which must be first.
282 .SH PIPABLE WIMS
283 As of wimlib 1.5.0, \fB@IMAGEX_PROGNAME@ apply\fR supports applying a WIM from a
284 nonseekable file, such as a pipe, provided that the WIM was captured with
285 \fB--pipable\fR (see \fB@IMAGEX_PROGNAME@ capture\fR(1)).  To use standard input
286 as the WIM, specify "-" as \fIWIMFILE\fR.  A useful use of this ability is to
287 apply an image from a WIM while streaming it from a server.  For example, to
288 apply the first image from a WIM file available on a HTTP server to an NTFS
289 volume on /dev/sda1, run something like:
290 .PP
291 .RS
292 wget -O - http://myserver/mywim.wim | wimapply - 1 /dev/sda1
293 .RE
294 .PP
295 (The above also used the \fBwimapply\fR abbreviation for \fB@IMAGEX_PROGNAME@
296 apply\fR.) Note: WIM files are \fInot\fR pipable by default; you have to
297 explicitly capture them with \fB--pipable\fR, and they are \fInot\fR compatible
298 with Microsoft's software.  See \fB@IMAGEX_PROGNAME@ capture\fR(1) for more
299 information.
300 .PP
301 It is possible to apply an image from a pipable WIM split into multiple parts;
302 see \fBSPLIT WIMS\fR.
303 .SH OPTIONS
304 .TP 6
305 \fB--check\fR
306 When reading \fIWIMFILE\fR, verify its integrity if the integrity table is
307 present.
308 .TP
309 \fB--ref\fR="\fIGLOB\fR"
310 File glob of additional WIMs or split WIM parts to reference resources from.
311 See \fBSPLIT_WIMS\fR.  This option can be specified multiple times.  Note:
312 \fIGLOB\fR is listed in quotes because it is interpreted by
313 \fB@IMAGEX_PROGNAME@\fR and may need to be quoted to protect against shell
314 expansion.
315 .TP
316 \fB--rpfix\fR, \fB--norpfix\fR
317 Set whether to fix targets of absolute symbolic links (reparse points in Windows
318 terminology) or not.  When enabled (\fB--rpfix\fR), extracted absolute symbolic
319 links that are marked in the WIM image as being fixed are assumed to have
320 absolute targets relative to the image root, and therefore \fB@IMAGEX_PROGNAME@
321 apply\fR prepends the absolute path to the extraction target directory to their
322 targets.  The intention is that you can apply an image containing absolute
323 symbolic links and still have them be valid after it has been applied to any
324 location.
325 .IP ""
326 The default behavior is \fB--rpfix\fR if any images in \fIWIMFILE\fR have been
327 captured with reparse-point fixups done.  Otherwise, it is \fB--norpfix\fR.
328 .IP ""
329 Reparse point fixups are never done in the NTFS volume extraction mode on
330 UNIX-like systems.
331 .TP
332 \fB--hardlink\fR
333 When extracting a file from the WIM that is identical to a file that has already
334 extracted, create a hard link rather than creating a separate file.  This option
335 causes all identical files to be hard-linked, overriding the hard link groups
336 that are specified in the WIM image(s).  In the case of extracting all images
337 from the WIM, files may be hard-linked even if they are in different WIM images.
338 .IP ""
339 However, hard-linked extraction mode does have some additional quirks.  Named
340 data streams will not be extracted, and files can be hard linked even if their
341 metadata is not fully consistent.
342 .TP
343 \fB--symlink\fR
344 This option is similar to \fB--hardlink\fR, except symbolic links are created
345 instead.
346 .TP
347 \fB--unix-data\fR
348 (UNIX-like systems only)  By default, in the directory extraction mode on UNIX,
349 \fB@IMAGEX_PROGNAME@ apply\fR will ignore both Windows-style security
350 descriptors and UNIX-specific file owners, groups, and modes set when using
351 \fB@IMAGEX_PROGNAME@ capture\fR with the \fB--unix-data\fR flag.  By passing
352 \fB--unix-data\fR to \fB@IMAGEX_PROGNAME@ apply\fR instead, this causes this
353 UNIX-specific data to be restored when available.  However, by default, if
354 \fB@IMAGEX_PROGNAME@\fR does not have permission to set the UNIX owner, group or
355 file mode on an extracted file, a warning will be printed and it will not be
356 considered an error condition; use \fB--strict-acls\fR to get stricter behavior.
357 .TP
358 \fB--no-acls\fR
359 Do not restore security descriptors on extracted files and directories.
360 .TP
361 \fB--strict-acls\fR
362 Fail immediately if the full security descriptor of any file or directory cannot
363 be set exactly as specified in the WIM file.  If this option is not specified,
364 when \fB@IMAGEX_PROGNAME@\fR on Windows does not have permission to set a
365 security descriptor on an extracted file, it falls back to setting it only
366 partially (e.g. with SACL omitted), and in the worst case omits it entirely.
367 However, this should only be a problem when running \fB@IMAGEX_PROGNAME@\fR
368 without Administrator rights.  Also, on UNIX-like systems, this flag can also be
369 combined with \fB--unix-data\fR to cause \fB@IMAGEX_PROGNAME@\fR to fail
370 immediately if the UNIX owner, group, or mode on an extracted file cannot be set
371 for any reason.
372 .TP
373 \fB--no-attributes\fR
374 Do not restore Windows file attributes such as readonly, hidden, etc.
375 .TP
376 \fB--include-invalid-names\fR
377 Extract files and directories with invalid names by replacing characters and
378 appending a suffix rather than ignoring them.  Exactly what is considered an
379 "invalid" name is platform-dependent.
380 .IP ""
381 On POSIX-compliant systems, filenames are case-sensitive and may contain any
382 byte except '\\0' and \'/', so on a POSIX-compliant system this option will only
383 have an effect in the unlikely case that the WIM image for some reason has a
384 filename containing one of these characters.
385 .IP ""
386 On Windows, filenames are case-insensitive, cannot include the characters '/',
387 \'\\0', '\\', ':', '*', '?', '"', '<', '>', or '|', and cannot end with a space
388 or period.  Ordinarily, files in WIM images should meet these conditions as
389 well. However, it is not guaranteed, and in particular a WIM image captured with
390 \fB@IMAGEX_PROGNAME@\fR on a POSIX-compliant system could contain such files.  By
391 default, invalid names will be ignored, and if there are multiple names
392 differing only in case, one will be chosen to extract arbitrarily; however, with
393 \fB--include-invalid-names\fR, all names will be sanitized and extracted in some
394 form.
395 .TP
396 \fB--wimboot\fR
397 Windows only: Instead of extracting the files themselves, extract "pointer
398 files" back to the WIM archive.  This can result in significant space savings.
399 However, it comes at several potential costs, such as not being able to delete
400 the WIM archive and possibly having slower access to files.  See Microsoft's
401 documentation for "WIMBoot" for more information.
402 .IP ""
403 If it exists, the [PrepopulateList] section of the file
404 \\Windows\\System32\\WimBootCompress.ini in the WIM image will be read.  Files
405 matching any of these patterns will be extracted normally, not as WIMBoot
406 "pointer files".  This is helpful for certain files that Windows needs to read
407 early in the boot process.
408 .IP ""
409 This option only works when the program is run as an Administrator and the
410 target volume is NTFS or another filesystem that supports reparse points.
411 .IP ""
412 In addition, this option works best when running on Windows 8.1 Update 1 or
413 later, since that is the first version of Windows that contains the Windows
414 Overlay File System Filter Driver ("WOF").  If the WOF driver is detected,
415 wimlib will create the WIMBoot "pointer files" using documented ioctls provided
416 by WOF.
417 .IP ""
418 Otherwise, if the WOF driver is not detected, wimlib will create the reparse
419 points and edit the file "\\System Volume Information\\WimOverlay.dat" on the
420 target volume manually.  This is potentially subject to problems, since although
421 the code works in certain tested cases, neither of these data formats is
422 actually documented by Microsoft.  Before overwriting this file, wimlib will
423 save the previous version in "\\System Volume
424 Information\\WimOverlay.wimlib_backup", which you potentially could restore if
425 you needed to.
426 .SH NOTES
427 \fIData integrity\fR:  WIM files include SHA1 message digests for file data.
428 \fB@IMAGEX_PROGNAME@ apply\fR calculates the SHA1 message digest of every file
429 it extracts and issues an error if it is not equal to the SHA1 message digest
430 provided in the WIM.  (This default behavior seems equivalent to the
431 \fB/verify\fR option of ImageX.)  Note that this is separate from the integrity
432 table of the WIM, which provides SHA1 message digests over raw chunks of the
433 entire WIM file and is checked separately if the \fB--check\fR option is
434 specified.
435 .PP
436 \fIESD files\fR: wimlib v1.6.0 and later can extract files from version 3584
437 WIMs, which usually contain LZMS-compressed solid blocks and may carry the
438 \fI.esd\fR file extension rather than \fI.wim\fR.  However, \fI.esd\fR files
439 downloaded directly by the Windows 8 web downloader have encrypted segments, and
440 wimlib cannot extract such files until they are first decrypted.
441 .PP
442 \fIDirectory traversal attacks\fR:  wimlib validates filenames before extracting
443 them and is not vulnerable to directory traversal attacks.  This is in contrast
444 to Microsoft WIMGAPI/Imagex/Dism which can overwrite arbitrary files on the
445 target drive when extracting a malicious WIM file containing files named
446 \fI..\fR or containing path separators.
447 .SH EXAMPLES
448 Extract the first image from the Windows PE image on the Windows Vista/7/8
449 installation media to the directory "boot":
450 .RS
451 .PP
452 @IMAGEX_PROGNAME@ apply /mnt/windows/sources/boot.wim 1 boot
453 .RE
454 .PP
455 Same as above, but using the \fBwimapply\fR abbreviation:
456 .RS
457 .PP
458 wimapply /media/windows/sources/boot.wim 1 boot
459 .RE
460 .PP
461 On Windows, apply an image of an entire volume, for example from "install.wim"
462 which can be found on the Windows Vista/7/8 installation media:
463 .RS
464 .PP
465 @IMAGEX_PROGNAME@ apply install.wim 1 E:\\
466 .RE
467 .PP
468 Same as above, but running on a UNIX-like system where the corresponding
469 partition is /dev/sda2:
470 .RS
471 .PP
472 @IMAGEX_PROGNAME@ apply install.wim 1 /dev/sda2
473 .RE
474 .PP
475 Note that before running either of the above commands, an NTFS filesystem may
476 need to be created on the partition, for example with format.exe on Windows or
477 \fBmkntfs\fR(8) (part of NTFS-3g) on UNIX-like systems.  For example, you might
478 run:
479 .RS
480 .PP
481 mkntfs /dev/sda2 && wimapply install.wim 1 /dev/sda2
482 .RE
483 .PP
484 (Of course don't do that if you don't want to destroy all existing data on the
485 partition!)
486 .PP
487 An example of applying a pipable WIM from a pipe can be found in \fBPIPABLE
488 WIMS\fR, and an example of applying a split WIM can be found in \fBSPLIT
489 WIMS\fR.
490 .SH SEE ALSO
491 .BR @IMAGEX_PROGNAME@ (1)
492 .BR @IMAGEX_PROGNAME@-capture (1)
493 .BR @IMAGEX_PROGNAME@-extract (1)
494 .BR @IMAGEX_PROGNAME@-info (1)