For some time now I have been using a vbscript to automatically close idle sessions to a XP-host in my network. It acts as a FTP-server and people use it a lot to access shared folders. After some open sessions, some clients can't connect anymore to the shared folders. The script cleares the connections of the users which doesn't have any open files.
I have the feeling that the script doesn't work anymore and sometimes an error-message appears. It is actually random when the script runs. I have set this to run every 5 minutes.
I hope you can help me resolve this. I have enclosed the error message on my server and the vbscript.
Thanks in advance!
Set dResources = CreateObject("Scripting.Dictionary")
Set oConnection = GetObject("WinNT://DT_A2O_XW6200_1/LanmanServer")
Set cResources = oConnection.Resources
For Each oResource in cResources
If Not dResources.Exists(LCase(oResource.User)) Then dResources.Add LCase(oResource.User), 1
Set cResources = Nothing
Set cSessions = oConnection.Sessions
For Each oSession in cSessions
If Not dResources.Exists(LCase(oSession.User)) Then _
Set cSessions = Nothing
Set oConnection = Nothing
Set dResources = Nothing