Antonio King
asked on
Remove all drives accept home folder
Our users home folder is set in the active directory.
I have a logon script that removes all drives and remaps them depending on computer location.
This removes the home folder aswel.
How do I change this code to ignore the U: drive?
I have a logon script that removes all drives and remaps them depending on computer location.
This removes the home folder aswel.
How do I change this code to ignore the U: drive?
' =============================================================================
' Force removal of all network drives
' =============================================================================
On Error Resume Next
DIM objNetwork,colDrives,i
Set objNetwork = CreateObject("Wscript.Network")
Set colDrives = objNetwork.EnumNetworkDrives
For i = 0 to colDrives.Count-1 Step 2
objNetwork.RemoveNetworkDrive colDrives.Item(i),TRUE,TRUE
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER