Jump to content

WDS and Windows 7 - Settings computername manually


Recommended Posts

I'm deploying Windows 7 enterprise thru WDS (running on Windows Server 2008 R2). Deployment is working fine except that I want to set the computername manually during install instead of prestaging the computer in AD or having a randomly generated computername. I was thinking of creating a script that asks for the computername sometime during install and then modifies the unattend xml file automatically. My setup is a school environment with computers being moved and re-installed (renamed) constantly.

So I added Microsoft-Windows-Deployment_neutral, RunSynchronous, RunSynchronousCommand, cmd.exe to the specialize section of the unattended xml file to test if I could edit c:\windows\panther\unattend.xml and set the computername before Microsoft-Windows-UnattendedJoin_neutral was executed. However the runsynchronous command is run just after the computer being joined to the domain - Pressing Shift-F10 and editing unattend.xml earlier in the specialize process works fine.

My second thought was to add Microsoft-Windows-Deployment_neutral, RunSynchronous, RunSynchronousCommand, cmd.exe to WindowsPE and edit x:\sources\wdsunattend\wdsimageunattend.xml. However I'm unable to run cmd.exe in the WinPE environment. Pressing Shift-F10 works but in this case wdsimageunattend.xml is not copied until just before the system reboots (so I'm unable to test if editing the file works).

Any suggestions on how to make this work?

Regards,

Mike

Link to comment
Share on other sites


Actually, if you leave the Computer Name node out of the Unattend file, it will prompt for Computer Name during OOBE.

Leaving out computername did the job. Unfortunately UnattendJoin runs in the specialize part of the setup before OOBE so the the computer is joined to the domain with a random WIN-yyyyyyy computername - But I can solve this by joining the computer to the domain using a powershell script later in the setup process. Thanks for your help.

Regards,

Mike

Link to comment
Share on other sites

I like your first idea, which is how MDT does it. And, considering, have you looked into using MDT for your deployment?

I'm considering looking into MDT (LTI). Thanks for your reply.

Regards,

Mike

Edited by mikeyd
Link to comment
Share on other sites

Hi folks, I just came onto the forum to ask a very similar question. I must say, I'm very surprised that this is how to set the hostname using WDS. I have my target client prestaged in ADS, I have a DHCP reservation for this client, and I have a static IP address in my DNS Server. Given all of these factors, I find it hard to believe that WDS must ystill prompt for the hostname (or create its own random name).

Perhaps I have overlooked something?

I have an old Windows 2003 RIS here, set up by someone else admittedly, and there the client hostname is presented on the first screen before continuing the installation.

Simply put, is there no way using WDS to dynamically name the client according to the information from ADS / DNS / DHCP?

Link to comment
Share on other sites

If you're using RIS, the installation screens can be customized (they're text files, basically) and bringing vars from RIS setup through to the finished image was fairly easy to do. However, WDS is NOT a full setup engine like RIS was, but runs WinPE images which do the heavy lifting - so unless you're launching your own WinPE that has it's own customizations (or use one created from another source that does this already (like an MDT or SCCM boot image), a boot image imported directly from installation media isn't going to prompt you for much other than user/pass, images, and drive to install to.

Link to comment
Share on other sites

Thanks for the response. So it seems from what you're saying that it's really not possible using WDS.

I guess I'll start to look into some sort of postinstall script that will do a nslookup and create a hostname changing script from that.

Cheers

Link to comment
Share on other sites

You can do it with FirstLogonCommands if you run a program to pull info from either the system or the server. For example, you could put the computer name in the BIOS into the Asset Tag or Serial Number field, or you could do something like this:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...