#1
|
|||
|
|||
Automatically Opening SecureCRT and Connecting
So, I have a database full of IP addresses and a form that shows the IP addresses. What I'd like to do is to be able to double click on an IP address on the form, and have it automatically open SecureCRT and attempt to connect to the IP address using, at first, SSH.... later I'll add more fields to the DB to specify the connection type (e.g. telnet, ssh, etc.)
So my question is this, what the command to open SecureCRT (probably from the command prompt will suffice) and what are all the arguments I can give to the command? Any and all comments appreciated. ![]() |
#2
|
|||
|
|||
Hi gunslingor,
All SecureCRT command-line options are documented in the help file. The path to the chapter that has the information you are seeking is Using the Software / Command-Line Options. Are you able to accomplish your goal using this information? |
#3
|
|||
|
|||
Likely Yes, thanks, I'll let you know the final outcome.
|
#4
|
|||
|
|||
![]()
Alright, so I have the initial code setup. My Access form looks like this:
![]() The code behind each button looks like this (only one button shown in full for conciseness): ![]() ![]() ![]() So basically what happens is the user selects an IP address in the list box, then presses one of the three buttons which runs the code. Most of the code just determines what item is selected in the listbox, the last main line is where secureCRT is opened via the cmd. Everything works as expected. The sessions don't always connect successfully, but likely this is because I don't know exactly how each IP is configured on the network (e.g. what protocols are enabled, what firewall rules are, user management policies, etc.), so its safe to assume its working when it is supposed. I do have a rare but persistent and intermittent error that appears to show up completely randomly (i.e. I'll do the exact same thing twice and it'll happen just once, for example, and will connect successfully the second time). Screen shot: ![]() Code:
Problem signature: Problem Event Name: APPCRASH Application Name: SecureCRT.exe Application Version: 7.0.4.537 Application Timestamp: 51547fb9 Fault Module Name: MSVCP100.dll Fault Module Version: 10.0.40219.325 Fault Module Timestamp: 4df2be41 Exception Code: c0000005 Exception Offset: 0000bbf0 OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 1033 Additional Information 1: 0afa Additional Information 2: 0afa9aa512456d7fac953b42f00dd032 Additional Information 3: e28b Additional Information 4: e28b84ba13ffc6c3bbf3de7963bc3dbc Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt Code:
Problem signature: Problem Event Name: BEX Application Name: SecureCRT.exe Application Version: 7.0.4.537 Application Timestamp: 51547fb9 Fault Module Name: StackHash_0a9e Fault Module Version: 0.0.0.0 Fault Module Timestamp: 00000000 Exception Offset: 77b1e1e1 Exception Code: c0000005 Exception Data: 00000008 OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt ![]() ![]() Last edited by gunslingor; 07-02-2013 at 09:14 AM. |
#5
|
|||
|
|||
Hi gunslingor,
Thanks for the post. SecureCRT 7.0.4 is no longer in active development. Do you see the same issue in SecureCRT 7.1.1? If so, would you post the actual SecureCRT command-line that your Access program is trying to launch when you see the crash? |
#6
|
||||
|
||||
I uninstalled then reinstalled the new version, the same thing happens. Here the first popup:
Quote:
Quote:
Quote:
Quote:
Code:
Shell "C:\Program Files\VanDyke Software\Clients\SecureCRT.exe /Telnet " & Me.IPList.Column(0, selected_row), vbNormalFocus Code:
"C:\Program Files\VanDyke Software\Clients\SecureCRT.exe /Telnet " & Me.IPList.Column(0, selected_row) |
#7
|
|||
|
|||
Hi gunslingor,
Thanks for the update. I apologize for not being clear. I don't need the code you are using (I saw that initially). I need the command-line that is being executed after evaluating the code. What is the real world command-line that your code is trying to execute? Are you able to execute the command-line manually? |
#8
|
|||
|
|||
I don't really know what your asking, but I think I know why. Are you asking "what command are you trying to send via securecrt?"
If so, none. Background: we have all our devices with ip addresses in an access db. Rather than saving sessions and distributing these amongst the office, where they may get out of date, we decided to try to automatically start a session from the db, using the db ip addresses. This is the only thing I'm trying to do... To open sessions using my db as the starting point. Those messages occurred when secure CRT opened, no commands are sent, no scripts are run. Last edited by gunslingor; 07-02-2013 at 12:19 PM. |
#9
|
|||
|
|||
Hi gunslingor,
The Shell() call in your code is not trying to execute the following: "C:\Program Files\VanDyke Software\Clients\SecureCRT.exe /Telnet " & Me.IPList.Column(0, selected_row), vbNormalFocusThe variables are going to be evaluated by the code, and an actual SecureCRT command-line will be executed. I need to know what the Shell() call is actually trying to execute. Maybe you could assign the command to a variable, and then execute the variable. This would allow you to message box or write to a file the value that is in the variable prior to attempting to execute it. Does this help to explain what I want to know? |
#10
|
|||
|
|||
I don't think I have the ability to answer your question. Now your asking, "what is the actual expression executed by the shell function". Without finding the actual shell functional definitions, I cannot answer this definitively, and I've looked online and it doesn't appear to be published.
I have assumed that the precise command run at this point is simply: Code:
C:\Program Files\VanDyke Software\Clients\SecureCRT.exe /SSH1 [whatever IP address is selected] The only other interpretation I can conceive of your request is that you don't understand the statement "Me.IPList.Column(0, selected_row)". If that's the case, just replace that statement with an IP address and your golden. |
#11
|
|||
|
|||
Hi gunslingor,
To move forward on this issue, send an email to support@vandyke.com with a subject of Attn: Todd - Forum thread #11078. Please include the operating system you are using. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|