Jump to content

Change computername


Recommended Posts

Hi,

In WSIM i have made a unattend.xml file which i put on my fresh installed Win7 computer. After that i ran sysprep and made an image with Ghost. Another computer is succesfully re-imaged and joined to the domain without any user interference. So far so good.

The problem is that during re-imaging the computername needs to be set to the following format: "WP-COMPUTERSERIALNUMBER"

I wanted to use the same method we use with XP (adjust the sysprep.inf/unattend.xml just before running the mini setup) but that does not work in Win7.

Any ideas how this can be accomplished (preferably without MDT2010)?

JaapB

Link to comment
Share on other sites


For this, I would put the serial number in the DMI under the Serial Number or Asset Tag field. Then run first logon commands to rename the computer via WMI. If your motherboard doesn't have a DMI this could be a problem, also I do not know how to get it to join the domain after the rename. You might have to prequalify the systems in AD.

Link to comment
Share on other sites

you can cahange the name in the answer file in win7 before the machine completes the first boot and still have it join the domain with the changed name. not sure the exact timing, I change it before first boot after dropping the image to the machine.

Link to comment
Share on other sites

For this, I would put the serial number in the DMI under the Serial Number or Asset Tag field. Then run first logon commands to rename the computer via WMI. If your motherboard doesn't have a DMI this could be a problem, also I do not know how to get it to join the domain after the rename. You might have to prequalify the systems in AD.

Thanks for your reply. Changing the computername and joining the domain for a single computers is no problem. I already accomplished this by running sysprep with a unattend.xml file created by WSIM.

The problem is that the image will be used to deploy around 250 computers. I need a solution which retrieves the serialnumber during re-imaging and changes the computername to "WP-retrieved SERIALNUMBER".

Link to comment
Share on other sites

Here is a thread where a user made a WMI script that names a computer based on system information.

Retrieving the serialnumber through a script (vbscript, powershell or bat) is not the problem. In XP I would prepare a reference computer put the script/programs to retreive the serialnumber in place and run sysprep. When sysprep completes i start regedit to change the value from key \hklm\system\setup\cmdline from setup to mybatfile.bat. This bat file retrieves the serialnumber, adjust sysprep.inf and starts the mini-setup when a computer is re-imaged. At this moment i make a ghost image which will be used on other computers.

The above process worked well in XP, but in Windows 7 its not working. Microsoft changed how sysprep works in Window 7 or even before.

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...