次の方法で共有


Device metadata

The topics in this section provides info for independent hardware vendors (IHVs) and original equipment manufacturers (OEMs) to show device-specific information in Windows.

Device metadata describes a physical device in the following ways:

  • The vendor name
  • The model name and description of the device
  • The device categories
  • Windows Store device apps
  • Privileged apps
  • Autoplay handler for the device
  • Device notification handlers

A device metadata package includes multiple XML files stored in a cabinet file. Each file specifies various components of the device’s attributes. Starting with Windows 7, the info from these files customizes how the device shows up in Devices and Printers. Beginning with Windows 8, these XML files create a device-related user interface for user interaction, including custom software for the device.

Device metadata package components

Each device metadata package consists of the following files:

  • PackageInfo XML file Specifies the contents of the device metadata package. Windows uses this data to install the package and reference its contents. This data is based on the PackageInfo XML Schema.
  • DeviceInfo XML file Specifies the device’s properties, such as the device category and model name. Devices and Printers and other device-related user interfaces in Windows display this detailed information to users. This data is based on the DeviceInfo XML Schema.
  • WindowsInfo XML file Specifies the display actions that Devices and Printers and other device-related user interfaces performs for the specified device in the device metadata package. This data based on the WindowsInfo XML Schema.
  • SoftwareInfo XML file Specifies the device-related applications for the device in Windows 8. This data is based on the SoftwareInfo XML Schema.
  • Device icon file This file contains a photo-realistic image of the device that is used in Devices and Printers and other device-related user interfaces. For more info, see the section named "Device icon file".

Note  The XML files must be saved by using UTF-8 encoding.

Device metadata package structure

The components of a device metadata package are stored in a compressed cabinet file. The cabinet file must have the file name GUID.devicemetadata-ms, where GUID is a globally unique identifier. The cabinet file uses this file name extension to discourage end users from decompressing or modifying the package file.

Note  A Windows 7 device metadata package supports only one locale. If your device supports more than one locale, you must create separate metadata packages for each locale.

Using a single-locale device metadata package

A single-locale device metadata package must have a specific structure, as shown in the following diagram:

The following are some things to consider about a single-locale device metadata package:

  • The XML files must be named PackageInfo.xml, DeviceInfo.xml, and WindowsInfo.xml, and SoftwareInfo.xml respectively. The device icon file can have any name.
  • The .devicemetadata-ms file name must specify the GUID without the { or } delimiters.
  • The GUID for each device metadata package file name must be unique. When you create a new or revised metadata package, you must create a new GUID, even if the changes are minor.
  • Windows recognizes device metadata packages only if the file name extension is “.devicemetadata-ms”.

Using a multiple-locale device metadata package

Starting with Windows 8, the device metadata package can support multiple locales in one package. If your device supports more than one locale, you can put multiple locale files into a single device metadata package. If a device metadata package for multiple locales is installed on Windows 7, only the primary locale properties will be used. For example, if the primary locale is English, the English values will be displayed even when the user selects the Japanese UI language. A multiple-locale device metadata package must have the following structure:

The following are some things to consider about a multiple-device metadata package:

  • In each folder, create a folder with the specific locale name and place all relevant files for the locale in that folder.
  • Each folder must have all required files (XML files, device icon files, and so on) at the root level, for backward compatibility with Windows 7. Additional files to support multiple locales should be located in subfolders
  • You only include a single Softwareinformation.xml file, because this information cannot vary by locale.
  • For more information about device metadata packages for multiple locales, see the PackageInfo XML Schema.

Device icon file

A device metadata package contains one photo-realistic image that represents the device in Devices and Printers. The image is stored in an icon file, and the file name must be specified in the DeviceIconFile element of the DeviceInfo XML Schema.

For more info about creating icons that have the same display qualities of Windows graphical elements, see Icons.

 

 

Send comments about this topic to Microsoft