Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-18-2013, 07:21 AM
gunslingor gunslingor is offline
Registered User
 
Join Date: May 2013
Posts: 27
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.
Reply With Quote
  #2  
Old 06-18-2013, 07:33 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
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?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 06-18-2013, 12:46 PM
gunslingor gunslingor is offline
Registered User
 
Join Date: May 2013
Posts: 27
Quote:
Originally Posted by rtb View Post
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?
Likely Yes, thanks, I'll let you know the final outcome.
Reply With Quote
  #4  
Old 07-02-2013, 09:09 AM
gunslingor gunslingor is offline
Registered User
 
Join Date: May 2013
Posts: 27
Cool Results, semi-working

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
When I start getting these messages, they tend to appear over and over again as I try to close the window, sometimes appearing on top of each other and sometimes appearing one after the other as I close each window with the "X" or the "close program" button.

Last edited by gunslingor; 07-02-2013 at 09:14 AM.
Reply With Quote
  #5  
Old 07-02-2013, 09:28 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
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?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #6  
Old 07-02-2013, 11:59 AM
gunslingor gunslingor is offline
Registered User
 
Join Date: May 2013
Posts: 27
I uninstalled then reinstalled the new version, the same thing happens. Here the first popup:
Quote:
Problem signature:
Problem Event Name: BEX
Application Name: SecureCRT.exe
Application Version: 7.1.1.264
Application Timestamp: 519d4eb9
Fault Module Name: StackHash_0a9e
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 770ee1e1
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/?link...8&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Before I even had a chance to close this one, another popup show'd up with this:

Quote:
Problem signature:
Problem Event Name: APPCRASH
Application Name: SecureCRT.exe
Application Version: 7.1.1.264
Application Timestamp: 519d4eb9
Fault Module Name: StackHash_cc03
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: 00000000
Exception Offset: 00000000
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: cc03
Additional Information 2: cc03fd00d3bba63e5f7737cf3800cd74
Additional Information 3: bc5b
Additional Information 4: bc5bc241d1d1b2e82aaca6fb0c68294d

Read our privacy statement online:
http://go.microsoft.com/fwlink/?link...8&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
I then press "Close the Program"... 3 seconds later I get another one:

Quote:
Problem signature:
Problem Event Name: APPCRASH
Application Name: SecureCRT.exe
Application Version: 7.1.1.264
Application Timestamp: 519d4eb9
Fault Module Name: MSVCP100.dll
Fault Module Version: 10.0.40219.325
Fault Module Timestamp: 4df2be41
Exception Code: c0000005
Exception Offset: 00006dd6
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: d663
Additional Information 2: d6638594fe5f248455b16706f10611b0
Additional Information 3: f447
Additional Information 4: f447daf004f77e47a37179c6cec5f116

Read our privacy statement online:
http://go.microsoft.com/fwlink/?link...8&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
After pressing close again, the same one appeared 2 more times... then finally I get no more messages and Secure is CLOSED.

Quote:
If so, would you post the actual SecureCRT command-line that your Access program is trying to launch when you see the crash?
-the command line is in the screenshots above, but restated here:
Code:
Shell "C:\Program Files\VanDyke Software\Clients\SecureCRT.exe /Telnet " & Me.IPList.Column(0, selected_row), vbNormalFocus
When you take away the access shell function you get
Code:
"C:\Program Files\VanDyke Software\Clients\SecureCRT.exe /Telnet " & Me.IPList.Column(0, selected_row)
Me.IPList.Column(0, selected_row) calculates out to an IP address before the shell executes the command.
Reply With Quote
Reply

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 06:39 PM.