Set fs = CreateObject("Scripting.FileSystemObject") 
Set outFile = fs.CreateTextFile("computer.txt", True) 

'
'operating system query

outFile.WriteLine("__// OPERATING SYSTEM (lines 2-3)")
For each Item in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("Win32_OperatingSystem")
outFile.WriteLine(Item.Caption)
outFile.WriteLine(Item.BuildNumber)
outFile.WriteLine("")
Next

'
'processor query

outFile.WriteLine("__// PROCESSOR (lines 6-9)")
For each Item in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("Win32_Processor")
outFile.WriteLine(Item.Name)
outFile.WriteLine(Item.CurrentClockSpeed)
outFile.WriteLine(Item.L2CacheSize)
outFile.WriteLine(Item.L2CacheSpeed)
outFile.WriteLine("")
Next

'
'video card query

outFile.WriteLine("__// VIDEO CARD (lines 12-15)")

For each Item in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("Win32_VideoController")
outFile.WriteLine(Item.Caption)
outFile.WriteLine(Item.CurrentHorizontalResolution)
outFile.WriteLine(Item.CurrentVerticalResolution)
outFile.WriteLine(Item.CurrentNumberOfColors)
outFile.WriteLine("")
Next

'
'bios query (written by: KB - http://userpages.umbc.edu/~kbradl1/)

outFile.WriteLine("__// BIOS (lines 18-20)")

Set oArrBIOS = GetObject("winmgmts:").ExecQuery("Select * From Win32_BIOS Where PrimaryBIOS=true")
For Each oBIOS In oArrBIOS
	outFile.WriteLine(oBIOS.Name)
	outFile.WriteLine(oBIOS.Manufacturer)
	outFile.WriteLine(FromWMIDate(oBIOS.ReleaseDate))
Next
Function FromWMIDate(sDate)
	Dim iDay, iMonth, iYear
	iDay = Mid(sDate, 5, 2)
	iMonth = Mid(sDate, 7, 2)
	iYear = Mid(sDate, 1, 4)

	FromWMIDate = iDay & "." & iMonth & "." & iYear
End Function

'
'

outFile.Close
