MySysprep 2
for Windows Vista / Windows Server 2008 / Windows 7 / Windows Server 2008 R2
Introduction
MySysprep is a tool to extend the functionality ofSYSPREP.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.
Sysprep for Unattended Deployment
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.xmlWhere c:\sysprep.xml is your answer file, which can be any directory in your local drive.
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
Auto Computer Name
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 user input.Most of users would use the following configuration to let Windows generate a random computer name, and rename it after setup is completed.
With MySysprep, you can use the four variables %Manufacturer%, %Model%, %SerialNo%, and %AssetTag% to compose a computer name. For example,*
You can also take substring from any variable by appending (StartIndex, Length)before the closing percentage. The character index is zero-based. For example,%SerialNo%-%AssetTag%
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,%SerialNo(0,4)%-%AssetTag(2,4)%
If you use a variable that is not pre-defined, it will pop up a dialog asking for user input during setup. For example,%SerialNo(-1,4)%-%AssetTag(-2,4)%
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.%Please input a computer name%
To find out the manufacturer, model, serial number, and asset tag of a computer, you can use the following command.
MySysprep /smbios
Prompt for User Input
In fact, any configuration value in an unattended XML can be configured to prompt for user input. For example,During setup, it will pop up a dialog asking users for Domain, Username, Password, and JoinDomain. You can even let it show a list of options in a combo box. For example,http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> %Please input user domain% %Please input user name% %Please input user password% %Please input a domain to join%
The options are enclosed by curly brackets and each one is separated by semicolons. In this example, the combo box will show three options: Corp, Lab1, and Lab2 for a multi-domain environment. Users can select a domain to join instead of typing the domain name.%Please select a domain to join{Corp;Lab1;Lab2}%
To have an input box with a default value, use only one option inside curly brackets. For example, if you want the asset tag as the default computer name, but you want to have the chance to override it during setup. You can have the following configuration.
<ComputerName>%Please input a computer name{%AssetTag%}%ComputerName>During setup, you can click OK to accept the default computer name or update it.
You can take a substring of a variable or compose a string inside curly brackets. For example,
<ComputerName>%Please input a computer name{CORP%SerialNo(0,4)%-%AssetTag(0,4)%}%ComputerName>
Image Debugging
During setup if your image failed at specialize pass, 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 difference between this command prompt and the one opened by using Shift+F10 is that this command prompt will block setup going to the next stage. You have the chance to debug during the blockage. Then you have to exit the command prompt to continue setup.
Download
Version 2.0.0.4 for x86.Version 2.0.0.4 for x64
Support
If you are interested in a customized version of MySysprep, please contact mysysprep@tsaysoft.comSome requested customizations:
- Logo removal
- Customized logo
- Auto computer name from a text file in a non-system drive.
- Auto computer name looked up from a mapping table
- User input validation
- Customization of user input dialogs
- Script friendly to generate/modify unattended XML files
0 comments:
Post a Comment