POSDM Commands

POSDM Commands

POSDM has the following commands.

Command Description Syntax and Examples
adddevice Adds a physical non-Plug and Play device. posdm [general switches] adddevice pathfilter [/info]

where path is a hardware path of the physical device,

filter is one or more of the following:

/type:devicetype

/soname:soname

and

/info is an optional switch that displays all device properties

Example:

posdm adddevice COM3 /soname:MsrSimulator

This adds a device with the hardware path COM3 to the MsrSimulator service object.

addname Adds a logical name to a device. This allows multiple applications to reference a device without interfering with each other. posdm [general switches] addname devicenamefilter

where devicename is the logical name to give to the device, and filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

Example:

posdm addname MainMSR /type:MSR /path:COM3

This adds the logical name MainMSR for the MSR device on the COM3 hardware path.

posdm addnameBackupMSR /name:MainMSR

This adds the logical name BackupMSR for the device named MainMSR.

addproperty Adds a configuration property to a device. posdm [general switches] addproperty propertynamevalue filter [/info]

where propertyname is the name of the property and value is the initial value for that property, and filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

/info is an optional switch that displays all device properties

Example:

posdm addpropertyPrintSpecialGreeting"Happy New Year!" /name:MainMSR

This adds the PrintSpecialGreeting property with the value of "Happy New Year!" to the device named MainMSR.

deletedevice Deletes a physical non-Plug and Play device. posdm [general switches] deletedevice [path]filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

Example:

posdm deletedevice COM3 /type:Msr

This deletes the MSR device on COM3.

Only devices previously added by the adddevice command can be deleted.

deletename Deletes a logical name from a device's list of names. posdm [general switches] deletename devicenamefilter [/info]

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

and

/info is an optional switch that displays all device properties

Example:

posdm deletename "Main Scanner" /type:Scanner /path:COM3

This deletes the logical name Main Scanner for the scanner device on the COM3 path.

Only logical names previously added by the addname command can be deleted.

deleteproperty Deletes a configuration property from a device. posdm [general switches] deleteproperty propertyname filter [/info]

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

and

/info is an optional switch that displays all device properties

posdm deletepropertyPrintSpecialGreeting /name:MainMSR

This deletes the PrintSpecialGreeting property from the device named MainMSR.

Only configuration properties previously added by the addproperty command can be deleted.

disable Prevents a service object from running for a physical POS device. posdm [general switches] disable filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

Example:

posdm disable /name:ReceiptPrn

This prevents a service object from running for a device named ReceiptPrn. As a result, applications will not see the device in the list of available POS devices.

enable Permits a service object to run for a physical POS device. posdm [general switches] enable filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

Example:

posdm enable /type:MSR

This permits a service object to run for all MSR devices.

info Displays information about the device, including its configuration properties. posdm [general switches] info filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

Example:

posdm info /name:MSR1

This command displays information about a device with the logical name “MSR1.”

listdevices Lists the physical POS devices. posdm [general switches] listdevices [/type:devicetype]

where the optional /type:devicetype switch narrows the list to a particular type of device.

Examples:

posdm listdevices

This displays a list of all physical POS devices installed on the local machine.

posdm listdevices /type:MSR

This displays a list of all MSR devices installed on the local machine.

posdm /machine:Center10 /username:JohnDoe3 /password:B$tg59ce listdevices

This lists all physical POS devices installed on the machine named Center10, after logging in with username and password credentials.

listnames Lists the logical names associated with POS devices. posdm [general switches] listnames filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

Example:

posdm listnames /type:MSR /path:COM3

This displays a list of names associated with the MSR device on COM3.

listprops Lists the configuration properties associated with a POS device and their values. posdm [general switches] listprops filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

Example:

posdm listprops /type:MSR /path:COM3

This displays a list of property names and values associated with the MSR device on COM3.

listsos Lists the POS service objects on the target machine. posdm [general switches] listsos [/type:devicetype]

where the optional /type:devicetype switch narrows the list to a particular type of device.

Examples:

posdm /output:a:\solist.txt listsos

This writes a list of all service objects installed on the local machine to a file named solist.txt on the A drive.

posdm listsos /type:MSR

This displays a list of all service objects associated with MSR devices on the local machine.

posdm /machine:Center10 /username:JohnDoe3 /password:B$tg59ce listsos

This lists all service objects on the machine named Center10, after logging in with username and password credentials.

setdefault Sets one device as the default of its type.

The default flag directs the PosExplorer.GetDevice(type) method to return this device even if there is more than one device of the type available.

posdm [general switches] setdefault ON|OFFfilter [/info]

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

The optional /info switch causes all device properties to be displayed.

Example:

posdm setdefault ON /name:FirstScanner

This example designates FirstScanner as the one the CCL device enumeration will find.

setpath Sets the POS device path for non-Plug and Play devices. posdm [general switches] setpath hardware_path filter

where filter is one or more of the following needed to uniquely identify a device:

/type:devicetype

/soname:soname

/path:hardware_path

/name:devicename

Example:

posdm setpath COM2 /type:MSR

This sets the hardware path for MSR devices to COM2.

The setpath command works only for non-Plug and Play devices previously added with the adddevice command.

© 2005 Microsoft Corporation. All rights reserved.