Installation & Use

Installation of the Launcher Service

Installing the Launcher Service on a PC & Registering Windows Service

The launcher service is registered and operated as a Windows service. To use the launcher, the Windows service must first be registered.

1

Download the installation file and run it with administrator privileges.

If the installation is not run with administrator privileges, then an error may occur during the service operation.

You can use the "/VERYSILENT", "/SILENT" option if you do not want the installation wizard screen to be displayed when installing the launcher service. The "/VERYSILENT" option installs the service without any message when running the installation file. The "/SILENT" option only displays the installation progress and installs the service without any user interaction.

TPLSvc_Setup.exe /VERYSILENT
TPLSvc_Setup.exe /SILENT

2

The installation wizard screen will begin running. Click the [Install] button to proceed with the installation. When the installation is completed, it is registered as a Windows service and runs automatically.

You can check that the registered service is operating by going to [Control Panel > System and Security > Administrative Tools > Service]. The service can be stopped or restarted from that window.

Deleting the Launcher Service from PC

1

Find the TPLSvc item in the list of installed apps (programs) and click the [Remove] button.

2

Confirm the deletion. Click the [OK] button to proceed with the deletion. The registered service is disabled and the launcher service is then deleted.

Specifying the Service to Run on a Specific Port

The launcher service has its port specified. If you want to change this, then you can run the service by specifying parameters directly through the command prompt.

1

Check the pathway where the launcher service is installed. You can check the installed executable file in the pathway below.

C:\Program Files (x86)\TPLSvc\TPLSvc.exe

2

Run the command prompt with administrator privileges and specify the parameters as shown below to disable the Windows service. This does not delete the launcher service, but only disables the registered service.

TPLSvc_Setup.exe –r false

3

To register the service again, execute the following.

TPLSvc_Setup.exe –r true

The launcher uses one of the specified ports depending on its communication method. If another service is already using the port on the system where the launcher is running, the port can be changed and used. .. In this case, specify additional parameters (-p port number 1, -p port number 2 ... -p port number n) to designate the port when registering the service.

Communication method

Default port

Port

designation parameters

HTTP

7895 ~ 7935

-p

HTTPS

7936 ~ 7966

-httpsp

WS

7970 ~ 7981

-wsp

WSS

7982 ~ 7992

-wssp

For example, if you want to use ports 8080 and 8888 for HTTP communication, register the service as follows.

TPLSvc_Setup.exe –r true –p 8080 –p 8888

Operating Method

A brief explanation of the operating method between the launcher service and the web browser is described in the table below.

Launcher Service


Web Browser

(2) id allocation and id return after save

(1) new id request (create)

(4) result value return after required property save

(3) Required property setting (setproperty)

Result value return after the method execution

Method execution request (method)

Property information return

Property information request (getproperty)

Event information return

Event information request (event)

Deletion of information corresponding to id

Deletion request of information corresponding to the id (destroy)

Basic Settings

Address Setting

The address setting is divided into required and additional parts. Combine the additional part with the required part to use.

Required Part

Local address, port, reserved word (launcher)

Additional Part

Platform name, timestamp

http://127.0.0.1:7895/launcher/nexacro/123456789
http://127.0.0.1:7895/launcher/xplatform/123456789
http://127.0.0.1:7895/launcher/miplatform/123456789

Basic Element Setting

Elements to be set by default are platform, action, id, and value. They are to be set according to each application.

platform

These are character strings that represent the platform. You can specify one of the 3 options below, depending on the product.

nexacro, xplatform, miplatform

action

This specifies the action string to request from the launcher service. You can specify the following actions.

Action

Description

create

When the initial id is being assigned from the launcher service

destroy

Deleting the information corresponding to the assigned id from the launcher service

setproperty

Property setting

getproperty

Checking property information

method

Method execution

event

Checking event-related information

check

Checking the launcher service version information

id

This is the character string assigned from the launcher service, and it must be requested upon initial operation.

value

This is information in the JSON format specific to the operation, and the configuration varies depending on the operation.

$r_title(JSON for receiving the initial id assignment: No value, id is delivered as the result)
var objNexacro = new Object(); 
objNexacro.platform = 'nexacro';
objNexacro.action = 'create';
//objXP.id = ''; // It can be omitted as the information is filled if the communication is successful.
$r_title(JSON for setting related properties)
var objNexacro = new Object(); 
objNexacro.platform = 'nexacro';
objNexacro.action = 'setproperty';
objNexacro.value = {"property name" : property value, ... };
$r_title(JSON for checking the set property value)
var objNexacro = new Object(); 
objNexacro.platform = 'nexacro';
objNexacro.action = 'getproperty';
objNexacro.value = {"property name" : "", ... };
$r_title(JSON for method invocation)
var objNexacro = new Object(); 
objNexacro.platform = 'nexacro';
objNexacro.action = 'method';
objNexacro.value = {"method name": {"param": method parameter array, "result": }};
$r_title(JSON for checking event information)
var objNexacro = new Object(); 
objNexacro.platform = 'nexacro';
objNexacro.action = 'event';
objNexacro.value = {"event name" : {...}};
$r_title(JSON for checking the launcher service version information)
var objNexacro = new Object(); 
objNexacro.platform = 'nexacro';
objNexacro.action = 'check';
objNexacro.value = {"getlauncherversion": {}};

Data Transmission

Data transfer is sorted into HTTP/HTTPS communication (GET, POST) and WebSocket communication.

$r_title(In the GET method, the ? and the character string in JSON format are appended to the address)
var objNexacro = new Object();
var xhrObject = new XMLHttpRequest();
xhrObject.onreadystatechange = resultProcess;
var jsonData = JSON.stringify(objNexacro);
var openurl = "http://127.0.0.1/launcher/nexacro/"+new Date().getTime();
xhrObject.open("GET", openurl+"?"+jsonData, "true");
xhrObject.send(null);
$r_title(In the POST method, the character string in the JSON format is appended to the send method parameter)
var objNexacro = new Object();
var xhrObject = new XMLHttpRequest();
xhrObject.onreadystatechange = resultProcess;
var jsonData = JSON.stringify(objNexacro);
var openurl = "http://127.0.0.1:80/launcher/nexacro/"+new Date().getTime();
xhrObject.open("POST", openurl, "true");
xhrObject.send(jsonData);
$r_title(Data transmission during WebSocket communication)
var objNexacro = new Object();
var openurl = "ws://127.0.0.1:7970/launcher/nexacro/"+new Date().getTime();
var objWebSocket = new WebSocket(openurl);
var jsonData = jsonData = JSON.stringify(objNexacro);
if (objWebSocket != null) {
	objWebSocket.send(jsonData);
} else {
	return null;
}

Data transmission can be processed in any way by configuring the character string in the JSON format. If the stringify method cannot be supported, or if you want to set it yourself, then create the character string in the following format to process it.

create
'{"platform":"nexacro","action":"create"}'
launch method
The id value must be replaced with the value received from create.
'{"platform":"nexacro","id":"12345678","action":"method", "value":{ "launch":
null }}'

Processing Communication Result

String data in the JSON format should be appropriately converted and processed.

$r_title(HTTP/HTTPS communication result processing)

var result = xhrObject.responseText; // xhrObject is XMLHttpRequest
var objResult = eval('(' + result + ')');
$r_title(WebSocket communication result processing)
function onMessage(evt) {
	var data = evt.data;
	var objResult = eval('(' + result + ')');
...
}

If the processing result is successful, then the result string is processed as 'success'.

if(objResult.result == "success" && objResult.id.length > 0)
{
    objNexacro = objResult; // objXP is an object that contained transmission information
}    else    {
    window.console.log("error!!!");
}

Using TPLSvcAgent

When the launcher service is executed in a specific environment, some user information required for service execution cannot be verified due to security limitations of the Windows operating system. To circumvent this, a separate agent file (TPLSvcAgent.exe) is provided, and the agent file is executed to check information when user information is required according to the multisession property settings.

The TPLSvcAgent.exe file and multisession property are supported in version 1.1.0.29 and higher.

Supported features

The multisession property value is set to true and the following functions are supported when the agent is running.

Depending on the settings of the virtual environment, the user information verification function may not be available.

How to use

To enable agent execution, set the multisession property value to true in the setproperty function for launcher service startup.

objNexacro.action = 'setproperty';
objNexacro.value = {
...
	"multisession": true,
...
};

When verifying the user information in a virtual environment, the id value must be set as the title property value of the document in the callback function when the id is first assigned (create action).

function createProcess() {
...
	if (bMultiSession == true)
	{
		top.document.title = objNexacro.id;
	}
...
}