I have a vbs script that automatically runs when users connect to our VPN (script is local to each machine). I am attempting to have this script then call and run our logon.vbs script from \\DomainController\NETLOGON\logon.vbs so that the users have the same mapped drives and other environment options defined in this script. But, for some reason it doesn't run and I'm not sure where the issue lies. Wscript just sits as a task in task manager. I have attempted adding sleep commands, changing syntax, implementing other suggestions, but still no go. Hopefully, I am just missing something simple.
If I run the script directly (2x-click), it prompts to open and then runs fine.
... Any help is greatly appreciated...
Below is the code that is inside of the OnConnect.vbs script that runs on VPN connect:
--------------------------------------------
If I run the script directly (2x-click), it prompts to open and then runs fine.
... Any help is greatly appreciated...
Below is the code that is inside of the OnConnect.vbs script that runs on VPN connect:
Code:
Option Explicit
'On Error Resume Next
WScript.Sleep(20000)
'Call logon.vbs to initiate the logon script to map drives, printers, etc.
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "\\IPaddress of DC\NETLOGON\logon.vbs"
WScript.Quit