How can I pass arguments to my script?
Note: The following capability requires at least CRT™ /SecureCRT® version 4.0.
You can now pass arguments to ActiveX scripts (running in CRT) by using the /ARG command-line option to pass arguments to CRT and then retrieving those arguments in your script using the "Arguments" object.
The example below is a common script that connects to multiple hosts and performs the same operation on each host, having been passed variable arguments for hostname, username, and port.
' Detect lack of proper arguments.
The arguments are then made available to scripts by starting different instances of CRT and using the /ARG command-line option to pass the data. In the example below, two instances of CRT are started and different hostnames, usernames, and ports are made available to scripts being run by those instances of CRT:
CRT.exe /ARG router1 /ARG admin1 /ARG 5001