by butsch
24. October 2010 19:50
The "sm_info" from Dell does not work on most new machines and under Windows PE 2.X/3.0 so you will have to use VB/WMI to get the machine type:
' ' GET Model by Butsch Informatik, 2015 strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer &"\root\CIMV2") Set win32_colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem",,48) Set bios_colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS",,48)
For Each win32_objItem in win32_colItems Wscript.Echo "Name: " & win32_objItem.name Wscript.Echo "Model: " & win32_objItem.Model Wscript.Echo "Manufacturer: " & win32_objItem.Manufacturer Next
For Each bios_objItem in bios_colItems Wscript.Echo "Serial: " & bios_objItem.Serialnumber Next
|
Save above as bios.vbs
Then in a batch File you check the machine AND based on that you do certain things or install software which you can't install silent.
cscript.exe //NOLOGO c:\windows\system32\bios.vbs | find "8510"
if %errorlevel%==0 goto 8510
cscript.exe //NOLOGO c:\windows\system32\bios.vbs | find "6710"
if %errorlevel%==0 goto 6710
cscript.exe //NOLOGO c:\windows\system32\bios.vbs | find "6120"
if %errorlevel%==0 goto 6120
:8510
echo "This is HP 8550"
goto ende
:ende