Automatically Generate Computer Name

This issue has been solved. See solution.
biscuitgod's picture

Does anyone know of a way that I can automatically generate a PCs computer name? I know i can leave Computername=* in the sysprep, but that gives me an odd PC name like 6DDFB8... I want something more like 'Client-001',002,003, etc. I see in the Initial Deployment job down on the bottom left I have 2 jobs, a Windows XP, and SVR job in the Configurations Menu and they have listed in the ComputerName field 'XP1000....XP1009', but it's grey'd out, so I can't change it...AND when i go to create a new configuration, that field is still grey'd out and I can't put anything else in there... This is actually what I'd like to happen, if i could name the computer whatever i want with numbers at the end. It seems to work, but the name has to be a little better than say XP1276.  I'd like to utilize this functionality, but I'm not able to click in that field...Has anyone done this before??

Any help would be awesome!
Thanks everyone
Jeff

bgreen's picture

Modify Configuration

Solution

On the Modify Configuration task, go to the "Microsoft Networking" tab in the left scrollbar.  Uncheck "Use Token" and click "Define Range".

Eric Yao's picture

But it seems only support 10

But it seems only support 10 PCs. If we have PC more than 10, what can we do?

viddect's picture

initial deploy

you can do it in an intial deploy and set in the aclient settings the install-as-new option. So that every time it boots into automation and if the computer is in the new computers group it will treat it as a new computer or use the modify config job.

Linux Man
Viddect

tamahome's picture

How about a script like

How about a script like this?  set the computername to the dns hostname

for /f "tokens=2 delims=:" %%i in ('ipconfig ^| find "IP Address"') do set ip=%%i
for /f "tokens=2 delims=:. " %%i in ('nslookup %ip% ^| find "Name:"') do set name=%%i
reg add HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\Computername /v Computername /d %name% /f

rem you might need this one
rem reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v "NV Hostname" /d %name% /f
biscuitgod's picture

thanks bgreen!  That's

thanks bgreen!  That's exactly what i was looking for!  I can't believe i didn't see that before.