View Single Post
Old 05-15-2013, 09:39 AM
gunslingor gunslingor is offline
Registered User
Join Date: May 2013
Posts: 27
VBscript SecureCRT Run Outside

Here's my first simple script I have a questions about:


call Main

Sub Main()
	Run "C:\Program Files\VanDyke Software\SecureCRT\SecureCRT.exe"
	'crt.Session.Connect "/Serial COM6 /BAUD 9600"
End sub

Sub Run(ByVal sFile)
	Dim shell
	Set shell = CreateObject("WScript.Shell")
    shell.Run Chr(34) & sFile & Chr(34), 1, false
    Set shell = Nothing	
End Sub
The script runs well when [crt.Session.Connect "/Serial COM6 /BAUD 9600"] is commented out as shown above, and fails when its not commented out.

I suspect because crt.whatever is only interpretable when you actually "Run" the script from within secureCRT, is that right?

Ideally, I'd like to be able to just double click on the script (as I'm doing now) and have it open CRT and then be able to do what I want. Is this possible, or do you have to run it from within CRT?
Reply With Quote