View Single Post
  #3  
Old 05-14-2018, 02:56 AM
Nyber Nyber is offline
Registered User
 
Join Date: May 2018
Posts: 8
Jake,

SecureCRT appears to clear on every session. Example.

Test.vbs
Code:
Option Explicit
Dim wshShell,wshSystemEnv,strPassword,nResult
Set wshShell = CreateObject("WScript.Shell")
Set wshSystemEnv = wshShell.Environment("VOLATILE")

If wshShell.ExpandEnvironmentStrings("%PASSVAR%") = "%PASSVAR%" Then
  'If volatile variable is empty then set
  strPassword = InputBox("Enter password", "Password needed")
  wshSystemEnv("PASSVAR") = strPassword
Else
  WScript.Echo wshSystemEnv("PASSVAR")
End If
When running this in Windows you will only set the password once. However, Script > Run in SecureCRT will always prompt.
Reply With Quote