General discussion
July 5, 2001 at 10:12 AM
heckle

Advanced batch file for ghosting pc’s.

by heckle . Updated 25 years, 1 month ago

I am trying to create a ghost boot disk that will generate a random name to be used as the computername and placed in the network.ini file:

[network]
computername=”randomly generated name”

Does anyone know of a program/utility that will do this? Also, how would I get it included in the network.ini file during the boot process so that computername would be unique on the network.

The reason I want to do this is so I can use the same boot disk on multiple computers at the same time without manually changing the network.ini file between each computer.

I have been “experimenting” since I posted this. I found a small util called change that is only 15k.

It can be used like this:
CHANGE /I a:\net\network.ini “computername=” “%computername%%rnd%”

IF I start with set computername= and can set a variable for %rnd%

I was thinking of using the time as the variable like this:
time /t > timevar.txt

OR, I could possibly use the volume serial number as the random value like so:
find | “Volume Serial Number” > vol.txt

The thing that has me stumped is how to get the value from the timevar.txt or vol.txt set as the %rnd% variable.

If I end up using the volume serial number, how could I parse the vol.txt to removeeverything except the actual number?

Keep in mind that this will all be done from DOS and any utils will have to fit on a bootable floppy along with the NIC drivers. If the batch file gets too big, I can always convert it to a COM file if it willsave enough space.

Or am I totally off base in my thinking?
I appreciate any and all input.

This discussion is locked

All Comments