Share via


Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documentation)

3/3/2014

You can manually perform most Microsoft Point of Service for .NET (POS for .NET) device management tasks without using the POS device manager (posdm.exe).  

Manually managing POS for .NET devices

You can manually edit the POS for .NET configuration XML file to replicate most of the functionality available with posdm.exe.

You can find the location of the POS for .NET configuration XML file in the Configuration value under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\POSfor.NET.

The default location for the configuration file is *%ProgramData%\*Microsoft\Point Of Service\Configuration\Configuration.xml

The following table lists posdm.exe commands and the equivalent XML that you must add to the configuration xml file.

Posdm.exe command

Description

Configuration.xml

Example

ADDDEVICE

Add a physical non-Plug and Play device.

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

Posdm.exe command:

Posdm ADDDEVICE COM1 /SONAME:"Microsoft Msr Simulator" /Type:msr

Configuration.xml:

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
    <Device HardwarePath="COM1" Enabled="yes" PnP="no">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

ADDNAME

Add a name to a device's list of names.

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
      <LogicalName Name="[Device Name]" />
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

Posdm.exe command:

Posdm ADDNAME MyName /SONAME:"Microsoft Msr Simulator" /Path:COM1

Configuration.xml:

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
    <Device HardwarePath="COM1" Enabled="yes" PnP="no">
     <LogicalName Name="MyName" />
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

ADDPROPERTY

Add a property to a device.

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
      <Property Name="[Property Name]" Value="[Property Value]" />
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

Posdm.exe command:

Posdm addproperty MyProperty MyValue /Name:MyName

Configuration.xml:

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
    <Device HardwarePath="COM1" Enabled="yes" PnP="no">
     <LogicalName Name="MyName" />
     <Property Name="MyProperty" Value="MyValue" />
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

DELETEDEVICE

Delete a physical non-Plug and Play device.

Remove the <Device> node.

DELETENAME

Delete a name from a device's list of names

Remove the <LogicalName> node.

DELETEPROPERTY

Delete a property from a device.

Remove the <Property> node.

DISABLE

Disable an SO on a POS device.

Set Enabled="no" and Default="no" on the <Device> node.

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
    <Device HardwarePath="[Hardware Path]" Enabled="no" PnP="no" Default="no">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

Posdm.exe command:

Posdm disable /Path:COM1

Configuration.xml:

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
    <Device HardwarePath="COM1" Enabled="no" PnP="no" Default="no">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

ENABLE

Enable an SO on a POS device.

Set Enabled="yes" on the <Device> node.

INFO

Displays the device properties.

N/A

LISTDEVICES

List the POS devices on the target <host>.

N/A

LISTNAMES

List the names associated with POS devices.

N/A

LISTPROPS

List the properties associated with a device.

N/A

LISTSOS

List the POS service objects on the target <host>.

The service object search paths are all of the values under the registry key:

HKLM\Software\Wow6432Node\Posfor.NET\ControlAssemblies

The default search path is:

%CommonProgramFiles(x86)%\Microsoft Shared\Point Of Service\Control Assemblies\

POS for .NET will attempt to load all service object DLL's found in these paths.

SETDEFAULT

Set one device as the default of its <type>.

Set Default="yes" on the <Device> node.

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no" Default="yes">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

Posdm.exe command:

Posdm SETDEFAULT ON /Path:COM1

Configuration.xml:

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
    <Device HardwarePath="COM1" Enabled="yes" PnP="no"  Default="yes">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

SETPATH

Sets the non-Plug and Play POS device <path>.

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>

Posdm.exe command:

Posdm SETPATH COM2 /SONAME:"Microsoft Msr Simulator" /Type:msr

Configuration.xml:

<PointOfServiceConfig Version="1.0">
  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
    <Device HardwarePath="COM2" Enabled="yes" PnP="no">
    </Device>
  </ServiceObject>
</PointOfServiceConfig>