I do the same thing but have the luxury of being able to be in windows XP to be able to quality control the systems.
I started out with BAT and moved on to scripts that can pull information directly from the windows API with out having to parse info or call on other windows programs using start/call etc.
Though I do have some machines that do not have an OS installed, I check the BIOS for time date ram/cpu etc
But to give you the degree of quality control we require, I have to check every aspect of the system from
- HD/DVD-RW/FDD model number,
- Ram size,
- CPU speed,
- BIOS revision,
- windows version,
- change windows product key code,
- activate windows,
- the time and date,
- test burn a "CD",
- test write a floppy,
- test com1 and com2, LPT 1,
- check HD filesystem type and size,
- disable automatic updates,
- change file sharing on a folder and set permission access to everyone,
- setup a secondary partition and format it as NTFS,
- check Intranet access via PING,
- change another folder to not read only,
- empty the recycle bin,
- check device manager for ANY errors,
- test USB ports,
- deactivate windows,
- as well as create a new SID as we use a single image to create thousands of these machines a year, each costing about $1,200 US
It took roughly 30-45mins to do this manually and some steps were usually skipped either from forgetfulness or time crunches. I wrote a DOS file to help out with the CD burn test, ping test, and port test calling on a saved hyperterminal template to test com1 and then com2. which saved us about 5 mins per machine.
I later wrote a complete WScript File (.wsf) to be able to do all of these cutting QC time down to 5 mins, All the tech has to do manually now, is check the screws are in the right places...
Here's a javascript example
Copy paste it in Notepad rename it as Spec.js
The code can be setup to run remotely, or sent back to you as txt file etc. Pretty much anything you can do on your PC you can access it via script, simply search google for msdn WMI tasks
var wbemFlagReturnImmediately=0x10;
var wbemFlagForwardOnly=0x20;
var jsCrLf=String.fromCharCode(13, 10);
var jsQuote=String.fromCharCode(34);
//Windows Management Interface
function wmiCon(strComp){
try{
var objWMIService = GetObject( "winmgmts://"+ strComp +"/root/cimv2" );
}
catch(error){
var strMsg = jsCrLf + "WMI Connection Error # " + error + jsCrLf;
WScript.Echo(strMsg);
WScript.Quit(0);
}
return objWMIService;
}
function wmiSQL(wmiBase){
var objWMIService = wmiCon(".");
try{
var colItems = objWMIService.ExecQuery( "SELECT * FROM Win32_" + wmiBase, "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly ); //query
}
catch(error){
var strMsg = jsCrLf + "WMI Query Error # " + error + jsCrLf;
WScript.Echo(strMsg);
WScript.Quit(0);
}
objWMIService.close;
return colItems;
}
var strMemTotal,strHostName,strDomain,strCpuCount, strCPUSpeed = "", strToAdd = ""
var colItems = wmiSQL("Processor");
var enumItems = new Enumerator(colItems);
for (x=0 ; !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItems.item();
if (x >= 1){strToAdd = ", " + x + ") "}
else{strToAdd = String(x + ") ")}
strCPUSpeed += strToAdd + objItem.MaxClockSpeed(x) + " MHz";
x++;
}
var colItems = wmiSQL("ComputerSystem");
var enumItems = new Enumerator(colItems);
for (x=0 ; !enumItems.atEnd(); enumItems.moveNext()){
objItem = enumItems.item();
strMemTotal = objItem.TotalPhysicalMemory;
strHostName = objItem.Name;
strDomain = objItem.Domain;
strCpuCount = objItem.NumberOfProcessors;
x++;
}
strMemTotal = strMemTotal / 1048576;
strMemTotal = Math.round(strMemTotal);
var strSaveto = "C:\\" + strHostName + ".txt"
var strSysInfo = "HostName: " + strHostName
+ "\nDomain: " + strDomain
+ "\nCPU Count: " + strCpuCount
+ "\nCPU Speed: " + strCPUSpeed
+ "\nMemory: " + strMemTotal + " MBs";
WScript.Echo(strSysInfo + "\n\nResults Saved to " + strSaveto);
var fso, f
var ForReading=1, ForWritting=2, ForAppending=8;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.OpenTextFile(strSaveto, ForWritting, true);
var strToReplace = /\n/g; //g - global, i - case insensitive, m - multiline search
strSysInfo = strSysInfo.replace(strToReplace, jsCrLf);
f.write(strSysInfo);
f.close();
fso.close;