VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   How do i get auto session to run a script? (https://forums.vandyke.com/showthread.php?t=3782)

Charles Campbel 08-19-2009 04:16 PM

How do i get auto session to run a script?
 
I have several sessions open when o login. I when manually run a script for each session; the script gathers data and puts into a file than emails the file to me. Is there a way to get the script to run once Im logged in? What Id like is to have the Windows scheduler auto start SecureCRT. SecureCRT auto start my session and run my script.

bgagnon 08-20-2009 08:53 AM

Hi Charles,

What version of SecureCRT are you using?

As of SecureCRT 5.5, the ability to launch a set of sessions by specifying folders or multiple sessions as auto sessions was added. This is in the 'General / Default Session' category of Global Options.

In the session(s), you would then need to specify your script in the 'Connection / Logon Actions' (previously 'Logon Scripts') category of Session Options.

If using a version prior to SecureCRT 5.5, I would suggest a slightly modified approach.

You could launch SecureCRT with the "/script" argument in Scheduled Tasks and within your script, connect to the desired session with obj.Session.Connect "/S <session_name>".

Will one of the above methods help to accomplish your goal?

Charles Campbel 08-21-2009 12:50 PM

Thank you.......

It'a working like a charm..:D

bgagnon 08-21-2009 01:09 PM

Hi Charles,

Great, I am glad to hear you are able to run scripts from multiple auto sessions.

reontucks 01-30-2013 08:22 PM

Hi, I have the same problem but my Secure CRT version was 6.1.1

rtb 01-31-2013 08:17 AM

Hi reontucks,

Please see my response to your post in forum thread 10860.


All times are GMT -6. The time now is 02:53 PM.