VBScript hang at logoff with split tunnel vpn

I am troubleshooting a hang on a vbscript whichs runs at logoff when using a split-tunnel Cisco SSL vpn on a Windows Server 2003 domain.  The script loops through all possible mapped network drives (letters O through Z), enumerating and disconnecting the drives if mapped.  I use Cisco PIX Firewall, with both Cisco VPN client software and web-based SSL vpn.  The SSL vpn has split tunneling enabled so some lab machines can be reached.  I have enabled in Group Policy the Maximum Time to Wait for Scripts and set it to 45 seconds before ending the logoff.  This solves the problem of having remote users wait up to 10 minutes (600 second default before forcing logoff) to shut down their machines properly.  This hang happens with the ssl vpn connected or disconnected when the user logs off, but does not happen when using the vpn client (no split tunnel) in the same scenario.  Any ideas?

Thanks,
Jason
jcain103Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcsweenSr. Network AdministratorCommented:
Can you please post the function that removes the drive?  I'm thinking you may have to force it closed due to hanging open files.
0
jcain103Author Commented:
Set obj_Network = WScript.CreateObject("WScript.Network")
Set obj_FSO = CreateObject("Scripting.FileSystemObject")

      for i = 79 to 84
      ' If the drive letter is already in use then disconnect the drive
            If obj_FSO.DriveExists ( Chr(i)&":" ) Then
                  obj_Network.RemoveNetworkDrive Chr(i)&":"
            End If
      next
'we map the X drive as the user's home, thus skipping 85
for i = 86 to 90
      ' If the drive letter is already in use then disconnect the drive
            If obj_FSO.DriveExists ( Chr(i)&":" ) Then
                  obj_Network.RemoveNetworkDrive Chr(i)&":"
            End If
      next

 'Cleanup
Set obj_Network = Nothing
Set obj_FSO = Nothing

wscript.quit
0
mcsweenSr. Network AdministratorCommented:
Try to change the line
obj_Network.RemoveNetworkDrive Chr(i)&":"

to:
obj_Network.RemoveNetworkDrive Chr(i)&":" True,True

1st true will force, second will update their profile to make sure it doesn't try to map at next logon unless mapped by a script.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

mcsweenSr. Network AdministratorCommented:
You could also use a bit simpler of a script to do this, but I don't think that's your real issue...this will unmap all network drives except "x:"


Set obj_Network = WScript.CreateObject("WScript.Network")
Set odrives = wNetwork.EnumNetworkDrives

For i = 1 To odrives.Count - 1 Step 2
      If Not odrives.Item(i-1) = "X:" Then
              obj_Network.RemoveNetworkDrive odrives.Item(i-1),True,True
        End If

Next
0
jcain103Author Commented:
Didn't consider forcing the removal of the mapped drive.  As for the hanging open files, do you mean opened on the client's machine (e.g. my laptop while testing) from the mapped network share?  It hangs with or without ever exploring or opening the network share or any files on it.  I am almost positive it has something to do with the split vpn tunnel, that was my original reason for the post.  Will have to test this after hours and let you know.  (forgot that 85 is U, not X :)
0
mcsweenSr. Network AdministratorCommented:
Is this all the script does, or does it have some more functions in it?
0
jcain103Author Commented:
That's the entire script.  Only other script is run at login to map the drives.  If I am at home, I have to start the vpn after I login to my machine to get on the network, thus the drives are never mapped.  I just looked at the 4 GPO's that are in place for this macine, and for me as a user - the code above is the only logoff scripting to remove mapped drives.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.