Windows Server - Technology

The Blog for IT solutions from Microsoft. By Richard Wu

Use USB to deploy WIM

A student asked whether we can use a USB stick to deploy a WIM image to client PC, without the use of WDS.
After some searching, I found the following method:

1) We should create bootable Windows PE on USB disk
2) Use sysprep tool to prepare install.wim and copy it to USB disk
3) Customize a script used in a Windows PE Image to realize the automatic deployment.

I assume you have successfully completed the step 1 and 2. I will mainly focus on step 3.

Windows PE provides three methods for launching custom scripts: Winpeshl.ini, Startnet.cmd, and Unattend.xml. We can create our own version of Startnet.cmd, Startnet.cmd or Unattend.xml to run a specific set of commands, batch files, or scripts.

1. Winpeshl.ini method

Add a Customized Script with Winpeshl.ini. We can launch a customized shell application by using a file called Winpeshl.ini. Winpeshl.exe will process the settings in Winpeshl.ini during boot.

About how to create Winpeshl.ini file, please refer to the chapter "Include a Custom Script in a Windows PE Image WAIK" in WAIK help document.

2. Startnet.cmd method

Add a Customized Script with Startnet.cmd. We can add customized command-line scripts in Windows PE by using Startnet.cmd. By default, Windows PE includes a Startnet.cmd script located at %SYSTEMROOT%\System32 of your customized Windows PE image.

About how to create Startnet.cmd file, please also refer to the chapter "Include a Custom Script in a Windows PE Image WAIK" in WAIK help document.

3. Unattend.xml

When Windows PE starts, it implicitly looks for a file called Unattend.xml at the root of any bootable device (for example, a USB flash drive or a floppy disk). You can also specify an Unattend.xml file by using Startnet.cmd and Wpeinit.exe.

To learn more about creating an answer file, please see the Building an Answer File chapter in WAIK help document.

Moreover, no matter what method we choose, this script should at least include the following functions:

1) Enumerate all the install images stored on the USB disk
2) Format the local disk
3) Apply the install image from USB disk to local disk as ImageX tool provided

Leave a Comment

(required) 

(required) 

(optional)
 

(required) 

If you can't read this number refresh your screen
Enter the numbers above: