Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-31-2011, 06:30 AM
armanrivard armanrivard is offline
Registered User
 
Join Date: Jan 2011
Posts: 3
Configuration Folder variable

I'm using a Logon script I setup in session options:
F:\VPN\SecureCRT\scripts\login.vbs

I would like to leverage the GLOBAL 'Configuration folder' info if I can:
$config_folder\VPN\SecureCRT\scripts\login.vbs


Is there I way?
Reply With Quote
  #2  
Old 01-31-2011, 11:46 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,307
Hi armanrivard,

Thanks for the question. In SecureCRT 6.6.1, you can accomplish your goal. It is important to note that you will need to use the correct syntax for environment variables. In Windows this is %variable%. You could set a Global or User environment variable with a name of "Config", and then you could access this variable by adding %Config% in the Configuration folder section of the General category of the Global Options Dialog.

Does this help you accomplish your goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 01-31-2011, 12:41 PM
armanrivard armanrivard is offline
Registered User
 
Join Date: Jan 2011
Posts: 3
Thsnk you for the reply. But rather than having users set ENV vars I am looking to leverage something that is already being set during installation.

In your Global Options dialog, the user is already setting the 'Configuration folder' to f:\VPN\mythings

Now in the sessions dialog I would like to use that setting to find the script files.

'Configuration folder'/myscripts/foo.vbs

I have lots of logon scripts and I dont want to give them full paths in the session dialog. It would be nice if I could use the Config folder data to find the scripts.


Quote:
Originally Posted by rtb
Hi armanrivard,

Thanks for the question. In SecureCRT 6.6.1, you can accomplish your goal. It is important to note that you will need to use the correct syntax for environment variables. In Windows this is %variable%. You could set a Global or User environment variable with a name of "Config", and then you could access this variable by adding %Config% in the Configuration folder section of the General category of the Global Options Dialog.

Does this help you accomplish your goal?
Reply With Quote
  #4  
Old 01-31-2011, 01:28 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,307
Hi armanrivard,

Thanks for the clarification of what you want. I have created a feature request in our SecureCRT development database to add the ability to use a "configuration folder" variable in the logon script path in SecureCRT. Should a future release of SecureCRT have this capability, we will post to this forum thread.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
In the meantime, you should be able to accomplish this goal using an environment variable.

Are you trying to resolve a specific problem by requesting this capability?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 01-31-2011, 02:56 PM
armanrivard armanrivard is offline
Registered User
 
Join Date: Jan 2011
Posts: 3
Excellent. I will be watching for the feature. Until then I will add an env that does the same.

My original issue:

I setup all of the secureCRT scripts and connections on an external drive on my local machine. I currently have more than 50 connections. Each connection runs a login script. Each login script location is setup in the session/options area and points to my local disk: v:/VPN/secureCRT/scripts/london.vbs

Once I have all of my connections automated I give the folder to other secureCRT users.

They drop the folder on an appropriate local drive and set the global 'Configuration folder' to that drive. So far so good.

But when the script tries to run it doesn't find my path. It's not possible for me to emulate my config for every user. But I can maintain the same directory structure on each system. if the v: could be replaced by the 'Configuration folder' it would all just fall into place.

Thank you for your efforts!
Reply With Quote
  #6  
Old 01-31-2011, 04:32 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,307
Hi armanrivard,

You are welcome. Thanks for letting me know what the original issue was. Based on this information, I think that the feature request is the best method to accomplish your goal. I would use the environment variables for now, though, because I can't say that this feature will be implemented any time in the near future.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #7  
Old 04-26-2016, 03:30 AM
plissje plissje is offline
Registered User
 
Join Date: Apr 2016
Posts: 2
Hi guys,
Quick question regarding this as well. Is it possible to somehow get this value for a login script as well?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 04:34 PM.