Mike
Fri Apr 30 13:26:05 CDT 2004
tomthumbkop wrote:
> Add in:
> objNetwork.RemoveNetworkDrive colDrives(i), True, True
> objNetwork.MapNetworkDrive colDrives(i), strPath, True
>
> Where strPath is the new UNC path and it should remove the old mapping
> and create the new on.
>
> Marty List wrote:
>
>>*"Mike Brierley" <mbrierley@co.marin.ca.us> wrote in message
>>news:%23LD5aWgLEHA.2396@TK2MSFTNGP12.phx.gbl...
>>
>>>**** Cross posted from DFS ****
>>>
>>>We are moving a few of our file servers behind DFS and would like
>>
>>to
>>
>>>remap the drives on our systems with a script.
>>>
>>>something like:
>>>
>>>enumerate drives into an array.
>>>Parse each array object mapped drive for \\fileserver1\share
>>>if exist
>>>remove mapping and remap with \\domain\dfsroot\share
>>>
>>>
>>>I know I cant be the first one to run across this.
>>>
>>>
>>>Mike
>>>
>>
>>
>>This might help you with the enumeration part:
>>
>>Dim objNetwork
>>Dim colDrives
>>Dim i
>>
>>Set objNetwork = WScript.CreateObject("WScript.Network")
>>Set colDrives = objNetwork.EnumNetworkDrives
>>For i = 0 To colDrives.Count - 1 Step 2
>>WScript.Echo vbNewLine & colDrives(i) & vbTab & colDrives(i + 1)
>>Next *
>
>
>
>
> --
> tomthumbkop
> ------------------------------------------------------------------------
> Posted via
http://www.codecomments.com
> ------------------------------------------------------------------------
>
thanks for the reply, I still dont have anything working. I'll keep
looking.