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:
use winscp to automatically upload a csv file to a certain location on the linux node.
if it is successful - connect to the node with the command above.
run key sequence task that calls a script on the linux node to process the csv file.
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…
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.
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>