WIA.DevicePropertyKeys
----------------------

Queries the property keys for the device.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WIA](component_WIA.md) | [6.5](newinversion65.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "WIA.DevicePropertyKeys"; Device ) 

**MBS**( **"WIA.DevicePropertyKeys";** /\* Queries the property keys for the device. \*/  
**$Device**) /\* You can pass index of device to check them in a row.  
Or pass name or unique ID of device.  
Pass empty string for current device.e.g. $index \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Device | You can pass index of device to check them in a row.   Or pass name or unique ID of device.   Pass empty string for current device. | $index |

### Result

Returns list or error.

### Description

Queries the property keys for the device.  
The current device (connected) may show more device properties than just the information from the registry, which you get without connection.  
Use [WIA.DeviceProperties](WIADeviceProperties.md) to query all values with keys as JSON.  
### Examples

Query properties of current device:

 MBS ( "WIA.DevicePropertyKeys"; "" )  
<small>  
Example result:   
Item Name  
Full Item Name  
Item Flags  
Unique Device ID  
Manufacturer  
Description  
Type  
Port  
Name  
Server  
Remote Device ID  
UI Class ID  
Hardware Configuration  
BaudRate  
STI Generic Capabilities  
WIA Version  
Driver Version  
PnP ID String  
STI Driver Version  
User Name  
Item Category  
Document Handling Capabilities  
Document Handling Status  
Max Scan Time  
Access Rights  
Horizontal Optical Resolution  
Vertical Optical Resolution  
Preview  
Show preview control  
Maximum Horizontal Scan Size  
Maximum Vertical Scan Size  
Minimum Vertical Scan Size  
Minimum Horizontal Scan Size  
Horizontal Bed Registration  
Vertical Bed Registration  
Page Size  
Current Intent  
Firmware Version  
Horizontal Resolution  
Vertical Resolution  
Horizontal Start Position  
Vertical Start Position  
Horizontal Extent  
Vertical Extent  
Rotation  
Orientation  
DeskewX  
DeskewY  
Brightness  
Contrast  
Item Size  
Data Type  
Bits Per Pixel  
Preferred Format  
Format  
Compression  
Photometric Interpretation  
Lamp Warm up Time  
Media Type  
Channels Per Pixel  
Bits Per Channel  
Planar  
Pixels Per Line  
Number of Lines  
Bytes Per Line  
Threshold  
Buffer Size  
Filename extension  
Sheet Feeder Registration  
Pages  
Document Handling Select  
Page Width  
Page Height</small>List properties:

 Set Variable \[$device ; Value:Get(ScriptParameter)\]  
Set Variable \[$list ; Value:MBS ("WIA.DevicePropertyKeys"; $device )\]  
If \[MBS ("IsError")\]  
 Show Custom Dialog \["Error"; $list \]  
Else  
 Set Variable \[$count ; Value:ValueCount ( $list )\]  
 If \[$count &gt; 0\]  
 Set Variable \[$i ; Value:1\]  
 Loop  
 Set Variable \[$key ; Value:GetValue ( $list ; $i )\]  
 Set Variable \[$value ; Value:MBS ("[WIA.DevicePropertyValue](WIADevicePropertyValue.md)"; $device ; $key )\]  
 New Record/Request  
 Set Field \[WIA Scan::Device ; $device \]  
 Set Field \[WIA Scan::Key ; $key \]  
 Set Field \[WIA Scan::Value ; $value \]  
 Commit Records/Requests \[No dialog\]  
 #Next  
 Set Variable \[$i ; Value:$i +1\]  
 Exit Loop If \[$i &gt; $count \]  
 End Loop  
 End If  
End If  
### See also

- [IsError](IsError.md)
- [WIA.DeviceProperties](WIADeviceProperties.md)
- [WIA.DevicePropertyValue](WIADevicePropertyValue.md)
- [WIA.SetDevicePropertyValue](WIASetDevicePropertyValue.md)

### Example Databases

- [DynaPDF/Scan with WIA to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Scan%20with%20WIA%20to%20PDF.shtml#4ScriptAnchor_)
- [Win Only/Scanning/WIA Scan](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Scanning/WIA%20Scan.shtml#4ScriptAnchor_)

This function checks for a license.

Created 6th November 2016 , last changed 9th November 2021

  
[WIA.DeviceProperties](WIADeviceProperties.md) - [WIA.DevicePropertyValue](WIADevicePropertyValue.md)

[HTML Version](WIADevicePropertyKeys.shtml)