View Single Post
Old 04-08-2021, 02:45 AM
oliver366370 oliver366370 is offline
Registered User
Join Date: Sep 2018
Posts: 8
Originally Posted by bgagnon View Post
Hi oliver366370,

The developers are investigating the Logon script option not being enabled by the script.

We feel this feature request would be helpful in accomplishing the objective also.

I have added this thread to a feature request in our product enhancement database for the ability to run logon script prior to or without initiating the Connect process. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to and include Feature Request - Forum Thread #14490 in the subject line or use this form from the support page of our website.
Hi Brenda, thank you for looking into this for me.

Is it then fair to say that not being able to set the "Use Script File" option to true in script may be a unintentional bug and not a result of my misunderstanding of the SecureCRT object methods?
I do agree that having the option to run a script pre-connection would be incredibly useful. At the moment how I have gotten this to work, is by using the option to display login prompts on screen. This allows the script to run pre-login and complete the logic needed. Ending and restarting the session pretty well accomplished what I need to do to run the session with the new options.
The script disable and script enable options are in theory to prevent an infinite script invocation loop occurring when the script invokes a connection of the session. During testing I saw that SecureCRT seems to prevent a script running that already has an instance running. This means I should be able to effectively work around the issue by suppressing warnings on the child session invocation, however I generally wouldn't call this best practice and could cause issues down the line.
I will keep an eye out for the developers input as this is the last part that is preventing this incredibly useful script from working.

Edit: What I put down about alert suppression seems to be false. In addition through more testing I have determined that the ConnectInTab method is indeed the culprit for the following SetOption not running. If the ConnectInTab is never called then the setting of the use script option is completed successfully.
Is there any way to work around this issue? I have tried declaring the ConnectInTab as a session object and looping until connected becomes false, however this spiked the CPU to 100% while it is stuck in the loop.
Attached Images
File Type: png mrnSpab.png (23.5 KB, 814 views)

Last edited by jdev; 05-18-2021 at 07:15 AM. Reason: Do not link to third party sites for images. Upload images and link to them as per