Wpeutil Command-Line Options
The Windows PE utility (Wpeutil) is a command-line tool, included in Windows PE, that enables you to run commands during a Windows PE session. For example, you can shut down or restart Windows PE, enable or disable a firewall, set language settings, and initialize a network.
Wpeutil syntax
Wpeutil {command} [argument]
For example:
Wpeutil Shutdown
Wpeutil Enablefirewall
Wpeutil SetMuiLanguage de-DE
Important
Wpeutil can only accept one command per line.
CreatePageFile
Creates a page file to a specified path and size. The default path is C:\pagefile.sys and default size is 64 megabytes. At least one option must be specified.
Important
If a page file exists, the CreatePageFile option must be set equal to or greater than the current size of the page file or the command will fail.
CreatePageFile syntax
CreatePageFile [/path=<path>] [/size=<size>]
CreatePageFile usage
Wpeutil CreatePageFile /path=C:\pagefile.sys /size=128
Wpeutil CreatePageFile /path=C:\pagefile.sys
DisableExtendedCharactersForVolume
Disables extended character support for DOS-compatible file names (8.3 format) for the volume that contains path on target volume. This command only applies to NTFS volumes. The path on target volume must specify the root of the volume.
If disabled, all files that have been created with extended characters will be converted to a short file name.
DisableExtendedCharactersForVolume syntax
DisableExtendedCharactersForVolume <path_on_target_volume>
DisableExtendedCharactersForVolume usage
Wpeutil DisableExtendedCharactersForVolume C:\
DisableFirewall
Disables a firewall.
DisableFirewall usage
Wpeutil DisableFirewall
EnableExtendedCharactersForVolume
Allows 8.3 format file names to contain extended characters on the volume that contains path on target volume. This command only applies to NTFS volumes. The path on target volume must specify the root of the volume.
Note
If you're installing an operating system in a language that has extended characters that are enabled by default, such as ja-JP or ko-KR, or using a copy of Windows PE in a language that doesn't have extended characters enabled, such as en-US, the installation will cause a Chkdsk error during first boot. Enabling this option before you install to that volume will prevent Chkdsk command from running.
EnableExtendedCharactersForVolume syntax
EnableExtendedCharactersForVolume <path_on_target_volume>
EnableExtendedCharactersForVolume usage
Wpeutil EnableExtendedCharactersForVolume C:\
EnableFirewall
Enables a firewall.
EnableFirewall usage
Wpeutil EnableFirewall
InitializeNetwork
Initializes network components and drivers, and sets the computer name to a randomly-chosen value. The /NoWait
option will skip the time where your PC would otherwise wait to acquire an IP address. If you don't use /NoWait
, Windows PE will wait to acquire an address before it finishes loading your WinPE session. /NoWait
is helpful for environments that don't use DHCP.
InitializeNetwork syntax
InitializeNetwork [/NoWait]
InitializeNetwork usage
Wpeutil InitializeNetwork
wpeutil InitializeNetwork /NoWait
ListKeyboardLayouts
Lists the supported keyboard layouts (Name and ID) for a given Locale ID (LCID) value. The keyboard layouts will also be updated in the registry under the key: HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE\KeyboardLayouts
.
For a list of valid Locale IDs, see Microsoft Locale ID Values.
ListKeyboardLayouts syntax
ListKeyboardLayouts <LCID>
ListKeyboardLayouts usage
Wpeutil ListKeyboardLayouts 0x0409
Wpeutil ListKeyboardLayouts 1033
Reboot
Restarts the current Windows PE session.
Reboot usage
Wpeutil Reboot
SaveProfile
Stops logging and saves the custom profile to the location the user specified earlier with the Dism /enable-profiling command. For more information about the /enable-profiling command-line option, see DISM Windows PE Servicing Command-Line Options.
SaveProfile syntax
Wpeutil SaveProfile <profile_file_name> "<description>"
SaveProfile usage
Wpeutil SaveProfile profile_file_name "short description"
SetKeyboardLayout
Sets the keyboard layout in the current Windows PE session. This will take effect for processes after the command succeeds.
SetKeyboardLayout syntax
SetKeyboardLayout <keyboard_layout_ID>
SetKeyboardLayout usage
Obtain a list of supported keyboard layouts:
ListKeyboardLayouts LCID
To set the keyboard for en-US:
Wpeutil SetKeyboardLayout 0409:00000409
SetMuiLanguage
Sets the language. <language-name>
uses the international language code format (for example, en-US for the U.S. English language). You can specify multiple languages in priority order, by separating them with a semicolon.
SetMuiLanguage syntax
SetMuiLanguage <language-name>[;<language-name>]
SetMuiLanguage usage
Wpeutil SetMuiLanguage de-DE;en-US
SetUserLocale
Sets the user locale. <language-name>
uses the international language code format (for example, en-US for the U.S. English language). You can specify multiple languages in priority order, by separating them with a semicolon.
SetUserLocale syntax
SetUserLocale <language-name>[;<language-name>]
SetUserLocale usage
Wpeutil SetUserLocale de-DE;en-US
Shutdown
Shuts down the current Windows PE session.
You can also do the following in the Command Prompt window:
- Click the Close button
- Type
EXIT
and press enter
Shutdown usage
Wpeutil Shutdown
UpdateBootInfo
Populates the registry with information about how Windows PE boots.
After you run this command, query the registry using wpeutil UpdateBootInfo reg query HKLM\System\CurrentControlSet\Control /v PEBootType
The results of this operation might change after loading additional driver support.
To determine where Windows PE is booted from, examine the following:
- PEBootType: Error, Flat, Remote, Ramdisk:SourceIdentified Ramdisk:SourceUnidentified, Ramdisk:OpticalDrive
- PEBootTypeErrorCode: HRESULT code
- PEBootServerName: Windows Deployment Services server name
- PEBootServerAddr: Windows Deployment Services server IP address
- PEBootRamdiskSourceDrive: Source drive letter, if available.
- PEFirmwareType: Firmware boot mode: 0x1 for BIOS, 0x2 for UEFI.
If you aren't booting Windows Deployment Services, the best way to determine where Windows PE booted from is to first check for PEBootRamdiskSourceDrive registry key. If it's not present, scan the drives of the correct PEBootType and look for some kind of tag file that identifies the boot drive.
UpdateBootInfo usage
Wpeutil UpdateBootInfo
WaitForNetwork
Waits for the network card to be initialized. Use this command when creating scripts to make sure that the network card has been fully initialized before continuing.
WaitForNetwork usage
Wpeutil WaitForNetwork
WaitForRemovableStorage
During the Windows PE startup sequence, this command will block startup until the removable storage devices, such as USB hard drives, are initialized.
WaitForRemovableStorage usage
Wpeutil WaitForRemovableStorage