#1
|
|||
|
|||
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) 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 |
|
|