Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Unique PC names after a ghostcast.

Updated: 15 Aug 2010 | 16 comments
nicwic's picture
0 0 Votes
Login to vote

Hello,

I am looking into a new imaging and cloning system for a public library. And i have worked with Ghost before, so it was my first choice when it comes to cloning and updating the systems.

Here is the scenario:

The library has over 120 public computers. That monthly needs updating and maintenance. All the computer have a Unique name(they cant have a random generated name from a sysprep).
I made an image that i distribute via ghostcast. The target pc's are in groups of 3-20 machines. After the distribution is over. all the target pcs needs to automatically update themselves with their original PC name that they had before the cloning.

is this even possible?

Best Regards
Nicwic

 

Comments

EdT's picture
24
Sep
2009
0 Votes 0
Login to vote

BIOS solution

One possible solution depends on whether your machines have a BIOS which allows the machine to be "Asset Tagged".
Asset tagging allows you to write a unique machine identifier into the bios, which can be read using WMI.
Thus your build image would need something to run at first boot which reads the asset tag and renames the machine to the string that is set in the asset tag, before rebooting the system so that the change is implemented.

I know that Lenovo and HP machines allow bios asset tagging, and I expect other mainstream suppliers provide the same sort of functionality. HP is simple - it can be done directly from within the BIOS configuration entered during bootup. With Lenovo, it requires reflashing of the bios using WinPhlash with the asset tag on the Winphlash command line (for most of the current models). These steps only need to be done once unless the motherboard is changed.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

nicwic's picture
24
Sep
2009
0 Votes 0
Login to vote

They only use Lenovo systems.

They only use Lenovo systems. and i can see it has an asset tag there. So this might be a great solution.

Do you know of programs that can check the BIOS asset tag and automatically change that name?

EDIT: i know there is a program called WSname that can do this. But it seems like all links to it are dead.

EdT's picture
24
Sep
2009
0 Votes 0
Login to vote

Check Lenovo website

There are no generic programs that change BIOS asset tags as far as I know.
In the case of Lenovo, you need to grab the latest bios update from the Lenovo website - choose the EXE variant rather than the ISO.
Running the EXE then unpacks the bios files into a folder from where you can access the WinPhlash help file.

You can thereafter run Winphlash.exe interactively, and set the bios asset tag in there (you need to set the phlash.ini so that the advanced tab shown up), or you can do it from the command line:

winphlash.exe /S /MODE=1 /DPC:"ASSET-TAG" _01B8100.FL1

The filename ending in .FL1 is the bios update file - note that I have it starting with an underscore but the original had some other leading character that was not reproduced faithfully when writing the file to CDROM - hence the filename change.

Each Lenovo model will have a different file for the bios, and some models have more than one bios, depending for example on whether your model provides AMT support or not, so it is important to get the right file.

Finally, the code to access the asset tag uses WMI:

 Set colSMBIOS = objWMIService.ExecQuery ("Select SMBIOSAssetTag from Win32_SystemEnclosure")
 For Each objSMBIOS in colSMBIOS
    strAsset=objSMBIOS.SMBIOSAssetTag
    strAsset=Trim(strAsset) 'Get rid of any leading or trailing spaces caused by asset tagging finger trouble
  Next
wscript.echo strAsset

If you grab the "WMIExplorer" utility off the internet, you can use this to check any target machine for the values reported for different WMI calls.

One of my clients used Lenovo models extensively and adopted this exact methodology for naming their machines - the ComputerName was the asset tag, which was set and labelled physically on the machine when it first arrived through the door.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

nicwic's picture
24
Sep
2009
0 Votes 0
Login to vote

 thanks a lot for all the

 thanks a lot for all the help EdT..

But the first string in the vbs comes out with an error  "objWMIService.ExecQuery"

-nicwic


EdT's picture
24
Sep
2009
0 Votes 0
Login to vote

Missed out the initialization bit

strComputer = "."
Dim objWMIService
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery ("Select SMBIOSAssetTag from Win32_SystemEnclosure")
 For Each objSMBIOS in colSMBIOS
    strAsset=objSMBIOS.SMBIOSAssetTag
    strAsset=Trim(strAsset) 'Get rid of any leading or trailing spaces caused by asset tagging finger trouble
  Next
wscript.echo strAsset

Cut and pasted the code from my script, but forgot that the initialization stuff is at the top of my code. The above should now work, but will return a blank message box if the asset tag is not set.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

nicwic's picture
24
Sep
2009
0 Votes 0
Login to vote

 i think i misunderstood

 i think i misunderstood something a long the way.

the script works fine, and shows the asset tag name.

What i need is a program that can change the netbios name to the asset tag name. So when it boots up first time after a clone, it changes its name according to the asset tag in the bios

EdT's picture
24
Sep
2009
0 Votes 0
Login to vote

Do you mean computername?

The following script will update the computer name with the asset tag information:

'the variable strAssetID has the asset ID you want to apply as the new computername

strComputer = "."
Dim objWMIService
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  Set colComputers = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")

  For Each objComputer in colComputers
      RenameErr = ObjComputer.Rename(strAssetID)
  Next
  
  If RenameErr <> 0 Then
   
   wscript.quit
  
  End if
 

On the other hand, if this functionality is already available through the Ghostcase console then perhaps there is no need to reinvent the wheel.......

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

mikefletcher85's picture
24
Sep
2009
0 Votes 0
Login to vote

 Do you run the ghost cast

 Do you run the ghost cast from a designated computer? wouldn't it be easier to use the ghost counsel and create a task to ghost them?

I take care of 200+ public ps'c in the library for my university, and I have all the computers imported into the counsel and have the computers split up in to groups for 10-30 and after the clone is done, it will configure the computer name. The name is set on the counsel so that you dont need to touch each computer.

nicwic's picture
24
Sep
2009
0 Votes 0
Login to vote

I run the ghostcast and PXE

I run the ghostcast and PXE from a designated computer. 

I have looked into ghost counsel. Does it just have a list of all the computers and their mac or ? how does it keep track of all the computers.


mikefletcher85's picture
24
Sep
2009
0 Votes 0
Login to vote

You install a client onto the

You install a client onto the target computer, and it will attach itself to the counsel. I believe that the client can be configured to show or not show in the system tray. Ours is set to hidden. Below is a screenshot of what our counsel looks like. Its nice because it eliminates the need to boot the computer using a boot disk because it will do that during the task, you just click start on the counsel and let it finish.
ghostcounsel.JPG

nicwic's picture
25
Sep
2009
0 Votes 0
Login to vote

 This seems great..  Thanks a

 This seems great.. 

Thanks a lot might solve all my problems... only problem now is these damn drivers :D hopefully i can get that fixed.

nicwic's picture
28
Sep
2009
0 Votes 0
Login to vote

 I have my image working now

 I have my image working now automatically with the ghost console push.. works great.

But how do I set it so it automatically changes the computer name, to the name in the machine group, the Description name.

for instance:

I have 2 computers called. PC10043 and PC10044

I make an image of the PC10043.

Then push that image to PC10044. That PC will now be called PC10043. that needs to be automatically change to PC10044 which is the name in the console

thanks in advanced

nicwic

spohcog's picture
25
Sep
2009
0 Votes 0
Login to vote

Missing Drivers

nicwic-

This site (www.hardware-independent.com) is one option for for dealing with the driver issue.

Rgds.

mrguitar's picture
28
Sep
2009
1 Vote +1
Login to vote

Naming: Get your machines

Naming:

Get your machines setup w/ the correct names & have ghost client installed. Create a new task to "Refresh Configuration." This will capture thing the current machine settings for things like host name, static IP info (or dhcp), etc. This will give you your default configuration. Next time you image a PC, your task will have clone & configuration checked. At this point you can think of the Configuration box as "rename."

Don't run Refresh Config until you want to change some of the default configs. Piece of cake- enjoy.

legend17's picture
15
Feb
2010
1 Vote +1
Login to vote

Mr Guitar - you cannot

Mr Guitar - you cannot believe the endless hours you have saved me

Thanks for your marvelous input :)

Love Ghost again!!!

N0mad's picture
15
Feb
2010
0 Votes 0
Login to vote

I've never done this but

I've never done this but would love to make this work.  If I'm understaning this correctly..you would have to capture the settings for each computer, creating a kind of template for that computer.  How would this automatically rename the computers, or would you have to run the "Refresh Configuration" on each each computer manually?  I have over 400 compters in a school.  We image frequently and have to go around renaming each computer.  A real pain.  We're on a Novell network so sysprep isn't an option.