VanDyke Software Forums

Go Back   VanDyke Software Forums > Scripting
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1  
Old 09-20-2004, 02:24 AM
zorglups's Avatar
zorglups zorglups is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 61
Piloting securecrt from outside (vbs/vb6).

Isn't there any way to do something like this from a pure vbs script or within a VB6 application ? This would make easy piloting several sessions at once.

Set objCrt1 = CreateObject("SecureCRT.Application")
objCrt1.session.Connect("/telnet myhost1 2345")
Set objCrt2 = CreateObject("SecureCRT.Application")
objCrt2.session.Connect("/telnet myhost2 2345")
objCrt1.send "cd /usr/tmp"
objCrt2.send "cd /usr/tmp"
Reply With Quote
  #2  
Old 09-20-2004, 12:17 PM
bocks's Avatar
bocks bocks is offline
VanDyke Customer Support
 
Join Date: Jan 2004
Location: Albuquerque, NM
Posts: 184
Quote:
Originally Posted by zorglups
Isn't there any way to do something like this from a pure vbs script or within a VB6 application ? This would make easy piloting several sessions at once.

In order to accomplish something like this, SecureCRT would need to have an external API that could be called. This is a feature that has been requested before. If you would like to have your contact information added to the request for this ability, please send me message at support@vandyke.com and I'll add you to the request.

The current version of SecurCRT does not have a programmable API, but it does allow you to execute a script when it is called by on the command line by using the /SCRIPT option:

Code:
securecrt.exe /script scriptname.vbs

Also, the scripting engine in SecureCRT was designed to run inside a single session. Because of this, only one connection at a time is supported.

Quote:
Set objCrt1 = CreateObject("SecureCRT.Application")
objCrt1.session.Connect("/telnet myhost1 2345")
Set objCrt2 = CreateObject("SecureCRT.Application")
objCrt2.session.Connect("/telnet myhost2 2345")
objCrt1.send "cd /usr/tmp"
objCrt2.send "cd /usr/tmp"

This should cause an already connected error when run from inside the scripting engine in SecureCRT.

It may be possible to accomplish this by going about it in a different way.
Can you tell me a little more about what you are trying do?

-Shannon
Reply With Quote
  #3  
Old 09-22-2004, 06:13 PM
zorglups's Avatar
zorglups zorglups is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 61
Well, your answer is pretty clear... Not possible today.

I sent you my contact so you can warn me as soon as this is possible.

I won't bother you with this post as "what I would like to do" is described in the post "Controlling several sessions in parrallel."

Thanks for your reply to this thread anyway. This makes things clear.

Pierre.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB 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 06:49 AM.


© copyright 1995-2010 VanDyke Software, Inc.