Please notice that Microsoft REMOVED VBSCRIPT Support in Windows PE MDT/SCCM or whatever you use in summer 2023. You may use other script language like PS. See last entry here.
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 For Each win32_objItem in win32_colItems For Each bios_objItem in bios_colItems |
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
Powershell Version: |
PowerShell script to get computer information $computer = “.” Get computer system information $win32_colItems = Get-WmiObject -Class Win32_ComputerSystem -ComputerName $computer foreach ($win32_objItem in $win32_colItems) { Write-Host “Name: $($win32_objItem.Name)” Write-Host “Model: $($win32_objItem.Model)” Write-Host “Manufacturer: $($win32_objItem.Manufacturer)” } Get BIOS information $bios_colItems = Get-WmiObject -Class Win32_BIOS -ComputerName $computer foreach ($bios_objItem in $bios_colItems) { Write-Host “Serial: $($bios_objItem.Serialnumber)” } |