Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-07-2021, 05:21 AM
oliver366370 oliver366370 is offline
Registered User
 
Join Date: Sep 2018
Posts: 8
ConnectInTab is preventing further session changes

Hi all,

I have a relatively simple script in VBS that catches a session pre-login and changes the credentials to match a template session in order to automate password changes across multiple random devices.
I have managed to achieve this by disconnecting the current session, then changing the config and spawning the new session in a new tab as below.

Most code has been omitted for brevity.

Code:
        crt.Session.Disconnect
        Call OSCCurrent.SetOption("Username", OSCCredential.GetOption("Username"))
        Call OSCCurrent.SetOption("Password", OSCCredential.GetOption("Password"))
        Call OSCCurrent.SetOption("Session Password Saved", true)
        Call OSCCurrent.SetOption("Use Script File", false)
        OSCCurrent.ConnectInTab
        Call OSCCurrent.SetOption("Use Script File", true)
        OSCCurrent.Save(crt.Session.Path)
It is working almost perfectly, however the issue I am having is that once the ConnectInTab method is called, the following SetOption to reenable the script afterwards is not being saved to the config file.
My guess is that the ConnectInTab method is either locking the config file so that subsequent changes are not processed, or that the connected session is constantly overwriting the config file with it's operating options. All prior changes are saved to the config file normally.

Any help to figure this out would be much appreciated.
 

Tags
vbs

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 07:49 AM.