VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   Scheduled Task in Secure CRT (https://forums.vandyke.com/showthread.php?t=12851)

chilisauce 10-05-2017 09:32 PM

Scheduled Task in Secure CRT
 
Hi,

I have a vbscript that does the ff:

1. Login to Telnet.
2. Read a textfile(contains list of command) to be sent to the Server.
3. Receive the Response from the Server.
4. Read line by line and save the Response in the text file.

Currently in Secure CRT, I am manually doing this by

1. Open Secure CRT
2. Go to the SCRIPT Menu, Click RUN.
2. Browse to the location where the vbscript is located and Hit RUN

Now, what I want to achieve if there is a way to automate Step 1, 2 and 3, to run on a daily basis at certain time.

bgagnon 10-06-2017 08:45 AM

Hi chilisauce,

Can you, from CMD.exe, run the following successfully?
SecureCRT /Script "path_to_script.vbs"
If so, there's a good chance you can create a batch file and have it run as a scheduled task. You may need to add a few additional options to your command-line though (such as /F to be certain your SecureCRT config is found). All the command-line options are documented in three separate topics under SecureCRT's main Help topic Using the Software / Command-Line Options.

chilisauce 10-08-2017 08:41 PM

Quote:

Originally Posted by bgagnon (Post 48206)
Hi chilisauce,

Can you, from CMD.exe, run the following successfully?
SecureCRT /Script "path_to_script.vbs"
If so, there's a good chance you can create a batch file and have it run as a scheduled task. You may need to add a few additional options to your command-line though (such as /F to be certain your SecureCRT config is found). All the command-line options are documented in three separate topics under SecureCRT's main Help topic Using the Software / Command-Line Options.


I could not run those line using dos command, dos command could not recognize those. Does it have something to do with the installer? Currently I am using SecureCRT 7.1 Portable(Does not need to be installed.)

bgagnon 10-09-2017 09:25 AM

Hi chilisauce,

Did you fully qualify the path to SecureCRT on the USB drive?

What error did you get?

chilisauce 10-11-2017 12:13 AM

Quote:

Originally Posted by bgagnon (Post 48219)
Hi chilisauce,

Did you fully qualify the path to SecureCRT on the USB drive?

What error did you get?

Hi bgagnon,

I was able to run the script in the dos command. But before I got the script working below are the steps that i did.

1. Configure the Global Setting to 'Use auto session'

http://i65.tinypic.com/1fvgc4.jpg

2. Click the 'Edit Default Setting' and point to the location where the vbscript is located.

http://i68.tinypic.com/67s27c.jpg

after the steps above, when i run the script via dos command line, it will auto connect then execute the script.

bgagnon 10-11-2017 09:45 AM

Hi chilisauce,

Please send an email to support@vandyke.com and reference "Attn Brenda - Forum Thread #12851" in the subject line.

Attach a copy of your script (sensitive data redacted) and a screenshot of the Help / About SecureCRT... dialog.


All times are GMT -6. The time now is 09:30 PM.