- Home ›
- Articles ›
- Force Sysprep to Prompt for a Computer Name During Mini-Setup in Windows XP
Force Sysprep to Prompt for a Computer Name During Mini-Setup in Windows XP
Although sysprep is a great tool, it does lack certain options, particularly when you want to customise certain scenarios. One of the largest gripes you may have is that setupmgr.exe does not give you an option to prompt for a computer name. This step by step tutorial will demonstrate how to get sysprep prompting you for a computer name and also demonstrate how to prepare your image ready for deployment with hard disk imaging software, such as Ghost or the Microsoft WIM format.
If you’ve ever worked with sysprep before Business Desktop Deployment (BDD) came into the picture, you may have come up against a bit of a dilemma; sysprep only gives you two choices, either enter an explicit name or it will generate a random name upon the reseal operation. Obviously this causes some problems, particularly if you want to join the computers to the domain but don’t want random names polluting your Active Directory.
Wouldn’t it be nice to be prompted for a computer name during the first reboot after the image has been deployed? The following steps outline the process you need to follow in order to get Sysprep to prompt you for a computer name:
- Create your desired Windows XP installation - this requires you to install a windows computer complete with drivers and any end user applications such as Office, Adobe Acrobat reader etc. You get the idea.
- Copy across the deployment tools - once you’re happy with the running Windows XP system it’s now time to immortalise all your hard work. We do this with the sysprep utility. Create a folder called Sysprep in the root of your c:\ and copy the contents of Deploy.cab into the c:\Sysprep folder. Deploy.cab is located in \Support\Tools on your Windows XP CD. If you double click on Deploy.cab you will see a number of files in there. Drag them or copy them to the c:\Sysprep folder you just created. Your sysprep folder should look like this:

- Browse to c:\Sysprep and run Setupmgr.exe - SetupMgr.exe is a wizard style application that helps you create the Sysprep.inf file which is used by the sysprep process.
- On the Welcome to Setup Manager dialog, click Next

- On the New of Existing Answer File, select Create new and click Next

- On the Type of Setup dialog, select Sysprep setup and click Next

- On the Product dialog, select your operating system (in our case Windows XP Professional) and click Next

- On the License Agreement dialog, select Yes, fully automate the installation and click Next

- On the Name and Organization dialog, enter your details and click Next

- On the Display Settings dialog select your preferences and click Next

- On the Time Zone dialog, select your time zone and click Next

- On the Product Key dialog, enter in your Operating System key and click Next. Ensure that you use a Volume License key to avoid issues with activation.

- On the Computer Name dialog, select Automatically generate computer name. I know this isn’t what we want to do but bare with me for now and select Automatically...

- On the Administrator Password dialog, select Use the following Administrator password, enter in the desired password, tick When a destination computer starts, automatically log on as Administrator and click Next

- On the Networking Components dialog, click Next

- On the Workgroup or Domain dialog, select Workgroup and click Next

- On the Telephony dialog, click Next

- On the Regional Settings either select the regional settings you require or go with the defaults you already chose during the Windows installation then click Next

- On the Language dialog, select any additional languages you require and click Next

- On the Install Printers dialog click Next

- On the Run Once dialog, click Next (unless you have some specific scripts or commands to run)

- On the Additional Commands dialog, click Next

- On the Identification String dialog click Next

- Setup Manager now prompts you to save the sysprep.inf file. Accept the default location and click OK

- On the Completing Setup Manager dialog, click Cancel

- You have now created your very own sysprep.inf file which can be used to automate computer builds. We are almost ready to run the sysprep tool, however there is one last thing we need to do. We need to edit the generate sysprep file so that the next time the computer restarts it prompts us for a computer name. Start Notepad and open the sysprep.inf file. It should look something like this:
;SetupMgrTag
[Unattended]
OemSkipEula=Yes
InstallFilesPath=C:\sysprep\i386
[GuiUnattended]
AdminPassword=YourLocalAdminPassword
EncryptedAdminPassword=No
OEMSkipRegional=1
TimeZone=140
OemSkipWelcome=1
[UserData]
ProductKey=KKKKK-KKKKK-KKKKK-KKKKK-KKKKK
FullName="GOB"
OrgName="Your Organization"
ComputerName=*
[Display]
Xresolution=1024
YResolution=768
[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist
[Identification]
JoinWorkgroup=WORKGROUP
[Networking]
InstallDefaultComponents=Yes
- On the line where it says ComputerName=* delete the *. The star tells sysprep to generate a random name. The absence of the * character will cause the process to prompt you for a name before moving onto the next stage. Save the file.
- We now need to run the sysprep tool. Run c:\Sysprep\sysprep.exe. When you run the tool you are alerted by a warning box. Click OK.

- On the System Preparation Tool dialog, tick Use Mini-Setup, select Shut down from the drop down list and click Reseal.

- On the warning dialog, click OK

- Sysprep will now get rid of any machine specific identifiers and shutdown the computer.
- The hard disk is now ready to be imaged. You can at this stage use tools such as Ghost or boot using your WinPE CD and capture the image to a WIM file.
- Deploy your image to a computer and restart it.
- If you start the new computer using the newly deployed image, sysprep will now setup Windows according to the settings in sysprep.inf.

- It will then see that there isn’t a computer name in the sysprep.inf file and will prompt you to enter one. Enter the desired name and click Next

The computer will now go through its final setup routines, restart and log you in as the local administrator. At this point you can join the workstation to the domain or not.
So in the end it all came down to a single * in the sysprep.inf. What a powerful little character :)
[Permalink] - Updated: Sunday, February 21, 2010
 
Articles of Interest