(Optional) Configure Adapter Windows Service

Select the adapter procedure needed for your project:

To Install the Adapter as a Service for a C# Adapter

  1. Start the Task Manager, and select the Processes tab.
  1. Right-click the ThingSharp [adapter name] process, and click End Task.
  1. Right-click the Command Prompt, and click Run as Administrator.
  1. Change to the directory where the adapter is installed—for example [drive:]\ProgramFiles (x86)\Siemens\[adapter name]\Bin.
    NOTE: Depending on how the adapter was installed, the path may or may not contain a Bin directory.
  1. Enter the following command to set the new IP address, port number, and Windows service:
    [adapter name].exe -ip:xxx.xxx.xxx.xxx -port:xxxx -wsport:xxxx
    -service

To Install the Adapter as a Service for a Java Adapter

  1. Install the third-party tool called winsw. For more information, see https://www.bhupeshsingh.com/2019/08/how-to-run-any-java-application-as-windows-service.
  1. Create the winsw.xml file that describes your service:
    <service>
    <id>MyService</id>
    <name>My Service App</name>
    <description>Java adapter windows service</description>
    <executable>java</executable>
    <arguments>-myadapter.jar</arguments>
    </service>
  1. From the command line where you installed winsw, add the service.
  1. Run winsw.exe install.

NOTE: For additional configuration options, run the adapter from the Command Prompt and enter the following: [adapter name] -?