Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows - si.chassis() and si.baseboard() do not return an AssetTag #851

Closed
shoustech opened this issue Sep 13, 2023 · 6 comments
Closed

Comments

@shoustech
Copy link

Describe the bug
The powershell commands that are used for si.chassis() and si.baseboard() do not return the system's asset tag. The Powershell command for si.chassis() can be edited to pull the Asset Tag from the BIOS.

To Reproduce
Steps to reproduce the behavior:

  1. Use systeminformation v5.21.4 on a Windows system
  2. Look at the blank assetTag value returned from si.chassis() and si.baseboard()

Current Output and Expected behavior
Here is a screenshot of the existing powershell command being executed. I pulled this command from the chassis function inside of system.js. The function that calls this command tries to pull the information from the partnumber field from the output and if it is empty it uses the sku field. I suggest adding SMBIOSAssetTag to the list of parameters that are being pulled from Powershell and using the result of that field for the assetTag value. You might want to use the same value in the si.baseboard() function.
image

Environment (please complete the following information):

  • systeminformation package version: 5.21.4
  • OS: Windows 10 / 11
  • Hardware Dell Precision 5520.
    ** NOTE ** : I have testing this on a few other computers and I have noticed that Dell has the option to configure an asset tag in the bios but on my home system I am using consumer components and I do not have an asset tag configuration option in that BIOS. With these systems I find that the value is often Default string:
    image
@sebhildebrandt
Copy link
Owner

@shoustech Thank you! Will correct this ...

@sebhildebrandt
Copy link
Owner

@shoustech ... i fixed it by adding also SMBIOSAssetTag. Version 5.21.5 just published. Can you test it on your side?

@shoustech
Copy link
Author

@sebhildebrandt The patch worked for the si.chassis() function but not for si.baseboard(). With the baseboard function you are pulling from the windows class Win32_BaseBoard but that class does not have the SMBIOSAssetTag property. I believe you would need to add another workload.push line to the baseboard() function where you are just pulling SMBIOSAssetTag from the Win32_SystemEnclosuer class.

@sebhildebrandt
Copy link
Owner

@shoustech you are absolutely right ... I worked on it early in the morning ... maybe to early ;-) Will try to provide a fix tomorrow.

@sebhildebrandt
Copy link
Owner

@shoustech ... after thinking about it ... si.baseboard() should of course return asset tags of the baseboard and si.chassis() the one of the chassis. And I am not sure, if it would really make sense to also put the SMBIOSAssetTag from Win32_SystemEnclosure to si.basebard() ...

Would you provide the full

Get-CimInstance Win32_baseboard | fl
Get-CimInstance Win32_SystemEnclosure | fl

of your Dell machine?

Thank you in advance.

@shoustech
Copy link
Author

@sebhildebrandt Here is the full output from both of those commands:

It's a bit hard to say if that data should or should not be added to si.baseboard(). I could see it being the last option in your list of variables that is sorted through for the field. It would be nice if Windows was more reliable on the output / descriptions of its own commands!

A bit unrelated but I noticed that the serial number for both sections are similar but slightly different:

For Win32_baseboard the output reflects:
/< Dell Service Tag >/< Some serial number that I cannot find on the outside of the chassis >
And Win32_SystemEnclosure is just the Dell service tag

PS C:\Windows\system32> Get-CimInstance Win32_baseboard | select * | fl


Status                  : OK
Name                    : Base Board
PoweredOn               : True
Caption                 : Base Board
Description             : Base Board
InstallDate             :
CreationClassName       : Win32_BaseBoard
Manufacturer            : Dell Inc.
Model                   :
OtherIdentifyingInfo    :
PartNumber              :
SerialNumber            : /DY5VYM2/CN1296382D05E6/
SKU                     :
Tag                     : Base Board
Version                 : A00
Depth                   :
Height                  :
HotSwappable            : False
Removable               : False
Replaceable             : True
Weight                  :
Width                   :
HostingBoard            : True
RequirementsDescription :
RequiresDaughterBoard   : False
SlotLayout              :
SpecialRequirements     :
ConfigOptions           : {Default string}
Product                 : 00F6D3
PSComputerName          :
CimClass                : root/cimv2:Win32_BaseBoard
CimInstanceProperties   : {Caption, Description, InstallDate, Name...}
CimSystemProperties     : Microsoft.Management.Infrastructure.CimSystemProperties



PS C:\Windows\system32> Get-CimInstance Win32_SystemEnclosure | select * | fl


Tag                       : System Enclosure 0
Status                    :
Name                      : System Enclosure
SecurityStatus            : 3
Caption                   : System Enclosure
Description               : System Enclosure
InstallDate               :
CreationClassName         : Win32_SystemEnclosure
Manufacturer              : Dell Inc.
Model                     :
OtherIdentifyingInfo      :
PartNumber                :
PoweredOn                 :
SerialNumber              : DY5VYM2
SKU                       :
Version                   :
Depth                     :
Height                    :
HotSwappable              :
Removable                 :
Replaceable               :
Weight                    :
Width                     :
AudibleAlarm              :
BreachDescription         :
CableManagementStrategy   :
LockPresent               : False
SecurityBreach            :
ServiceDescriptions       :
ServicePhilosophy         :
VisibleAlarm              :
ChassisTypes              : {10}
CurrentRequiredOrProduced :
HeatGeneration            :
NumberOfPowerCords        :
TypeDescriptions          :
SMBIOSAssetTag            : NL-L1710042
PSComputerName            :
CimClass                  : root/cimv2:Win32_SystemEnclosure
CimInstanceProperties     : {Caption, Description, InstallDate, Name...}
CimSystemProperties       : Microsoft.Management.Infrastructure.CimSystemProperties

shoustech added a commit to shoustech/systeminformation that referenced this issue Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants