Pc rollout

  • Thread starter Thread starter Keith Winter
  • Start date Start date
K

Keith Winter

I will be rolling out approx 900 pc's each of which need a
predefined IP address and computer name. Instead of having
to go into network neighbourhood etc to change the details
I would like to generate .reg files which can be edited
via VB programs. Which keys need to be changed.

Thanks
 
While you can make the change by hacking the registry, it is much better to
do this using the APIs provided.

I wrote a program a while back for renaming a computer after deployment.
It's available at www.willowhayes.co.uk and it's freeware.

As for the IP address, while this information is stored in the registry,
it's under a key with a name based on a GUID for your network
card/interface, which you won't know ahead of time.

You don't say how you are deploying these PCs, but I have a suspicion you
will be cloning the systems. If so, you really should be using SysPrep
anyway (even if the hardware is identical) and SysPrep does have facilities
for doing this type of stuff.

Regards

Oli
 
Forgot to say, here's where the IP information is stored.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interf
aces

Also, try the following group for information and questions about
SysPrep/unattended installation.

microsoft.public.win2000.setup_deployment

Regards

Oli
 
Modifying the registry is always a bad idea when Microsoft has a
defined API you can use.

The best option from VB is to use WMI. For the IP address, see the
Win32_NetworkAdapterConfiguration class:

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_networkadapterconfiguration.asp

In particular, see the "EnableStatic" method. (You will have to learn
how to use WMI first, but trust me, it's worth it.)

The host name is trickier. You could use the Rename method in the
Win32_ComputerSystem class:

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/rename_method_in_class_win32_computersystem.asp

....except that it was only introduced with Windows XP.

So if you are on Windows 2000, I suggest just using Oli's compname.exe
tool :-).

- Pat
http://unattended.sourceforge.net/
 
Back
Top