OnWorks favicon

mkwinpeimg - Online in the Cloud

Run mkwinpeimg in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command mkwinpeimg that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



mkwinpeimg - Make a customized bootable image of Windows PE


mkwinpeimg [OPTIONS] IMAGE


mkwinpeimg is able to make a bootable image of Windows PE by taking files from a mounted
Windows installation ISO image (Vista or later) or the mounted ISO image for the Windows
Automated Installation Kit (WAIK) or the WAIK supplement. The --windows-dir and --waik-
dir options are used to specify the locations of these mounted ISOs. You only need one or
the other. The files that mkwinpeimg will retrieve are boot.wim, bootmgr, boot.sdi, and
bcd. If making an ISO image, the file etfsboot.com is also retrieved. Microsoft owns the
rights to these files and they are not distributed with wimlib.

mkwinpeimg can make two types of bootable images. The default is to make a bootable disk
image. The image is not partitioned and is formatted into a FAT filesystem. syslinux(1)
is required to make this type of image, as it is used to chainload bootmgr. Also,
mtools(1) is required so that the FAT filesystem can be created without root privileges.

The other type of bootable image that mkwinpeimg can make is a bootable ISO image. To
make this type of image, give the --iso option. mkisofs(1) is required to make this type
of image. In --iso mode, you can specify IMAGE as "-" to write the ISO image to standard

If you make a disk image, you could put it on a USB drive, and if you make an ISO image,
you could put it on a CD. In addition, both types of images can be loaded by the SYSLINUX
or PXELINUX bootloaders using the MEMDISK module.

Windows PE itself is contained in the boot.wim file. mkwinpeimg can modify this file
before embedding it in a bootable image. The most useful modification is to specify an
executable or batch file for Windows PE to execute as soon as it starts up. Use the
--start-script FILE option to specify such a file. You may also add arbitrary files to
boot.wim by putting them in a directory, then specifying the --overlay DIR option.
However, for more extensive modifications, consider modifying the boot.wim file separately
using wimlib-imagex mountrw or wimlib-imagex update, then providing it to mkwinpeimg using
the --wim option.

mkwinpeimg can also make only a modified boot.wim, rather than a bootable ISO or disk
image, if the --only-wim option is given.


-i, --iso
Make an ISO image instead of a disk image.

-o, --only-wim
Make neither a disk image nor an ISO image; instead, only make a modified boot.wim

-W, --windows-dir=DIR
Use DIR as the location of the mounted Windows installation ISO image. If neither
--windows-dir nor --waik-dir is specified, then the script looks for the mounted ISO
in the following default locations: /mnt/windows, /mnt/windows7, /mnt/windows8, and

-A, --waik-dir=DIR
Get the boot files and boot.wim from the ISO of the Windows Automated Installation
Kit mounted on DIR instead of from a Windows installation ISO. This also works if
the mounted ISO is for the WAIK supplement rather than the WAIK itself.

-s, --start-script=FILE
Add FILE to the root directory of Windows PE image and adjust
\Windows\System32\winpeshl.ini to execute FILE when Windows PE starts up.

-w, --wim=WIM
Use WIM as the "boot.wim" file. This defaults to the appropriate WIM file from the
Windows ISO, WAIK, or WAIK supplement.

-O, --overlay=DIR
Adds all the files in DIR to the Windows PE image.

-t, --tmp-dir=DIR
Use DIR for temporary files. Defaults to a directory made using "mktemp -d".

-a, --arch=ARCH
Use the Windows PE version from the Windows Automated Installation Kit (or the WAIK
supplement) that has the CPU architecture ARCH. Only valid with --waik-dir.
Possible values: "x86" or "amd64". Default is "x86". Note: the WAIK also contains
a Windows PE image for the ia64 (Itanium) architecture; however, this is not
supported by this script.

-h, --help
Display help.

-v, --version
Show version information.


Create a bootable disk image of Windows PE from the Windows (Vista or later) installation
media mounted on /media/windows:

mkwinpeimg --windows-dir=/media/windows winpe.img

Create a bootable ISO of Windows PE from the WAIK (or WAIK supplement) mounted on
/media/waik, and add all the files in "winpe_overlay" to Windows PE's filesystem:

mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso

Create a bootable image of Windows PE from the Windows installation media mounted on
/media/windows, add and make it execute "install.cmd" when it starts up. In this example
the image is created in the root directory of the TFTP server for network booting.

mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows


Microsoft's licenses may limit the things that Windows PE can be used for, and they may
limit your rights to redistribute customized versions of Windows PE.


Report bugs to [email protected].

Use mkwinpeimg online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    QNAP NAS GPL Source
    QNAP NAS GPL Source
    GPL source for QNAP Turbo NAS.
    Audience: Developers. User interface:
    Web-based. Programming Language: C,
    Java. Categories:System, Storage,
    Operating System Ker...
    Download QNAP NAS GPL Source
  • 2
    Vuls is open-source, agent-less
    vulnerability scanner based on
    information from NVD, OVAL, etc. Vuls
    uses multiple vulnerability databases
    Download Vuls
  • 3
    A Kotlin script that nukes all build
    caches from Gradle/Android projects.
    Useful when Gradle or the IDE let you
    down. The script has been tested on
    macOS, but ...
    Download deep-clean
  • 4
    Eclipse Checkstyle Plug-in
    Eclipse Checkstyle Plug-in
    The Eclipse Checkstyle plug-in
    integrates the Checkstyle Java code
    auditor into the Eclipse IDE. The
    plug-in provides real-time feedback to
    the user about viol...
    Download Eclipse Checkstyle Plug-in
  • 5
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    Download AstrOrzPlayer
  • 6
    Kodi Movistar+ TV es un ADDON para XBMC/
    Kodi que permite disponer de un
    decodificador de los servicios IPTV de
    Movistar integrado en uno de los
    mediacenters ma...
    Download movistartv
  • 7
    Code::Blocks is a free, open-source,
    cross-platform C, C++ and Fortran IDE
    built to meet the most demanding needs
    of its users. It is designed to be very
    Download Code::Blocks
  • More »

Linux commands