1.

Solve : Model-specific string into a variable?

Answer»

I am using a network boot cd that automatically installs the drivers onto a computer. The problem is, we have several different kinds of computers, and I am TRYING to make it so that it automatically installs the right one. As such, I need a model-specific string to compare in order to tell the program what driver to install. I've got everything figured out except how to get the program to distinguish between computers; right now I'm using a choice menu manually, which gets old when you're dealing with lots of computers...

So, I need to get a variable that contains model-specific information. Because the boot cd doesn't have nice, convinient built-in variables, I am using a program that returns the CPU speed (which is different across all models). So I need to figure out how to use the returned value.

Thanks,
-darrylQuote

I am using a program that returns the CPU speed

Where does this program return the CPU speed? On the screen? In a FILE? What OS is this boot disk booting?

The easiest way would be to have the CPU speed in a file; if CURRENTLY on the screen, you might be able to redirect the output to a file. If the boot disk boot is MS-DOS, the FOR statement didn't have all the options necessary to read this file and extract the DATA you require. SOL.

After booting this disk, try running a SET command and see if any variables set by the OS are unique to each machine.

Another choice would be to put a uniquely named file on each machine's hard disk; you could then check for the existence of a specific file label and load the correct driver. Lotta machines, lotta work!

Good luck. 8-)The program returns the CPU speed on the screen.

I cannot put the file on the computer, for security/business reasons (don't worry about why, let's just say we can't )

Running the SET command does not yield any model-specific variables, unfortunately.

Thanks,
-darrylHave you considered using %computername% rather than model specific strings. Each computer on the network should have a unique name, which you can get a list of with the command net view (for all computers in the same workgroup). Net view also has switches for listing computers in different workgroups.I have indeed tried the %computername% approach. Unfortunately, I am using a boot CD and this function is not supported. It is a network boot CD, and does not register computername or any of the files on the HDD.

Thanks,
-darryl


Discussion

No Comment Found