Scan Profile Schema

The Scan Profile Schema defines an XML format that can be used to store the properties of Windows Image Acquisition (WIA) items, such as scanners and cameras. These persistent files enable applications to provide automatic scanning without requiring users to remember the property settings of the items.

Any IWiaItem2 device can have a scan profile. However, IWiaItem2 items of types WIA_CATEGORY_FINISHED_FILE and WIA_CATEGORY_ROOT cannot have profiles.

Scan profiles are created and managed through the IScanProfile, IScanProfileMgr, and IScanProfileUI interfaces. Users of your application can modify profiles in limited ways using the IScanProfileUI::ScanProfileDialog method.

All scan profiles have the following elements: <ProfileGUID>, <DeviceID>, <ProfileName>, <WiaItem>, and <Properties>. The default profile of a device also has a <Default> element.

The <ProfileGUID> element and the <DeviceID> element cannot be changed after the scan profile is created. The values of the <ProfileName> element and the <WiaItem> element can be modified. The <Default> element can be added or deleted. This can be done programatically using the IScanProfile::SetName, IScanProfile::SetItem, and IScanProfileMgr::SetDefault methods. These properties can also be changed by users through the IScanProfileUI::ScanProfileDialog method.

The <Properties> element contains <Property> children. Use these to add any WIA item or device property to the profile. You can also develop your own image acquistion <Property> children. This makes the Scan Profile Schema extensible. (For more information about extending the schema, see Defining Custom Properties, IScanProfile::GetProperty, and IScanProfile::SetProperty.)

Here is the complete Scan Profile Schema. A sample profile follows.

<?xml version="1.0"?>
<xs:schema xmlns:xs=""

<xs:element name="ScanProfile">
                        <xs:element name="ProfileGUID" type="xs:string"/>
                        <xs:element name="DeviceID" type="xs:string"/>
<xs:element name="ProfileName" type="xs:string"/>
                        <xs:element name="Default" minOccurs="0">
                        <xs:element name="WiaItem" type="xs:string"/>
                        <xs:element name="Properties" type="Properties"/>
<xs:complexType name="Properties">
            <xs:element name="Property" maxOccurs="unbounded" minOccurs="0">
                        <xs:extension base="xs:string">
                                    <xs:attribute name="id" type="xs:integer" use="required"/>
                                    <xs:attribute name="type" type="xs:integer" use="required"/>

Click Show Example to see a sample profile.

        Last used settings
        <Property id="4103" type="3">
        <Property id="4106" type="72">
        <Property id="6147" type="3">
        <Property id="6154" type="3">
        <Property id="6155" type="3">

Related topics

WIA Property Constants
Defining Custom Properties