View Single Post
  #4  
Old 01-20-2006, 05:45 AM
Gamma Gamma is offline
Registered User
 
Join Date: Jan 2006
Posts: 4
Thank you Teresa

To give you some brief information, I am connecting to three terminals with three different session ids. The idea is to have VB.net open the correct session (and from there I know how to make each session run the relevant VB.script). The problem is how to control the SecureCRT application from VB.Net.

My question is:

if I want to open SecureCRT and connect to session XYZ, is there a command in VB.Net for that?

shell = CreateObject("WScript.Shell")
shell.run("""C:\Program Files\SecureCRT\SecureCRT.EXE")

Above opens SecureCRT but don't know how to connect to a specific Session from there. I could make SecureCRT always open one session (from Global settings), but it will not solve the problem when I need to connect to the other sessions.

The other alternative would have been to use shell.AppActivate and send keys to the window. Then I could make it run the script I want. But this too is not working.

Finally, you can add a COM reference in VB.Net (I do that for Excel and Reflections) - however I am unable to add SecureCRT (SSH2Core31 and vsh). This would have been the best option...

Any help would be most appreciated.

Last edited by Gamma; 01-20-2006 at 05:50 AM.