I've tried searching but no luck. I'm wondering if it is possible to run a batch file to automatically connect to a connection in a document and then execute a key sequence task after it connects?
I currently have a batch file that will upload a csv file to a server, then use the below command to connect to the server.
Which works great, but I want to add to it. When I connect to the server, I want a key sequence task to run after it connects. Is that possible with a batch file? I know you can set the task to run in royals but I only want this task to run when my batch file runs.
High level overview of the batch file:
1. use winscp to automatically upload a csv file to a certain location on the linux node.
2. if it is successful - connect to the node with the command above.
3. run key sequence task that calls a script on the linux node to process the csv file.
Thanks in advance.
Best Answer
T
Tom Hutchinson
said
over 5 years ago
In case anyone is still interested in this, I believe you can achieve what B3nd3r was asking for by making a template with the key sequence task embedded in it, then refer to the template as an adhoc connection to "dev1":
RoyalTS.exe
/protocol:terminal /using:adhoc /uri:dev1 /usingtemplate:name
/template:<name of template>
Alternatively you could create dynamically a document with all the connections and tasks using a PowerShell script and ensure the key sequence is executed accordingly...
I hope this helps.
Regards, Stefan
B
B3nd3r
said
over 6 years ago
below is what I have in my batch file. it still connects but doesn't run the task. Does the task have to be in the same document as the connection? Is there a way to add a wait before running the task? maybe it's trying to run it before it's actually connected to the node?
I'm sorry for the confusion. The property override only works for ad hoc connections. I'm afraid the only solution for your use case is to create a document using a powershell script.
Regards,
Stefan
1 person likes this
Tom Hutchinson
said
over 5 years ago
Answer
In case anyone is still interested in this, I believe you can achieve what B3nd3r was asking for by making a template with the key sequence task embedded in it, then refer to the template as an adhoc connection to "dev1":
RoyalTS.exe
/protocol:terminal /using:adhoc /uri:dev1 /usingtemplate:name
/template:<name of template>
B3nd3r
Hello,
I've tried searching but no luck. I'm wondering if it is possible to run a batch file to automatically connect to a connection in a document and then execute a key sequence task after it connects?
I currently have a batch file that will upload a csv file to a server, then use the below command to connect to the server.
"C:\Program Files\RoyalTS\RoyalTS.exe" /protocol:terminal /using:name /uri:"dev1"
Which works great, but I want to add to it. When I connect to the server, I want a key sequence task to run after it connects. Is that possible with a batch file? I know you can set the task to run in royals but I only want this task to run when my batch file runs.
High level overview of the batch file:
1. use winscp to automatically upload a csv file to a certain location on the linux node.
2. if it is successful - connect to the node with the command above.
3. run key sequence task that calls a script on the linux node to process the csv file.
Thanks in advance.
In case anyone is still interested in this, I believe you can achieve what B3nd3r was asking for by making a template with the key sequence task embedded in it, then refer to the template as an adhoc connection to "dev1":
RoyalTS.exe /protocol:terminal /using:adhoc /uri:dev1 /usingtemplate:name /template:<name of template>
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstStefan Koell
You can use the /property:<name>=<value> command line option to specify or "override" the key sequence configuration of your connection:
https://content.royalapplications.com/Help/RoyalTS/V4/index.html?advanced_commandline.htm
Something like this:
/property:KeySequenceEnabled=true /property:KeySequenceMode=2 /property:KeySequenceName=NameOfKeySequenceTaskObject
You can find all properties for RemoteDesktop connections here:
https://content.royalapplications.com/Help/RoyalTS/V4/index.html?scripting_objectproperties_royalrdsconnection.htm
Alternatively you could create dynamically a document with all the connections and tasks using a PowerShell script and ensure the key sequence is executed accordingly...
I hope this helps.
Regards,
Stefan
B3nd3r
below is what I have in my batch file. it still connects but doesn't run the task. Does the task have to be in the same document as the connection? Is there a way to add a wait before running the task? maybe it's trying to run it before it's actually connected to the node?
"C:\Program Files\RoyalTS\RoyalTS.exe" /protocol:terminal /using:name /uri:"dev1" /property:KeySequenceEnabled=true /property:KeySequenceMode=2 /property:KeySequenceName="Printer - Add"
Thank you
Stefan Koell
I'm sorry for the confusion. The property override only works for ad hoc connections. I'm afraid the only solution for your use case is to create a document using a powershell script.
Regards,
Stefan
1 person likes this
Tom Hutchinson
In case anyone is still interested in this, I believe you can achieve what B3nd3r was asking for by making a template with the key sequence task embedded in it, then refer to the template as an adhoc connection to "dev1":
RoyalTS.exe /protocol:terminal /using:adhoc /uri:dev1 /usingtemplate:name /template:<name of template>
1 person likes this
-
What happened to the forum?
-
About this Forum
-
Security Information
-
Supported Secure Gateway (SSH) ciphers
-
Why is no remote file browser in SCP available?
-
What encryption is used in the rtsz files when enabled?
-
Royal TS V4 License File
-
How to resolve RDP resolution issues in Windows 7 with high resolution screen
-
Auto Fill in web page connection
-
How to reference custom properties in tasks and templates?
See all 275 topics