Turbo! I didn't fully understand what 'option explicit' did. Without that in (I'm sure I tried it before but hey...!) it worked. I also had to add another 'on error resume' to the removedrives sub routine to ensure that all existing drives were removed.
Originally Posted by apeo
Thanks very much for all your help! I'll upload the complete script for future reference when I've tidied it up a bit.
Set WSHNetwork = WScript.CreateObject("WScript.Network")
Set NetDrives = WSHNetwork.EnumNetworkDrives
On Error Resume Next
If NetDrives.Count <> 0 Then
For i = 0 To NetDrives.Count - 1
:) cool glad its working.
I may just use your script for myself... now that you've done all the work :)