GTOOOOOH Posted December 5, 2007 Posted December 5, 2007 SMBiosD and W don't work for me in 2.0? HTA and WMI packages are installed and I can't figure out why neither will run. They both say that the .exe cannot be found. Does anyone have a freeware utility that will read the bios in PE 2.0? I need to extract Model and Manufacturer.
Jazkal Posted December 5, 2007 Posted December 5, 2007 (edited) Here is what I use: (VBS script)Dim objFileSystem, objOutputFileDim strOutputFilestrComputer = "."strOutputFile = "X:\hardtest.ini"Set objFileSystem = CreateObject("Scripting.fileSystemObject")Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE)Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colSettings = objWMIService.ExecQuery _ ("SELECT * FROM Win32_ComputerSystem")For Each objComputer in colSettings 'Wscript.Echo "System Manufacturer: " & objComputer.Manufacturer objOutputFile.WriteLine("Type: " & objComputer.Manufacturer & "") objOutputFile.WriteLine("Model: " & objComputer.Model & "")NextobjOutputFile.CloseSet objFileSystem = NothingWScript.Quit(0)Here is the output: "X:\hardtest.ini"Type: SupermicroModel: H8SMI Edited December 5, 2007 by Jazkal
GTOOOOOH Posted December 6, 2007 Author Posted December 6, 2007 Here is what I use: (VBS script)Dim objFileSystem, objOutputFileDim strOutputFilestrComputer = "."strOutputFile = "X:\hardtest.ini"Set objFileSystem = CreateObject("Scripting.fileSystemObject")Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE)Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colSettings = objWMIService.ExecQuery _ ("SELECT * FROM Win32_ComputerSystem")For Each objComputer in colSettings 'Wscript.Echo "System Manufacturer: " & objComputer.Manufacturer objOutputFile.WriteLine("Type: " & objComputer.Manufacturer & "") objOutputFile.WriteLine("Model: " & objComputer.Model & "")NextobjOutputFile.CloseSet objFileSystem = NothingWScript.Quit(0)Here is the output: "X:\hardtest.ini"Type: SupermicroModel: H8SMIThanks Jaz, I ended up writing a very simple AutoIT script for it, working great now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now