What does it mean when the documentation says that you must specify the app in the system’s metadata before you can retrieve Smbios­Information properties?

The documentation for the Smbios­Information class says

The SerialNumber property securely retrieves the serial number from the SMBIOS for the system. This property is partial trust, so in a UWP app, you must specify the app in the system's metadata before retrieving any properties.

OEMs use the SerialNumber property to aid in identification of devices for servicing and troubleshooting operations.

What does it mean when it says that "you must specify the app in the system's metadata"? How do you do that?

The "you" in that sentence is not talking to you, the software developer. It's talking to "you" the system manufacturer.

When system manufacturers set up a system, they can specify which apps are permitted to read the serial number. The expectation is that the manufacturers will grant permission to their customer support apps. (That's what the second paragraph is trying to say.)

For example, if they have an app that provides online help, they can grant that app permission to read your serial number so the app can use it to filter the help results to those that apply to the system you have. System manufacturers are notorious for constantly changing suppliers, so just knowing the model number isn't always enough to narrow down exactly what hardware is in the system.

What this means for you, the average software developer, is that unless you've cut a deal with the system manufacturer, your UWP app won't be able to read the serial number.


If you want something that can be used from a UWP app to identify the system, you can use the System­Identification class. The Get­System­Id­For­Publisher gives you an opaque ID that will be the same for all apps on the system from the same publisher. See the documentation for additional details on how well this value survives reinstalls.

Comments (9)
  1. Brian says:

    That makes sense from a security point of view (random apps shouldn’t be able to reach so far into my PC to find an identifier that specifies “Brians PC”). However, the docs do not describe the situation well at all. I’m assuming (/hoping) you have filed a doc bug on this.

  2. Michael Quinlan says:

    Any doc that refers to ‘you’ should be changed to specify exactly who this applies to. Otherwise it means ‘the person reading the doc’ which could be anyone.

    1. Ian Yates says:

      I hate reading the “contact your administrator” message in documentation – it’s understandable in error messages generated by the software though.

      Often I am the administrator, so a page for MS Exchange, where no user would be reading unless they were the admin, just raises frustration levels when I get that unhelpful advice

  3. DWalker07 says:

    It’s not that hard to write good documentation, but it seems like developers are writing documentation — when it should be usability-trained people instead. Or else, Raymond should write ALL documentation for all products.

    So much of the doc is so insider-specific as to be almost useless for others.

    1. James Moore says:

      Alternatively, we could usability-train developers.

    2. cheong00 says:

      Sometimes those “usability-trained people” don’t have clue on the topic of documentation, so you get documentation that looks like the stub generated by JavaDoc – no particular value to the developers who needs it.

      “Usability-train developers” would be way better, but that would be costly. Probably just need to hire some technical editor to point out where needs clarification when the draft of documentation is written.

  4. DWalker07 says:

    Does this mean that the whole recent series is moot, if “the average software developer, […] unless you’ve cut a deal with the system manufacturer, your UWP app won’t be able to read the serial number”?

    1. Brian says:

      I don’t believe so. This is about how a normal UWP app doesn’t run with enough trust to access the Smbios­Information. The sample code in the series has been about desktop apps accessing UWP-exposed information. Desktop apps generally run with full trust.

      1. DWalker07 says:

        Thanks for that info!

Comments are closed.

Skip to main content