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

SecureCRT appears to clear on every session. Example.

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
  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