Query for Lenovo model during OSD

Since the beginning of time (ok maybe not quite that long) computer manufacturer Dell has been stamping the BIOS with a model name that reflects the model name you see on the device.  An OptiPlex 990 would be reflected as the model number.  This could then easily be queried via WMI during OSD to determine a particular driver set for example, to apply only to the OptiPlex 990.

Example:

Select * From Win32_ComputerSystem WHERE Model LIKE “%OptiPlex 990%”

Lenovo on the other hand (like IBM before them) have different model numbers within a specific model to reflect the internal hardware.  For instance, a Lenovo ThinkPad T420s can be many different models like 41742Au, 41742BU, 41732AU etc.  depending on different network card, video card, spinning HDD versus SSD, etc.

Having a single driver set for all “like” models for ThinkPad T420s can still be accomplished by using a query like:

Select * From Win32_ComputerSystem WHERE Model LIKE “%4174%”

However you may still have to add multiple queries if you have additional models like the 41732AU. :

Select * From Win32_ComputerSystem WHERE Model LIKE “%4174%”
Select * From Win32_ComputerSystem WHERE Model LIKE “%4173%”

In additional to potentially needing to add multiple queries, it’s also not as easy to determine what models you are referring to simply by looking at the query.

There is however an alternative.  You can utilize the Win32_ComputerSystemProduct class to get the “friendly” name for a particular Lenovo model using the VERSION attribute.  🙂

Example:

select * from Win32_ComputerSystemProduct Where VERSION LIKE ‘%ThinkPad T420s%’

As always you should test for the existence of this on any of the various models you plan on targeting to ensure it exists.  You can do this quickly by using WMIC:

wmic

As you can see this is a much simpler way to query for a particular “model” of a Lenovo without having to add multiple queries with different internal model numbers.  🙂

Advertisements

One thought on “Query for Lenovo model during OSD

  1. Lenovo on the other hand (like IBM before them) have different model numbers within a specific model to reflect the internal hardware. For instance, a Lenovo ThinkPad T420s can be many different models like 41742Au, 41742BU, 41732AU etc. depending on different network card, video card, spinning HDD versus SSD

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s