Wpeutil Command-Line Options

Applies To: Windows 7

Note

This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.

The Windows® PE utility (Wpeutil) is a command-line tool that enables you to run various commands in 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.

Note

Wpeutil can only accept one command per line.

Wpeutil Command-Line Options

Wpeutil uses the following conventions.

wpeutil {command}[argument]

For example,

wpeutil shutdown
wpeutil enablefirewall
wpeutil SetMuiLanguage de-DE
Command Description

CreatePageFile [/path=<path>] [/size=<size>]

Creates a page file to a specified path and size. Default path is C:\pagefile.sys and size is 64 megabytes. At least one option must be specified. For example, wpeutil CreatePageFile /path=C:\pagefile.sys.

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.

DisableExtendedCharactersForVolume <path on target volume>

Disables extended character support for DOS-compatible file names (8.3 format) for the volume containing <path on target volume>. <path on target volume> must specify the root of the volume, for example C:\. If disabled, all files that have been created with extended characters will be converted to a short filename. This command only applies to NTFS volumes.

DisableFirewall

Disables a firewall. This command does not require any arguments.

EnableExtendedCharactersForVolume <path on target volume>

Allows 8.3 format file names to contain extended characters on the volume containing <path on target volume>. <path on target volume> must specify the root of the volume, for example C:\. This command only applies to NTFS volumes.

Note

If you are 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 does not have extended characters enabled, such as en-US, the installation will result in a Chkdsk error during first boot. Enabling this option before installing to that volume will prevent Chkdsk command from running.

EnableFirewall

Enables a firewall. This command does not require any arguments.

InitializeNetwork

Initializes network components and drivers, and sets the computer name to a randomly-chosen value.

ListKeyboardLayouts<LCID>

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: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE\KeyboardLayouts. For a list of valid Locale IDs, see List of Locale ID (LCID) Values. For example,

wpeutil ListKeyboardLayouts 0x0409

-or-

wpeutil ListKeyboardLayouts 1033

Reboot

Restarts the current Windows PE session.

Note

You can restart the current Windows PE session by running the following wpeutil.exe commands:

  • wpeutil shutdown

  • 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 on the /enable-profiling command-line option, please see, Windows PE Servicing Command-Line Options. For example,

wpeutil Saveprofile < profile_file_name > "short description"

SetKeyboardLayout<keyboard layout ID>

Sets the keyboard layout in the current Windows PE session. This will take effect for processes after the command succeeds. To obtain a list of supported keyboard layouts, run ListKeyboardLayouts <LCID>. To set the keyboard for en-US, use

wpeutil SetKeyboardLayout 0409:00000409

SetMuiLanguage<language-name>[;<language-name>]

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. For example,

wpeutil SetMuiLanguage de-DE;en-US

SetUserLocale<language-name>[;<language-name>]

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. For example,

wpeutil SetUserLocale de-DE;en-US

Shutdown

Shuts down the current Windows PE session.

Note

You can also do the following in the Shell command window:

  • Click the Close button

  • Type EXIT

UpdateBootInfo

Updates information about the method used to boot Windows PE. Information is stored in the registry in the key HKLM\SYSTEM\CurrentControlSet\Control. The results of this operation might change after loading additional driver support.

Note

WpeUtil UpdateBootInfo populates the registry with information on how Windows PE boots. 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 WDS server name

  • PEBootServerName WDS server name

  • PEBootServerAddr WDS server IP

  • addressPEBootRamdiskSourceDrive Source drive letter, if available


If you are not booting Windows Deployment Services, the best way to determine where Windows PE booted from is to first check for PEBootRamdiskSourceDrive registry key. If it is not present, scan the drives of the correct PEBootType and look for some kind of tag file that identifies the boot drive.

WaitForRemovableStorage

During the Windows PE startup sequence, this command will block startup until the removable storage devices, such as USB hard drives, are initialized.

Note

This spelling of WaitForRemovableStorage is correct.

See Also

Concepts

Command-Line Tools Technical Reference