MySysprep is a tool to extend the functionality of SYSPREP.EXE, that is provided in Windows Operating System for creating a standard image to be deployed in an organization. MySysprep for Windows XP has been used in many organizations all over the world to simplify image preparation and deployment. MySysprep 2 is designed for Windows Vista and Windows Server 2008.
In Windows Vista, an unattended answer file is stored as an XML file. You have to use the command argument /unattend: to specify your answer file.
The common used command for Sysprep is
Sysprep /generalize /oobe /shutdown /unattend:c:\sysprep.xml
Where c:\sysprep.xml is your answer file.
To use MySysprep, you simply put MYSYSPREP.EXE in the same directory as SYSPREP.EXE in C:\Windows\System32\Sysprep, and use MYSYSPREP.EXE instead of SYSPREP.EXE. For example
MySysprep /generalize /oobe /shutdown /unattend:c:\sysprep.xml
Computer name is configured in Microsoft-Windows-Shell-Setup component during specialize pass. Sysprep only allows users to use a fix or a random name. With MySysprep, you can compose a computer name by using manufacturer, model, serial number and asset tag from SMBIOS, or even prompt a dialog for input.
Most of users would use the following configuration to let Windows generate a random computer name, and rename it after setup is completed.
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>*</ComputerName>
</component>
</settings>
With MySysprep, you can use the four variables %Manufacturer%, %Model%, %SerialNo%, and %AssetTag% to compose a computer name. For example,
<ComputerName>%SerialNo%-%AssetTag%</ComputerName>
You can also take substring from any variable by appending (StartIndex, Length)before the closing percentage. The character index is zero-based. For example,
<ComputerName>%SerialNo(0,4)%-%AssetTag(2,4)%</ComputerName>
You can also take substring from the end of any variable by giving a negative value as StartIndex. The last character is -1, and the one before the last character is -2 and so on. For example,
<ComputerName>%SerialNo(-1,4)%-%AssetTag(-2,4)%</ComputerName>
If you use a variable that is not pre-defined, it will pop up a dialog asking for user input during setup. For example,
<ComputerName>%Please input a computer name%</ComputerName>
However, because of the limitation of NetBIOS, if the computer name you compose is longer than 15 characters, you will get an error during specialize pass and the deployment will fail.
To find out the manufacturer, model, serial number, and asset tag of a computer, you can use the following command.
MySysprep /smbios
In fact, starting with version 2.0.0.2, any configuration value in an unattended XML can be configured to prompt for user input by using MySysprep. For example,
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identification>
<Credentials>
<Domain>%Please input user domain%</Domain>
<Username>%Please input user name%</Username>
<Password>%Please input user password%</Password>
</Credentials>
<JoinDomain>%Please input a domain to join%</JoinDomain>
</Identification>
</component>
During setup if your image failed at specialization, it is difficult to retrieve logs and check system state to find out what's wrong. With MySysprep, you can open a command prompt during setup, and run notepad, regedit, or other applications that don't require Windows shell to debug image problems.
To open a command prompt during setup, simply press Ctrl+Shift and then double-click on the MySysprep logo. The command prompt will block setup going to the next stage, you have to exit it to continue setup.
Version 2.0.0.2 for x86.
Version 2.0 for x64 (coming soon)
If you are interested in a customized version of MySysprep, please contact mysysprep@tsaysoft.com
Some requested customizations: