Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Old 11-08-2016, 07:03 AM
ogun ogun is offline
Registered User
Join Date: Sep 2013
Posts: 15
Reloading the session list


We've written a script that we've used for some years now that fetches a session list from an external host and then creates sessions from there.
The scripts first deletes a folder "Shared" in the session directory on the client and then creates new sessions from the list by cloning the default session and saving.

We then run the script as a login script when connecting to our jump host.
The issue is that after the sessions are created, new session do not show up until you restarts SecureCRT. Is there any API call that I can use to tell scrt to reload the session database?
Reply With Quote
Old 11-08-2016, 10:48 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
There isn't a direct API for refreshing the session manager's contents.

You can refresh it manually by closing and re-opening your Session Manager (not just auto-hiding it).

Perhaps this snippet of code might work, but I think it would require a script tab that is connected to a remote host.
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Old 11-11-2016, 10:11 AM
ogun ogun is offline
Registered User
Join Date: Sep 2013
Posts: 15
Many thanks, that did the trick.

I will try and post my code on github later to share with everybody.
Reply With Quote
Old 12-05-2016, 12:05 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,612
The scripting API has been modified so that the Session Manager is automatically refreshed when a new session is added through a script. This support is available in SecureCRT 8.1, which is in beta testing. If you'd like to try it, please send email to me at Maureen.Jett@vandyke.com.

Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 11:42 PM.