I had the similar issue then i tried this with the script which may help you overcome from the problem regarding the VPN connectivity. This script is used for the GUI interface of the user , it is also for the user drive tracking.
Code:
Public Const INFINITE = -1
Public Sub ShellWait(ByVal FileName As String, Optional WindowStyle As Variant)
Dim idProc As Long
Dim hProc As Long
' start program and save PID
idProc = VBA.Shell(FileName, WindowStyle)
_ALL_ACCESS, False, idProc)
'wait till program has finished
If hProc <> hNull Then' get process handle
hProc = OpenProcess(PROCESS
Call WaitForSingleObject(hProc, INFINITE)
Call CloseHandle(hProc)
End If
End Sub
Bookmarks