I suppose that is possible. Maybe Ghost allows you to specify "rules" for naming as you say.

I suppose that is possible. Maybe Ghost allows you to specify "rules" for naming as you say.
You can run a logon script to change the comp name, all you have to do is change the script so that it puts a random jumble of say 5 numbers and letters at the end, but this takes away naming conventions that you may wish to have in place.
This script will re-name the pc to "computer1" then force a reboot of the computer.
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
strComputer = "."
strNewComputername = "computer1"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objComputerSystem in colItems
objComputerSystem.Rename(strNewComputername)
Next
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objOperatingSystem in colItems
objOperatingSystem.reboot()
Next
Sorry, I was busy today. The 5000 do have unique names. All equipment is allotted an asset number, which formed the PC name. Recently that changed to service tag for the PC's, but still, the current name must stay, so Steve's original idea was good - take the current name and name the PC that.
Sorry not to have added that earlier
(we currently run Netware (client 4.91 sp5))
If they are Dell systems, you can pull the Service Tag out of Win32_BaseBoard namespace (I think, I can pull the STag for my laptop out of it...)
Likewise, if you didn't mind visiting all the PC's, you can leave the computername part out of sysprep.inf and it will ask you to enter the name of the PC before carrying on it's way.
Yeah I need to use the existing name and no interaction.
OK; it's taken a bit of time but I've finally come up with a script which I think will work. I've written a blog posting to describe it - let me know if you think it will be of any use!
mark (14th January 2009)
Great work Steve, I'd like to try this script out tomorrow however when I tried to download the zip file it appears to be corrupt. If you could please check it out that would be great.

not had time to read this properly, but i have a startup script that will do this doesn't take long to run either.
If your interested let me know
Z
If i have the script here, you don't need to rejoin the machines on the domain. I had the same problem when i started my old job.
net stop wuauserv
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Wi ndowsUpdate" /v AccountDomainSid /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Wi ndowsUpdate" /v PingID /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Wi ndowsUpdate" /v SusClientId /f
net start wuauserv
wuauclt /resetauthorization /detectnow
Last edited by FN-GM; 14th January 2009 at 01:22 PM.
Attachment seems OK here but I've uploaded it with this message. If that doesn't work, email me - s.rochford@imperial.ac.uk - and I'll send it to you directly.
FN-GM (16th January 2009)
mark (23rd January 2009)
We're not at testing phase yet here Steve. Still tidying user accounts. Will let you know when the time comes.
There are currently 1 users browsing this thread. (0 members and 1 guests)