Installing Device Metadata Packages through an Application
To install device metadata packages in the device metadata store by using an application, such as a device installation application, follow these steps:
The application first queries the path of the device metadata store by calling the SHGetKnownFolderPath function. The KNOWNFOLDERID GUID for the device metadata store is FOLDERID_DeviceMetadataStore {5CE4A5E9-E4EB-479D-B89F-130C02886155}.
The application then copies the device metadata package to the device metadata store by calling the CopyFile function.
Note The application must be running with administrator privileges or started from an elevated command prompt window.
When your application copies the device metadata package to the device metadata store, it must complete the following steps:
If a subdirectory does not exist in the device metadata store for the locale of your device metadata package, the application must create the subdirectory by using the name of the target locale.
For example, if the locale of the package is EN-US, the application must create the EN-US subdirectory under the path of the device metadata store if the subdirectory does not currently exist.
Copy the device metadata package to the appropriate <locale> subdirectory within the device metadata store.
Note If you use the CopyFile function to copy the device metadata package, specify the full path name, which includes the appropriate <locale> subdirectory. By doing this, CopyFile creates the associated subdirectories for your package if they do not exist on the local computer.
After the device metadata package is installed in the device metadata store, the Device Metadata Retrieval Client (DMRC) accesses the device metadata package and presents the device information to the Devices and Printers user interface.