jon schwarz worldwide business development manager

37
Jon Schwarz Worldwide Business Development Manager Metadata Authoring (Part 1 – Devices and Printers)

Upload: kristopher-fisher

Post on 22-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Jon Schwarz Worldwide Business Development Manager

Jon SchwarzWorldwide Business Development Manager

Metadata Authoring(Part 1 – Devices and Printers)

Page 2: Jon Schwarz Worldwide Business Development Manager

Overview

Session 1 – Devices and Printers (DnP)Structure of DnP metadataAuthoring tips

Machine prep

Sample authoring exampleTesting

Session 2 – Device Stage (DS)Structure of DS metadata packagesAuthoring tips and troubleshootingSample authoring exampleTesting

Page 3: Jon Schwarz Worldwide Business Development Manager

Session Format

Step by step overview of informationTell you how to author the DnP packagesShow you how to do it (by doing it)Discuss checkpoints, FAQs, and tipsRender a successful resultDiscuss how to troubleshoot your packages

Page 4: Jon Schwarz Worldwide Business Development Manager

Levels of Device ExperiencesDevices and Printers

Any vendor may provide device metadata to customize their device appearance in Devices and Printers.

Baseline Device Stage ExperienceAvailable to portable and document device vendors only.  Each device class defines how to participate.

Custom Device Stage ExperienceAvailable to vendors whose devices meet their device-class participation requirements and who develop device experiences for those devices that meet their device-class implementation requirements.

Page 5: Jon Schwarz Worldwide Business Development Manager

Authoring a DnP Experience

Read the documentationDevice Metadata Package for Devices and Printers: Resource Roadmap

DevPrint-Metadata_Over.docx How to Create a Device Metadata Package for Devices and Printers

CreateDevMetadataPkg.docxSamples used in this DnP session

Links to these documents are in the resource section

Page 6: Jon Schwarz Worldwide Business Development Manager

What Happens When a Device Is Plugged InDrivers are automatically installed from class driver

Then it shows up as a device in the Devices and Printers folder – some have photo realistic icons, some do not

It is the IHV’s choice

Page 7: Jon Schwarz Worldwide Business Development Manager

Well Populated DnP Folder

Genericicon

Page 8: Jon Schwarz Worldwide Business Development Manager

Authoring Prerequisites

• Windows 7 RTM (Build 7600 or later)

• Cabinet SDKUsed to create the CAB file for the device experience metadata packagehttp://support.microsoft.com/kb/310618

Make sure it is installed in the C:\ directory

• GUIDGenUsed to generate unique IDs for task groups, tasks, and categorieshttp://www.microsoft.com/downloads/details.aspx?familyid=94551f58-484f-4a8c-bb39-adb270833afc

Place a shortcut on your desktop

• Visual Studio Express (C#, 2008)Used to edit and validate xml fileshttp://www.microsoft.com/express/download

• Boot Windows 7 in Test ModeRequired to process unsigned device experience metadata packages; see appendix for instructions

Make sure your computer is ready for authoring:

Page 9: Jon Schwarz Worldwide Business Development Manager

Metadata File Hierarchy

PackageInfo.xml – Associates device with package, declares locale, sets package version (date/time)DeviceInfo.xml – Defines device metadata for devices and printers folder

WindowsInfo.xml – Declares device behavior on connect (launcher / no launcher)

►FAQ◄

The device metadata package must have this structure!

Page 10: Jon Schwarz Worldwide Business Development Manager

Setting up your DnP Project

Checkpoint!Cannot proceed withoutthis exact structure.

Start, computer, c:drive, New Folder1. Create the following project folder structure on your C: drive

2. Copy the XML sample files from the documentation (CreateDevMetadataPkg.docx) into the appropriate folders

3. Add an icon file representative of your device with the specifications required

4. Overall structure should look like this:

Tip: You can also use these elements from any of the Device Stage templates provided with that documentation.

Page 11: Jon Schwarz Worldwide Business Development Manager

Author Metadata Experience

Configure PackageInfo.xmlSet hardware IDsSet localeSet package date/time stampSet experience ID GUID

Configure DeviceInfo.xmlAdd iconsBuild and test metadata package

Page 12: Jon Schwarz Worldwide Business Development Manager

How to Get a Hardware ID or Model IDUSB connect the device to a Windows PC; turn it onOpen the Start menu and type “device manager”Find the device node corresponding to your deviceRight-click the device name and click PropertiesClick the Details tabSelect Hardware IDs in the property dropdownTip: Open Notepad

or other text editorfor a scratch pad;

copy HWIDs & Model IDs to editor

Page 13: Jon Schwarz Worldwide Business Development Manager

PackageInfo.xmlOpen PackageInfo.XML by right-clicking and choosing to Open with Visual Studio Express

Page 14: Jon Schwarz Worldwide Business Development Manager

Insert your HWID(s)“DOID:” prefix requiredChange any/all “&” to “&”Add lines in the same format if you have two or more HWIDs

Add a date stamp in YYYY-MM-DDTHH:MM:SSz

Yes, the “T” and the “z” are case sensitive and required

Page 15: Jon Schwarz Worldwide Business Development Manager

Set the Experience ID for the PackageGenerate a GUID

Run GUIDGenSelect option #4 (Registry Format) Click the New GUID buttonClick the Copy buttonPaste it into your editor

Remove the braces – no “{“ or “}”

Add it to PackageInfo.xml and save the file

Page 16: Jon Schwarz Worldwide Business Development Manager

A Well Formed PackageInfo.xml FileEdited XML file should look something

like this on double-clicking:

Tip! If double-clicking an XML file results in Explorer opening the file (like above) that means it is a well formed XML file. If not, there are issues. It does not guarantee other integrity, but it is the first step.

Page 17: Jon Schwarz Worldwide Business Development Manager

PackageInfo.xml Double CheckAll HWIDs have DOID: prefixIf you have multiple HWIDs, they mimic the original format

All HWIDs have & for & when viewed in Visual Studio ExpressLast modified date is in the format of YYYY-MM-DDTHH:MM:SSz

With the dashes, colons, T and z

The ExperienceID does not have braces, { }

GO!

Page 18: Jon Schwarz Worldwide Business Development Manager

Customize Device InformationLoad DeviceInfo.xml in Visual Studio Express

Replace the following element values in the template with the corresponding values in the worksheet:

SET_MODELNAMESET_MANUFACTURERSET_DEVICEICON_FILENAME

Save DeviceInfo.xmlCopy the device icon file to C:\DeviceExperiencesDNP\DeviceInformation\Make sure the icon file name matches the SET_DEVICEICON_FILENAME value you entered in DeviceInfo.xml

Page 19: Jon Schwarz Worldwide Business Development Manager

Becomes…

Template

Customize as you would like, then save the file.

Editing DeviceInfo.xml

Page 20: Jon Schwarz Worldwide Business Development Manager

DeviceInfo.xml Double Check

Not a lot can go wrong here with the XML

Anything you changed will show up as text in the Devices and Printers folder

If you changed pictures, make sure you double-click to view Make sure the final icon file name matches the file name in DeviceInfo.xml including the .ico extension GO!

Page 21: Jon Schwarz Worldwide Business Development Manager

Build and Test Metadata1. Create a Metadata Package GUID:• Generate a GUID using GUIDGen• Paste it into Notepad• Delete curly {} braces• Copy remaining GUID

2. Open a command prompt (type cmd in Start menu search box)

3. Run Cabarc (Cabarc.exe must be in c:\), pasting the GUID into the command line below:c:\cabarc\bin\cabarc.exe -p -r N GUID.devicemetadata-ms *.*

75917870-AF38-48dc-97A1-F014017CAA14

C:\DeviceExperiencesDNP> c:\cabarc\bin\cabarc.exe -p -r N 75917870-AF38-48dc-97A1-F014017CAA14.devicemetadata-ms *.*

Page 22: Jon Schwarz Worldwide Business Development Manager

Step 3 DetailsGet to source directory C:\DeviceExperiencesDNPCopy cabarc command with GUID

Cabarc command success looks like this

Page 23: Jon Schwarz Worldwide Business Development Manager

Testing the Authored Experience

Cab File is Added to Your Directory

Copy GUID.devicemetadata-ms from C:\DeviceExperiencesDnP\ to:

%ProgramData%\Microsoft\Windows\DeviceMetadataStore\en-US

Plug in your device and test it.

Page 24: Jon Schwarz Worldwide Business Development Manager

What Success Looks LikeRemember this?

Page 25: Jon Schwarz Worldwide Business Development Manager

Troubleshooting Tips

If your device does not show up in the DnP folder:

Check PackageInfo.xml firstThen check DeviceInfo.xmlThen check your icon fileUse the checkpoints

Page 26: Jon Schwarz Worldwide Business Development Manager

Rebuilding the Cab File After Fixes

Go into PackageInfo.xml and increment the last modified date by adding time to the valueGet a new GUID to generate the cab file

This means you don’t have to go to the device metadata store to remove the previous file

Run the cabarc command set againTest and debugKeep trying, you’ll get there

►FAQ◄

Page 27: Jon Schwarz Worldwide Business Development Manager

Advanced Features

Developers can extend the capabilities of the Devices and Printers Folder in the following areas:

Shortcut menusProperty pages

Devices and Printers Folder - Extensibility Guide

Page 28: Jon Schwarz Worldwide Business Development Manager

Extensible Device PropertiesAdditional tabs can be registered here

for device management and

configuration purposes.

Page 29: Jon Schwarz Worldwide Business Development Manager

Double-Click Extensibility

Default Action

•Programmatic•Depends on supported device class interfaces•Extensible properties page available•Inbox control panel applications

Custom Action

•Custom software installation•For devices not using Device Stage•Binding not related to device metadata•Launch contextually

Device Stage

•XML driven•Certain supported device classes•AutoPlay replacement for portable devices•New experience for multifunction printers•Target new Windows features

Page 30: Jon Schwarz Worldwide Business Development Manager

DnP Authoring Call To ActionUnderstand the DnP Resources Roadmap

DevPrint-Metadata_Over.docx Read the authoring documentation

DevPrint-Metadata_Over.docxPlanning out what you want to do will save you time; get the marketing team on board for icons and ideasKeep the documentation handy as a resource during authoringBe creative and have fun -- you can’t “break” anything

►FAQ◄

Page 31: Jon Schwarz Worldwide Business Development Manager

SummaryAuthoring a Devices and Printers metadata experience is the richest way to help end users to find and understand the device’s capabilities and the connection to the Windows 7 PC

Photo-realistic iconsProperty extensionsDouble-click instantiation

As demonstrated in this session, it is not difficult to author if you read the documentation and proceed in a stepwise manner

Page 32: Jon Schwarz Worldwide Business Development Manager

Additional ResourcesWindows 7 Device Experiences

http://www.microsoft.com/whdc/device/DeviceExperience/default.mspx

Device Metadata Package for Devices and Printers: Resource Roadmap

http://www.microsoft.com/whdc/device/DeviceExperience/DevPrint-Metadata_Over.mspx

How to Create a Device Metadata Package for Devices and Printers

http://www.microsoft.com/whdc/device/DeviceExperience/CreateDevMetadataPkg.mspx

Devices and Printers Folder - Extensibility Guidehttp://www.microsoft.com/whdc/device/DeviceExperience/DevPrintFolder-Ext.mspx

Devices and Printers in Windows 7: Frequently Asked Questions

http://www.microsoft.com/whdc/device/deviceexperience/DevPrintFAQ.mspx

Page 33: Jon Schwarz Worldwide Business Development Manager

Feedback

For feedback on this presentation content, please contact the team at [email protected]

Page 34: Jon Schwarz Worldwide Business Development Manager

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 35: Jon Schwarz Worldwide Business Development Manager

Appendix

Page 36: Jon Schwarz Worldwide Business Development Manager

To Enable Windows Test ModeOn the Start menu, click Accessories

Right-click Command Prompt and click Run as AdministratorType the following in the command window: Bcdedit -set testsigning ON

If this does not work try the command: Bcdedit /set testsigning ON

Restart your PC and sign in to your accountYou should see this in the bottom right hand corner of your desktop

Page 37: Jon Schwarz Worldwide Business Development Manager

Viewing Hidden Files in a Directory

Sometimes the Program Data folder can’t be seen in the C:\ directory. You need to change the viewing options to view those files/folders.