Scripts Thread, Logon Script Help in Coding and Web Development; Originally Posted by apeo
If you leave option explicit in then you need to define every variable before you use ...
13th March 2008, 01:51 PM #16
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
Last edited by djones; 13th March 2008 at 08:00 PM.
13th March 2008, 03:08 PM #17
cool glad its working.
I may just use your script for myself... now that you've done all the work
13th March 2008, 06:00 PM #18
By mattx in forum Wireless Networks
Last Post: 15th September 2008, 11:16 AM
By karldenton in forum Windows
Last Post: 28th January 2008, 06:17 PM
By speckytecky in forum Scripts
Last Post: 20th April 2007, 10:08 AM
By ajbritton in forum Windows
Last Post: 19th June 2006, 09:47 AM
By Michael in forum Windows
Last Post: 30th March 2006, 02:33 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)