Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-11-2012, 06:06 AM
Martin G Martin G is offline
Registered User
 
Join Date: Sep 2012
Posts: 2
Question same hostname for ssh/telnet and external session

Dear VanDyke Support,

Since years I am using secureCRT and I am delighted with this piece of software.
Also at my new employer with about 1200 network devices.

My challenge:
I want to start an additional application in parallel to a ssh session.
This is already working under logon actions with a vbs logon script i. e.

Sub Main

Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run """C:\Program Files\Internet Explorer\IExplore.exe"" https://10.21.0.233"

End Sub

I have to create hundreds of scripts, for each session one script.
But I think it is possible to use the hostname used for the ssh or telnet session as a variable for the external session, maybe out of the session.ini file?
Or out of a hostlist file? Or......?

..........https://$hostname

If yes, can you give me an example.

Thanks,
Martin
Reply With Quote
  #2  
Old 09-11-2012, 08:46 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Martin,

There are various methods you could use to accomplish your goal. One method would be to use the RemoteAddress property of the Session object. For example:
Code:
strHost = crt.Session.RemoteAddress
You could then use the variable strHost to open IE.

Does this help you accomplish your goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 09-13-2012, 06:41 AM
Martin G Martin G is offline
Registered User
 
Join Date: Sep 2012
Posts: 2
Smile

Thanks Todd,

It`s much easier I thought!

BR,
Martin
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

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 07:41 AM.