none
Create device stage metadata manually

    Question

  • Hello,

    We are developing a printer driver for windows 8 with VS2012 and WDK8. Although VS2012 provides a wizard to edit and create a device stage, we are trying to edit it also manually.

    We can create the metadata file, but when we then open it with VS2012 it says it is not a legal format. The only difference between the VS generated file and the one generated with makecab are two bytes in the header:

    

    Do you know why we are getting this difference? Is there any other way to generate a device stage metadata from command line?

    This is the ddf used with makecab:

    .Set CabinetNameTemplate=sample.devicemetadata-ms
    .set DiskDirectoryTemplate=CDROM 
    .Set CompressionType=MSZIP
    .Set UniqueFiles="OFF"
    .Set Cabinet=on
    .Set DiskDirectory1=DeviceStage

    PackageInfo.xml
    ...

    Thanks!

    Roger

    Tuesday, October 22, 2013 8:45 AM

Answers

  • You need to keep the directory structure in the cab archive, else it's not going to work. By default, cab files created with makecab are flat, unless you set the DestinationDir.

    The cabarc instructions are provided here: http://msdn.microsoft.com/en-us/library/windows/hardware/ff537817(v=vs.85).aspx .

    For makecab, here's a small sample of a ddf file that works:

    .Set CabinetNameTemplate=sample.devicemetadata-ms
    .Set DiskDirectoryTemplate=CDROM
    .Set CompressionType=MSZIP
    .Set UniqueFiles="OFF"
    .Set Cabinet=on
    .Set DiskDirectory1=DeviceStage

    metadata-orig\PackageInfo.xml
    .Set DestinationDir=DeviceInfo
    metadata-orig\DeviceInfo\DeviceInfo.xml
    metadata-orig\DeviceInfo\Surface.ico
    .Set DestinationDir=DeviceInfo\en
    metadata-orig\DeviceInfo\en\DeviceInfo.xml
    metadata-orig\DeviceInfo\en\Surface.ico
    .Set DestinationDir=SoftwareInfo
    metadata-orig\SoftwareInfo\SoftwareInfo.xml
    .Set DestinationDir=WindowsInfo
    metadata-orig\WindowsInfo\WindowsInfo.xml
    .Set DestinationDir=WindowsInfo\en
    metadata-orig\WindowsInfo\en\WindowsInfo.xml


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

    Tuesday, October 22, 2013 9:29 PM