Jump to content



Photo

Creating a device stage for your devices


  • Please log in to reply
1 reply to this topic

#1 Jimmy422

Jimmy422

    Windows Fanatic

  • Joined: 03-November 08

Posted 22 September 2009 - 02:19

What is a Device Stage?
A Device Stage is like a fancy welcome center for your devices. When you plug in a device in Windows 7 you'll either see a generic autorun screen, or if your device manufacturer made a Device Stage for that device, you'll see one of those. It's sorta like the old "Lanucher" application from Mac OS 7, but for devices, and much more fancy.

Posted Image
Eww, Autorun. Let's replace that with something like the image below.

Posted Image
Example of a Device Stage for a computer

Why would I want to make one of these?
They're downright awesome. If there's stuff you do a lot with your devices and you don't want to dig through your computer to do it, a Device Stage can manage those things in one fancy area. Plus, if your device supports it, you can see how much battery life is left, how much space is left, how much signal you have (Cell phones only?), etc.

Starting
So you want to make a device stage huh? Okay. There's going to be a few things you need first.

Windows 7 - Duh. Build 7100 and higher should work just fine.

Cabarc - Cabarc is a program used to make cabinet files. You'll end up packaging all your files in one. Get it Here. Unzip it to c:\cabarc.

GUIDGen - GUIDGen is a tool that generates these fancy numbers that you'll use to name stuff. Each one must be unique. There's about 2 to the power of 128 possible combinations of GUIDs, so the chance of having the same one is VERY VERY VERY small. Go Here to make these online.

IcoFX - IcoFX is a program used to make icons. It's the only program that seems to create working icons. Get it Here

Image Editor - Photoshop or Paint.NET work well. Plain ol' Windows Paint is not reccomended.

Okay, so now that you've got all your programs, now you need to configure your machine to boot in test mode.

This is the only drawback to making these - they have to be digitally signed or else they're rejected. It's really stupid that Microsoft is putting it under lock and key. That's where test mode comes in. Test mode is no different than regular operation - except you just get an extra watermark on the right bottom corner, and any digitally unsigned driver/package can be installed. Until someone figures out a way to bypass the signing, you have to do this.

Open the start menu and type in "cmd". (Without quotes). Don't click it yet.

Right click the cmd program and choose "Run as Administrator". Accept the UAC prompt.

When the command prompt comes up type in the following:
Bcdedit -set testsigning ON
Restart your computer.


Now you're ready to start!

Setting up the project
Microsoft explains in their long tutorial how to set up folders and such, and they have a pretty good way of doing it. Open up your C drive, and create a new folder in it called "DeviceExperiences". Inside that folder, create a new folder for the device you're creating. In this tutorial, we'll be making it for my camera. So i'll name it "Cannon-a590is.en-US". That's "Brand-model.languagecode".

Creating PackageInfo.xml
PackageInfo.xml is the first file we'll work with. It defines what device this device stage is for. Open up notepad and copy the below code into it:
<?xml version="1.0" encoding="utf-8" ?>
<PackageInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">

	<MetadataKey>
		<HardwareIDList>
		<HardwareID>DOID:PUT_YER_HARDWAREID_HERE</HardwareID>
			  <HardwareID>DOID:PUT_YER_OTHER_HARDWAREID_HERE</HardwareID>
		</HardwareIDList>

		<Locale default="false">en-US</Locale>
		<LastModifiedDate>PUT_A_SPECIALLY_FORMATTED_DATE_HERE</LastModifiedDate>
	</MetadataKey>

	<PackageStructure>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">PackageInfo.xml</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">DeviceInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/WindowsInfo/2007/11/">WindowsInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceStage/2008/1/">DeviceStage</Metadata>
	</PackageStructure>

	<Relationships>
		<ExperienceID>GENERATE_A_GUID_AND_PASTE_IT_HERE</ExperienceID>
	</Relationships>

</PackageInfo>

Now let's start with the HardwareID. It's what defines what your device is. Open the start menu and type in "Device Manager". Open it. Plug in your device and find it in the Device Manager. Right click it and open its properties. Click on the Details tab. Open the Property list and go down to "Hardwareids".
Posted Image

Right click both of them and copy them to notepad. (Note: If you have only 1 HardwareID, just use that one and delete the second hardwareID line in the XML) You want to edit them to be formatted for XML (& = &amp;). So the above would look like this:
USB\VID_04A9&amp;PID_3176&amp;REV_0002
USB\VID_04A9&amp;PID_3176

Now paste those into your template, keeping the "DOID:" in front of it. It should look like this now:
<?xml version="1.0" encoding="utf-8" ?>
<PackageInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">

	<MetadataKey>
		<HardwareIDList>
		<HardwareID>DOID:USB\VID_04A9&amp;PID_3176&amp;REV_0002</HardwareID>
			  <HardwareID>DOID:USB\VID_04A9&amp;PID_3176</HardwareID>
		</HardwareIDList>

		<Locale default="false">en-US</Locale>
		<LastModifiedDate>PUT_A_SPECIALLY_FORMATTED_DATE_HERE</LastModifiedDate>
	</MetadataKey>

	<PackageStructure>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">PackageInfo.xml</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">DeviceInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/WindowsInfo/2007/11/">WindowsInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceStage/2008/1/">DeviceStage</Metadata>
	</PackageStructure>

	<Relationships>
		<ExperienceID>GENERATE_A_GUID_AND_PASTE_IT_HERE</ExperienceID>
	</Relationships>

</PackageInfo>

(Or if you have only 1 hardwareID, it would look like this:)
<?xml version="1.0" encoding="utf-8" ?>
<PackageInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">

	<MetadataKey>
		<HardwareIDList>
		<HardwareID>DOID:USB\VID_04A9&amp;PID_3176&amp;REV_0002</HardwareID>
		</HardwareIDList>

		<Locale default="false">en-US</Locale>
		<LastModifiedDate>PUT_A_SPECIALLY_FORMATTED_DATE_HERE</LastModifiedDate>
	</MetadataKey>

	<PackageStructure>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">PackageInfo.xml</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">DeviceInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/WindowsInfo/2007/11/">WindowsInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceStage/2008/1/">DeviceStage</Metadata>
	</PackageStructure>

	<Relationships>
		<ExperienceID>GENERATE_A_GUID_AND_PASTE_IT_HERE</ExperienceID>
	</Relationships>

</PackageInfo>

The specially formatted date works like this:
YYYY-MM-DDTHH:MM:SSz
So it would look like this:
2009-07-28T12:00:00z

For the GUID, just generate one in GUIDGen and paste it in there.

Your XML should look like this finished:
<?xml version="1.0" encoding="utf-8" ?>
<PackageInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">

	<MetadataKey>
		<HardwareIDList>
		<HardwareID>DOID:USB\VID_04A9&amp;PID_3176&amp;REV_0002</HardwareID>
			  <HardwareID>DOID:USB\VID_04A9&amp;PID_3176</HardwareID>
		</HardwareIDList>

		<Locale default="false">en-US</Locale>
		<LastModifiedDate>2009-07-28T12:00:00z</LastModifiedDate>
	</MetadataKey>

	<PackageStructure>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/PackageInfo/2007/11/">PackageInfo.xml</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">DeviceInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/WindowsInfo/2007/11/">WindowsInformation</Metadata>
		<Metadata MetadataID="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceStage/2008/1/">DeviceStage</Metadata>
	</PackageStructure>

	<Relationships>
		<ExperienceID>7aaf3c13-90f9-49a9-ad37-717b22fb9a18</ExperienceID>
	</Relationships>

</PackageInfo>

Now, "Save as" this in notepad as "PackageInfo.xml (Changing the file type to all files, first. Then change the Encoding to "UTF-8".). Save this in C:\DeviceExperiences\yourdevice.en-us\. Congrats, you've finished the first file!


Creating DeviceInfo.xml
DeviceInfo.xml tells Windows what type of device it is, what model it is, what it does, etc. Open up notepad again and copy the code below into it:
<?xml version="1.0" encoding="utf-8" ?>
<DeviceInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">

  <DeviceCategoryList>
	<DeviceCategory>TYPE_OF_DEVICE</DeviceCategory>
  </DeviceCategoryList>

  <ModelName>MODEL_NAME</ModelName>
  <DeviceDescription1>FANCY_DESCRIPTION_1</DeviceDescription1>
  <DeviceDescription2>FANCY_DESCRIPTION_2</DeviceDescription2>
  <ModelNumber>MODEL_NUMBER</ModelNumber>
  <Manufacturer>WHO_MADE_YOUR_DEVICE</Manufacturer>

  <DeviceIconFile>YOUR_ICON_HERE.ico</DeviceIconFile>

</DeviceInfo>

Fun. Let's start with type of device. It can be a LOT of things.
<xs:enumeration value="Audio" />
	 <xs:enumeration value="Audio.Adapter" />
	 <xs:enumeration value="Audio.Headphone" />
	 <xs:enumeration value="Audio.Microphone" />
	 <xs:enumeration value="Audio.Speakerphone" />
	 <xs:enumeration value="Audio.Speakers" />
	 <xs:enumeration value="Audio.Speakers.USB" />
	 <xs:enumeration value="Audio.Speakers.Wireless" />
	 <xs:enumeration value="Communication" />
	 <xs:enumeration value="Communication.Headset" />
	 <xs:enumeration value="Communication.Headset.Bluetooth" />
	 <xs:enumeration value="Communication.Phone" />
	 <xs:enumeration value="Communication.Phone.Cell" />
	 <xs:enumeration value="Communication.Phone.IP" />
	 <xs:enumeration value="Communication.Phone.Speaker" />
	 <xs:enumeration value="Component" />
	 <xs:enumeration value="Component.AudioAdapter" />
	 <xs:enumeration value="Component.Battery" />
	 <xs:enumeration value="Component.Bridge" />
	 <xs:enumeration value="Component.Bridge.Network" />
	 <xs:enumeration value="Component.Bridge.Storage" />
	 <xs:enumeration value="Component.Cable" />
	 <xs:enumeration value="Component.Cable.Transfer" />
	 <xs:enumeration value="Component.Cable.Transfer.USB" />
	 <xs:enumeration value="Component.Capture" />
	 <xs:enumeration value="Component.Capture.Video" />
	 <xs:enumeration value="Component.Controller" />
	 <xs:enumeration value="Component.Controller.1394" />
	 <xs:enumeration value="Component.Controller.Bluetooth" />
	 <xs:enumeration value="Component.Controller.CardBus" />
	 <xs:enumeration value="Component.Controller.IR" />
	 <xs:enumeration value="Component.Controller.IR.MCE" />
	 <xs:enumeration value="Component.Controller.SDH" />
	 <xs:enumeration value="Component.Controller.Serial" />
	 <xs:enumeration value="Component.Controller.Storage" />
	 <xs:enumeration value="Component.Controller.Storage.IDE" />
	 <xs:enumeration value="Component.Controller.Storage.iSCSI" />
	 <xs:enumeration value="Component.Controller.Storage.Raid" />
	 <xs:enumeration value="Component.Controller.Storage.SATA" />
	 <xs:enumeration value="Component.Controller.Storage.SCSI" />
	 <xs:enumeration value="Component.Controller.USB" />
	 <xs:enumeration value="Component.Controller.WUSB" />
	 <xs:enumeration value="Component.GraphicsCard" />
	 <xs:enumeration value="Component.Hub" />
	 <xs:enumeration value="Component.Hub.1394" />
	 <xs:enumeration value="Component.Hub.USB" />
	 <xs:enumeration value="Component.KVM" />
	 <xs:enumeration value="Component.NIC" />
	 <xs:enumeration value="Component.SmartCardReader" />
	 <xs:enumeration value="Component.System" />
	 <xs:enumeration value="Component.System.Board" />
	 <xs:enumeration value="Component.System.Memory" />
	 <xs:enumeration value="Component.System.Processor" />
	 <xs:enumeration value="Component.Tuner" />
	 <xs:enumeration value="Component.Tuner.Radio" />
	 <xs:enumeration value="Component.Tuner.TV" />
	 <xs:enumeration value="Component.Tuner.TV.ATSC" />
	 <xs:enumeration value="Component.Tuner.TV.DCB-S" />
	 <xs:enumeration value="Component.Tuner.TV.DVB-C" />
	 <xs:enumeration value="Component.Tuner.TV.DVB-T" />
	 <xs:enumeration value="Component.Tuner.TV.ISDB-T" />
	 <xs:enumeration value="Component.Tuner.TV.NTSC" />
	 <xs:enumeration value="Component.Tuner.TV.NTSCMJ" />
	 <xs:enumeration value="Component.Tuner.TV.OpenCable" />
	 <xs:enumeration value="Component.Tuner.TV.PAL" />
	 <xs:enumeration value="Component.Tuner.TV.Proprietry" />
	 <xs:enumeration value="Component.Tuner.TV.QAM" />
	 <xs:enumeration value="Component.Tuner.TV.SECAM" />
	 <xs:enumeration value="Computer" />
	 <xs:enumeration value="Computer.AllInOne" />
	 <xs:enumeration value="Computer.Desktop" />
	 <xs:enumeration value="Computer.Desktop.LowProfile" />
	 <xs:enumeration value="Computer.Desktop.Pizzabox" />
	 <xs:enumeration value="Computer.Handheld" />
	 <xs:enumeration value="Computer.Handheld.Windows" />
	 <xs:enumeration value="Computer.Laptop" />
	 <xs:enumeration value="Computer.Lunchbox" />
	 <xs:enumeration value="Computer.Netbook" />
	 <xs:enumeration value="Computer.Notebook" />
	 <xs:enumeration value="Computer.Notebook.Sub" />
	 <xs:enumeration value="Computer.Portable" />
	 <xs:enumeration value="Computer.Rackmount" />
	 <xs:enumeration value="Computer.Sealed" />
	 <xs:enumeration value="Computer.Server" />
	 <xs:enumeration value="Computer.SpaceSaving" />
	 <xs:enumeration value="Computer.Tablet" />
	 <xs:enumeration value="Computer.ThinClient" />
	 <xs:enumeration value="Computer.Tower" />
	 <xs:enumeration value="Computer.Tower.Mini" />
	 <xs:enumeration value="Display" />
	 <xs:enumeration value="Display.Monitor" />
	 <xs:enumeration value="Display.Monitor.CRT" />
	 <xs:enumeration value="Display.Monitor.LCD" />
	 <xs:enumeration value="Display.Monitor.Plasma" />
	 <xs:enumeration value="Display.PictureFrame" />
	 <xs:enumeration value="Display.Projector" />
	 <xs:enumeration value="Display.SideShow" />
	 <xs:enumeration value="Display.TV" />
	 <xs:enumeration value="Display.TV.CRT" />
	 <xs:enumeration value="Display.TV.DLP" />
	 <xs:enumeration value="Display.TV.LCD" />
	 <xs:enumeration value="Display.TV.Plasma" />
	 <xs:enumeration value="Health" />
	 <xs:enumeration value="Health.BloodGlucose" />
	 <xs:enumeration value="Health.BloodPressure" />
	 <xs:enumeration value="Health.HeartRate" />
	 <xs:enumeration value="Health.Pedometer" />
	 <xs:enumeration value="Imaging" />
	 <xs:enumeration value="Imaging.Camcorder" />
	 <xs:enumeration value="Imaging.Camera" />
	 <xs:enumeration value="Imaging.Scanner" />
	 <xs:enumeration value="Imaging.Webcam" />
	 <xs:enumeration value="Input" />
	 <xs:enumeration value="Input.Digitizer" />
	 <xs:enumeration value="Input.Digitizer.Multitouch" />
	 <xs:enumeration value="Input.Digitizer.Pen" />
	 <xs:enumeration value="Input.Digitizer.Touchpad" />
	 <xs:enumeration value="Input.Digitizer.Touchscreen" />
	 <xs:enumeration value="Input.Gaming" />
	 <xs:enumeration value="Input.Gaming.Common" />
	 <xs:enumeration value="Input.Gaming.Controller" />
	 <xs:enumeration value="Input.Gaming.Gamepad" />
	 <xs:enumeration value="Input.Gaming.Generic" />
	 <xs:enumeration value="Input.Gaming.Steering" />
	 <xs:enumeration value="Input.Keyboard" />
	 <xs:enumeration value="Input.KVM" />
	 <xs:enumeration value="Input.Mouse" />
	 <xs:enumeration value="Input.Remote" />
	 <xs:enumeration value="Input.Remote.MCE" />
	 <xs:enumeration value="Input.Trackball" />
	 <xs:enumeration value="Media" />
	 <xs:enumeration value="Media.SmartCard" />
	 <xs:enumeration value="Media.Storage" />
	 <xs:enumeration value="Media.Storage.Flash" />
	 <xs:enumeration value="Media.Storage.Flash.CompactFlash" />
	 <xs:enumeration value="Media.Storage.Flash.MemoryStick" />
	 <xs:enumeration value="Media.Storage.Flash.SD" />
	 <xs:enumeration value="Media.Storage.Optical" />
	 <xs:enumeration value="Media.Storage.Optical.BluRay" />
	 <xs:enumeration value="Media.Storage.Optical.CD" />
	 <xs:enumeration value="Media.Storage.Optical.DVD" />
	 <xs:enumeration value="Multimedia" />
	 <xs:enumeration value="Multimedia.DMC" />
	 <xs:enumeration value="Multimedia.DMP" />
	 <xs:enumeration value="Multimedia.DMR" />
	 <xs:enumeration value="Multimedia.DMR.MCE" />
	 <xs:enumeration value="Multimedia.DMS" />
	 <xs:enumeration value="Multimedia.DVR" />
	 <xs:enumeration value="Multimedia.GameConsole" />
	 <xs:enumeration value="Multimedia.PMP" />
	 <xs:enumeration value="Multimedia.VoiceRecorder" />
	 <xs:enumeration value="Network" />
	 <xs:enumeration value="Network.AccessPoint" />
	 <xs:enumeration value="Network.Bluetooth" />
	 <xs:enumeration value="Network.Bridge" />
	 <xs:enumeration value="Network.Bridge.Wifi2Ether" />
	 <xs:enumeration value="Network.HomeAutomation" />
	 <xs:enumeration value="Network.MobileBroadband" />
	 <xs:enumeration value="Network.Modem" />
	 <xs:enumeration value="Network.NIC" />
	 <xs:enumeration value="Network.NIC.Ethernet" />
	 <xs:enumeration value="Network.NIC.IR" />
	 <xs:enumeration value="Network.NIC.PLC" />
	 <xs:enumeration value="Network.NIC.Wireless" />
	 <xs:enumeration value="Network.PrintServer" />
	 <xs:enumeration value="Network.Router" />
	 <xs:enumeration value="Network.Router.Wireless" />
	 <xs:enumeration value="Network.Switch" />
	 <xs:enumeration value="Network.UWB" />
	 <xs:enumeration value="Network.WUSB" />
	 <xs:enumeration value="Network.WUSB.DWA" />
	 <xs:enumeration value="PersonalIdentity" />
	 <xs:enumeration value="PersonalIdentity.FaceScanner" />
	 <xs:enumeration value="PersonalIdentity.FingerprintReader" />
	 <xs:enumeration value="PersonalIdentity.RetinalScanner" />
	 <xs:enumeration value="PersonalIdentity.Smartcard" />
	 <xs:enumeration value="PersonalIdentity.SmartcardReader" />
	 <xs:enumeration value="PrintFax" />
	 <xs:enumeration value="PrintFax.FAX" />
	 <xs:enumeration value="PrintFax.MFP" />
	 <xs:enumeration value="PrintFax.Printer" />
	 <xs:enumeration value="PrintFax.Printer.Inkjet" />
	 <xs:enumeration value="PrintFax.Printer.Laser" />
	 <xs:enumeration value="Sensor" />
	 <xs:enumeration value="Sensor.Electrical" />
	 <xs:enumeration value="Sensor.Enviromental" />
	 <xs:enumeration value="Sensor.Enviromental.Temp" />
	 <xs:enumeration value="Sensor.Light" />
	 <xs:enumeration value="Sensor.Location" />
	 <xs:enumeration value="Sensor.Location.GPS" />
	 <xs:enumeration value="Sensor.Mechanical" />
	 <xs:enumeration value="Sensor.Motion" />
	 <xs:enumeration value="Sensor.Orientation" />
	 <xs:enumeration value="Sensor.Proximity" />
	 <xs:enumeration value="Sensor.Proximity.NFC" />
	 <xs:enumeration value="Sensor.Proximity.RFID" />
	 <xs:enumeration value="Storage" />
	 <xs:enumeration value="Storage.CardReader" />
	 <xs:enumeration value="Storage.CardReader.Combo" />
	 <xs:enumeration value="Storage.Changer" />
	 <xs:enumeration value="Storage.Changer.Optical" />
	 <xs:enumeration value="Storage.FDD" />
	 <xs:enumeration value="Storage.HDD" />
	 <xs:enumeration value="Storage.HDD.SolidState" />
	 <xs:enumeration value="Storage.Network" />
	 <xs:enumeration value="Storage.Network.Wireless" />
	 <xs:enumeration value="Storage.Optical" />
	 <xs:enumeration value="Storage.Optical.Bluray" />
	 <xs:enumeration value="Storage.Optical.CD" />
	 <xs:enumeration value="Storage.Optical.DVD" />
	 <xs:enumeration value="Storage.Tape" />
	 <xs:enumeration value="Storage.UFD" />
	 <xs:enumeration value="Other" />

Wow. Let's just go with "Imaging.Camera". Code should now look like this:
<?xml version="1.0" encoding="utf-8" ?>
<DeviceInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">

  <DeviceCategoryList>
	<DeviceCategory>Imaging.Camera</DeviceCategory>
  </DeviceCategoryList>

  <ModelName>MODEL_NAME</ModelName>
  <DeviceDescription1>FANCY_DESCRIPTION_1</DeviceDescription1>
  <DeviceDescription2>FANCY_DESCRIPTION_2</DeviceDescription2>
  <ModelNumber>MODEL_NUMBER</ModelNumber>
  <Manufacturer>WHO_MADE_YOUR_DEVICE</Manufacturer>

  <DeviceIconFile>YOUR_ICON_HERE.ico</DeviceIconFile>

</DeviceInfo>

Everything else is really self-explanitory. Fancy descriptions are like "3MP camera with 4X digital zoom and WiFi". You get the idea.

Your device icon should be created in IcoFX. I'm not going to go into detail with this, all i can say is that you need to have the sizes of 256x256x32, 48x48x32 32x32x32, 24x24x32, 16x16x32, 48x48x8 32x32x8, 24x24x8, 16x16x8, 48x48x4 32x32x4, 24x24x4, and 16x16x4 in your icon. It's easier to do than it sounds. Save it in c:\DeviceExperiences\Yourdevice.language\DeviceInformation. (Create the DeviceInformation folder if you haven't done so already.)

Your code should look like this when finished:

<?xml version="1.0" encoding="utf-8" ?>
<DeviceInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/DeviceInfo/2007/11/">

  <DeviceCategoryList>
	<DeviceCategory>Imaging.Camera</DeviceCategory>
  </DeviceCategoryList>

  <ModelName>PowerShot</ModelName>
  <DeviceDescription1>Camera with 8.0MP and 4x digital zoom</DeviceDescription1>
  <DeviceDescription2>Shoots in both 4:3 and 16:9 widescreen</DeviceDescription2>
  <ModelNumber>a590is</ModelNumber>
  <Manufacturer>Canon</Manufacturer>

  <DeviceIconFile>a590is.ico</DeviceIconFile>

</DeviceInfo>

Now, save your code as "DeviceInfo.xml" using the same steps as before, but this time in c:\DeviceExperiences\Yourdevice.en-us\DeviceInformation. Viola.

[highlight]SKIP DOWN TO PACKAGING AND TESTING IF ALL YOU WANT IS A CUSTOM ICON[/highlight]

Behavior.XML and Resource.XML

Here's the hard part - making the actual "Device Stage". The Device Stage is composed of a lot of elements. Here's a fancy diagram:
Posted Image

Complicated? Not really. Let's start with the graphics you'll need. Open up your image editor and create 6 images. All images are in the .png format.

Two will be 1213x270 - the watermark and the background. The watermark must be a transparent image. Call the background "sample_background" and the watermark "sample_watermark".

One will be 300x300 - that'll be the image that shows up in the taskbar. It's transparent too. Call it "sample_launcher".

Another two will be 150x50 - the logos. They are transparent too. Call them "sample_logo1" and "sample_logo2", respectively.

And finally, the last one can be anything under 500x500. This will be the "Hero" image. Call it "sample_hero_device".

Save all these images when you've created them in c:\DeviceExperiences\yourdevice.en-us\DeviceStage\Device\en-us (Create the DeviceStage, Device, and en-us folders if you haven't done so already.)

Now for the XML. Open up notepad and paste the following code in:
<?xml version="1.0" encoding="utf-8"?>
<deviceBehavior xmlns="http://schemas.microsoft.com/windows/2008/deviceExperienceBehavior" experienceId="{GUID_FROM_PACKAGEINFO_XML}">

  <header watermarkAlign="left" backgroundColor="#FF000000" textColor="#FFFFFFFF" backgroundImage="sample_background.png" watermarkImage="sample_watermark.png" sheen="False">

	<modelInfo image="sample_hero_device.png" launcherThumbnail="sample_launcher.png" />

	<logos split="horizontal">
	  <logo halign="right" valign="middle" image="sample_logo1.png" url="URL_FOR_FIRST_LOGO" tooltip="TOOLTIP1" />
	  <logo halign="right" valign="middle" image="sample_logo2.png" url="URL_FOR_SECOND_LOGO" tooltip="TOOLTIP2" />
	</logos>

	<marketingBullets>
	  <bullet id="BULLET1" />
	  <bullet id="BULLET2" />
	  <bullet id="BULLET3" />
	</marketingBullets>
  </header>

  <appearance textColor="#FF000000" descriptionColor="#FF727272" frameColor="#FF0B346B" backgroundColor="#FFFDFDFD" sheen="false" />

  <statusItems statusPropList="prop:System.Devices.NewPictures;System.Devices.StorageFreeSpacePercent;" statusProvider="{c2dae44d-c850-425c-b466-d8cbc1469f5d}">

	<statusLinks>
	  <statusLink statusProp="System.Devices.StorageFreeSpacePercent" taskId="{29e7ef4e-b212-4bf9-b95b-1e073fba48e8}" />
	  <statusLink statusProp="System.Devices.NewPictures" taskId="{d5c93de7-5ac4-4698-acea-d9a02385cd04}" />
	</statusLinks>

  </statusItems>

  <taskCategoryMapping>


	<!-- DEFAULT WINDOWS 7 TASKS -->

	<!-- Windows 7 Task Copy your pictures and videos -->
	<taskRef taskGroupGuid="{07deb856-fc6e-4fb9-8add-d8f2cf8722c9}" taskId="{d5c93de7-5ac4-4698-acea-d9a02385cd04}" />

	<!-- Windows 7 Task Browse device storage -->
	<taskRef taskGroupGuid="{07deb856-fc6e-4fb9-8add-d8f2cf8722c9}" taskId="{29e7ef4e-b212-4bf9-b95b-1e073fba48e8}" />

	<!-- Windows 7 Change settings -->
	<taskRef taskGroupGuid="{07deb856-fc6e-4fb9-8add-d8f2cf8722c9}" taskId="{c463887e-0db9-46b9-8c73-9de665d0a62b}" />

  </taskCategoryMapping>
</deviceBehavior>

Replace the GUID_FROM_PACKAGEINFO_XML with the "ExperienceID" from packageinfo.xml you entered earlier. Keep the {} brackets.

Replace the URL_FOR_X_LOGO with the URLs of your choice. If the first logo was a microsoft logo, you'd want it to be http://www.microsoft.com.

StatusItems and StatusLinks aren't easy to explain without a lengthy chart. If for some reason you don't want to see free space or your device doesn't support it, replace the <statusitems> section with this:

<statusItems statusProvider="{c2dae44d-c850-425c-b466-d8cbc1469f5d}">

	<statusLinks>
	</statusLinks>

  </statusItems>
Here's how it looks finished:
<?xml version="1.0" encoding="utf-8"?>
<deviceBehavior xmlns="http://schemas.microsoft.com/windows/2008/deviceExperienceBehavior" experienceId="{7aaf3c13-90f9-49a9-ad37-717b22fb9a18}">

  <header watermarkAlign="left" backgroundColor="#FF000000" textColor="#FFFFFFFF" backgroundImage="sample_background.png" watermarkImage="sample_watermark.png" sheen="False">

	<modelInfo image="sample_hero_device.png" launcherThumbnail="sample_launcher.png" />

	<logos split="horizontal">
	  <logo halign="right" valign="middle" image="sample_logo1.png" url="http://www.canon.com" tooltip="TOOLTIP1" />
	  <logo halign="right" valign="middle" image="sample_logo2.png" url="http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&amp;fcategoryid=221&amp;modelid=16336" tooltip="TOOLTIP2" />
	</logos>

	<marketingBullets>
	  <bullet id="BULLET1" />
	  <bullet id="BULLET2" />
	  <bullet id="BULLET3" />
	</marketingBullets>
  </header>

  <appearance textColor="#FF000000" descriptionColor="#FF727272" frameColor="#FF0B346B" backgroundColor="#FFFDFDFD" sheen="false" />

  <statusItems statusPropList="prop:System.Devices.NewPictures;System.Devices.StorageFreeSpacePercent;" statusProvider="{c2dae44d-c850-425c-b466-d8cbc1469f5d}">

	<statusLinks>
	  <statusLink statusProp="System.Devices.StorageFreeSpacePercent" taskId="{29e7ef4e-b212-4bf9-b95b-1e073fba48e8}" />
	  <statusLink statusProp="System.Devices.NewPictures" taskId="{d5c93de7-5ac4-4698-acea-d9a02385cd04}" />
	</statusLinks>

  </statusItems>

  <taskCategoryMapping>


	<!-- DEFAULT WINDOWS 7 TASKS -->

	<!-- Windows 7 Task Copy your pictures and videos -->
	<taskRef taskGroupGuid="{07deb856-fc6e-4fb9-8add-d8f2cf8722c9}" taskId="{d5c93de7-5ac4-4698-acea-d9a02385cd04}" />

	<!-- Windows 7 Task Browse device storage -->
	<taskRef taskGroupGuid="{07deb856-fc6e-4fb9-8add-d8f2cf8722c9}" taskId="{29e7ef4e-b212-4bf9-b95b-1e073fba48e8}" />

	<!-- Windows 7 Change settings -->
	<taskRef taskGroupGuid="{07deb856-fc6e-4fb9-8add-d8f2cf8722c9}" taskId="{c463887e-0db9-46b9-8c73-9de665d0a62b}" />

  </taskCategoryMapping>
</deviceBehavior>

Save as behavior.xml using the steps you used before. Save in c:\DeviceExperiences\yourdevice.en-us\DeviceStage\Device\en-us.

Two more to go! Open up notepad and paste the following code in:
<?xml version="1.0" encoding="UTF-8"?>
<stringTable xmlns="http://schemas.microsoft.com/windows/2008/deviceExperienceResources">
  <string id="TOOLTIP1">LOGO_1_TOOLTIP</string>
  <string id="TOOLTIP2">LOGO_2_TOOLTIP</string>
  <string id="BULLET1">FANCY_BULLETED_ITEM_1</string>
  <string id="BULLET2">FANCY_BULLETED_ITEM_2</string>
  <string id="BULLET3">FANCY_BULLETED_ITEM_3</string>
</stringTable>

The tooltips are what appear when you hover over the logos.

The bullets are what appear when your device isn't plugged in or when statuses aren't available.

Finished code:
<?xml version="1.0" encoding="UTF-8"?>
<stringTable xmlns="http://schemas.microsoft.com/windows/2008/deviceExperienceResources">
  <string id="TOOLTIP1">Visit Canon</string>
  <string id="TOOLTIP2">Visit the A590is Website</string>
  <string id="BULLET1">8 Megapixel camera with 4x digital zoom</string>
  <string id="BULLET2">Shoots in both 4:3 and 16:9 widescreen</string>
  <string id="BULLET3">Face detection for taking pictures</string>
</stringTable>

Save as resource.xml using the steps used before, and save it in c:\DeviceExperiences\yourdevice.en-us\DeviceStage\Device\en-us.

WindowsInformation.xml

Last one! Open up notepad and paste the following code in:
<?xml version="1.0" encoding="utf-8" ?>
<WindowsInfo xmlns="http://schemas.microsoft.com/windows/DeviceMetadata/WindowsInfo/2007/11/">
  <ShowDeviceInDisconnectedState>true</ShowDeviceInDisconnectedState>
  <LaunchDeviceStageOnDeviceConnect>true</LaunchDeviceStageOnDeviceConnect>
  <LaunchDeviceStageFromExplorer>true</LaunchDeviceStageFromExplorer>
</WindowsInfo>
Don't even touch this. Save it as WindowsInfo.xml using the steps used before, and save it in c:\DeviceExperiences\yourdevice.en-us\WindowsInformation (Create the WindowsInfo folder if you haven't done so already.)

Done! Woot! Now to package it up.

Packaging and testing

Alright, now to package it. First of all we need another GUID. Go to guidgen.com and get a new guid. Paste it into notepad. Select only the text and copy it again. You'll need this shortly.

Open the start menu and type in "cmd". (Without quotes). Don't click it yet.

Right click the cmd program and choose "Run as Administrator". Accept the UAC prompt.

Type in the following and press enter.
cd c:\deviceexperiences\yourdevice.en-us
Where yourdevice.en-us is the name of your folder.

Now, type in the following [highlight]BUT DO NOT PRESS ENTER[/highlight]:
c:\cabarc\bin\cabarc.exe -p -r N
Now, right click anywhere in the command prompt window and click paste. The GUID should appear after the code. Make sure there is a space after the N in the above command.

Add to that code
c:\cabarc\bin\cabarc.exe -p -r N YOUR_GUID_HERE.devicemetadata-ms *.*

So it would look something like this
c:\cabarc\bin\cabarc.exe -p -r N 07deb856-fc6e-4fb9-8add-d8f2cf8722c9.devicemetadata-ms *.*

Press enter. It should package it. If not, you're doing it wrong.

Now, take that package (Which will be in c:\DeviceExperiences\yourdevice.en-us) and copy it to %programdata%\Microsoft\Windows\DeviceMetadataStore\en-us. Viola. Plug in your device and you should se its icon pop up at the bottom.

F.A.Q

It's not showing up! (And I'm in Great Britain or some other country outside the US!)
Probably because this tutorial is designed for people in the US, since i don't know the other locale codes. Replace en-us with your designated locale code and try again. (I think Great Britain is en-GB).


It's not showing up! (And I'm in the US or I set my locale!)
Uhoh. I dunno. Make sure it packaged right. If it says no tasks found when you open it through Devices & Printers, PM me your behavior.xml.


Can I add my own tasks?
Yeah, i'll add this tomorrow.

Yes this is a repost, but the old one was in the other section and i've added to it since.


#2 WizardCM

WizardCM

    Matt

  • Joined: 06-March 09
  • Location: Melbourne, AUS
  • OS: Windows 8.1 Pro x64

Posted 22 September 2009 - 06:44

An awesome and easy-to-follow tutorial. I have a question though, how would I make one for my computer like in the screenshot below?
Posted Image


Would also be awesome if someone could create a program that did this step-by-step. :D