locked
runtime error running metro store app with SmbiosInformation.SerialNumber RRS feed

  • Question

  • I tried to get serial number by calling an API, like this: "string serialNum = Windows.System.Profile.SystemManufacturers.SerialNumber ",  it throws an exception saying "Access is denied".

    I am using VS 2013RC, running this app on Windows 8.1 Preview. Can anyone give me help? Thanks.

    Monday, September 9, 2013 6:58 PM

Answers

  • Lisa,

    This is unfortunately not supported for this scenario. 

    Best Regards - Eric


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, September 16, 2013 11:59 PM
    Moderator

All replies

  • Hi lisarom,

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

    the words comes from: http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.profile.systemmanufacturers.smbiosinformation.serialnumber.aspx

    If you do not specify this app in your system metadata you could not get any properties and an "Access Denied" will be thrown.

    Best Reagrds,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 10, 2013 1:38 AM
    Moderator
  • Thank you for your quick reply.

    I've still got the same error when I tried to specify the app for SMBIOS in metadata. Could you please check the following steps, tell me what are the correct steps.

    1.run Device Metadata Authoring Wizard->Package Type(Internal device) ->Device Categories(Notebook)->Locales(en)->Device Info(model name:XX, Manufacturer:XX)->Hardware Info(import from this computer)->App Info(store Package name:xxx, Publisher name:xxx)->check "Copy the metadata package to the metadata store on the local computer"

    2. After that, I got three files, which are Device manifest file and Device Metadata file and StoreManifest.xml 

    3. add the StoreManifest.xml to the application.

    Thanks.

    Wednesday, September 11, 2013 1:05 AM
  • Hi lisarom,

    Read this for more information, the steps are detailly described: http://msdn.microsoft.com/en-us/library/windows/hardware/hh454247(v=vs.85).aspx.

    I do not have experience on using Device Metadata Authoring Wizard, but I think the document I provide you can help you solve your question. Hope it works.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 11, 2013 7:07 AM
    Moderator
  • Hi James,

    Thanks again. I've read this document, but I could not get it worked. Does any expert point out that I am doing wrong or I missed some things about configuration??

    Wednesday, September 11, 2013 2:48 PM
  • Lisa,

    Are you an OEM and/or working on behalf of an OEM?

    Best Regards - Eric


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, September 12, 2013 10:53 PM
    Moderator
  • Lisa,

    Are you an OEM and/or working on behalf of an OEM?

    Best Regards - Eric


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, September 12, 2013 10:53 PM
    Moderator
  • Hi Eric,

    Sorry for the delay.

    No. We just want to provide some unit info such as serial number, model number etc to customers.

    Saturday, September 14, 2013 4:11 AM
  • Lisa,

    This is unfortunately not supported for this scenario. 

    Best Regards - Eric


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, September 16, 2013 11:59 PM
    Moderator
  • Dear Eric,

      let me jump in here; we're facing the same issue - and are working on behalf of an OEM who asked us to develop a metro app that can be aware of the serial number of the notebook to display info on the warranty, etc.

    Can you help? What should we do?

    Best,

    Giovanni

    Friday, January 3, 2014 4:08 PM