Royal TS
Royal TS is a remote desktop and server management app. Protocol Launcher allows you to generate official Royal TS URL scheme links.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
Notes
Royal Apps documents rtscli://local/<scope>/<command>?... for executing Royal TS CLI commands. The connect helper is limited to the documented rtscli.exe action connect value options. Use cliCommand only for the documented action connect, document open, and document close command shapes. Flag-only CLI options are intentionally not exposed because the URI page does not document their URI serialization.
Royal TS V6 also documents the legacy rtsx:// scheme for connection actions. These examples do not render live launch buttons because the generated links can start or disconnect remote sessions.
CLI Command
import { cliCommand } from 'protocol-launcher/royal-ts'
const url = cliCommand({
scope: 'action',
command: 'connect',
options: {
'-n': 'QNAP (SSH)',
},
})Connect
import { connect } from 'protocol-launcher/royal-ts'
const url = connect({
name: 'QNAP (SSH)',
})Legacy Connect By URI
import { legacyConnect } from 'protocol-launcher/royal-ts'
const url = legacyConnect({
protocolIdentifier: 'rdp',
uri: '192.168.5.16',
using: 'uri',
})Legacy Connect By Name
import { legacyConnect } from 'protocol-launcher/royal-ts'
const url = legacyConnect({
protocolIdentifier: 'rdp',
auth: {
username: 'admin',
},
uri: 'Web Server 1',
using: 'name',
})Legacy Disconnect
import { legacyDisconnect } from 'protocol-launcher/royal-ts'
const url = legacyDisconnect({
protocolIdentifier: 'rdp',
uri: 'Web Server 1',
using: 'name',
})Legacy Ad Hoc Properties
import { legacyConnect } from 'protocol-launcher/royal-ts'
const url = legacyConnect({
protocolIdentifier: 'rdp',
uri: '192.168.5.16',
using: 'adhoc',
action: 'connect',
properties: {
Description: 'Connected using URI',
ColorDepth: 8,
},
})Generated URLs
cliCommand({
scope: 'action',
command: 'connect',
options: { '-n': 'QNAP (SSH)' },
})
// => 'rtscli://local/action/connect?-n=QNAP+(SSH)'
connect({ name: 'QNAP (SSH)' })
// => 'rtscli://local/action/connect?-n=QNAP+(SSH)'
legacyConnect({ protocolIdentifier: 'rdp', uri: '192.168.5.16', using: 'uri' })
// => 'rtsx://rdp%3a%2f%2f192.168.5.16?using=uri'
legacyConnect({
protocolIdentifier: 'rdp',
auth: { username: 'admin' },
uri: 'Web Server 1',
using: 'name',
})
// => 'rtsx://rdp%3a%2f%2fadmin@Web%20Server%201?using=name'
legacyDisconnect({ protocolIdentifier: 'rdp', uri: 'Web Server 1', using: 'name' })
// => 'rtsx://rdp%3a%2f%2fWeb%20Server%201?using=name&action=disconnect'
legacyConnect({
protocolIdentifier: 'rdp',
uri: '192.168.5.16',
using: 'adhoc',
action: 'connect',
properties: {
Description: 'Connected using URI',
ColorDepth: 8,
},
})
// => 'rtsx://rdp%3a%2f%2f192.168.5.16?using=adhoc&action=connect&property_Description=Connected%20using%20URI&property_ColorDepth=8'