'Mapback.vbs ' Works only on local LANs ' ASSUMPTIONS: ' + All client drives you wish to map are shared ' as $ (admin shares) ' You must select a mapping mode at top. The 2 modes ' are EMULATION and SEQUENTIAL. ' If you choose "emulation", the script will attempt ' to do all mappings based on emulating the client ' drive shares: A$ -> A:, C$ -> C:, and so on. ' If you choose "sequential", all drive mappings will be ' done beginning with the drive letter you choose as the ' BASELETTER. ' In either case, if drives conflict due to the existence of ' pre-existing local or mapped drives, the drives will not be ' mapped. Dim WmiSvc, Shares, Share Set Net = CreateObject("WScript.Network") Set Sh = CreateObject("WScript.Shell") Client = Sh.ExpandEnvironmentStrings("%CLIENTNAME%") If (Client<>"" AND Client<>"Console") Then Set WmiSvc = GetObject("winmgmts://" & "dc01" & "/root/cimv2") Set Shares = WmiSvc.ExecQuery( _ "Select * from Win32_Share") ReDim aTmp(Shares.Count - 1): i = -1 For Each Share In Shares If (Len(Share.Name)=2 And Mid(Share.Name, 2)="$") Then Drive = Left(Share.Name, 1) & ":" SharePath = "\\" & Client & "\" & Share.Name Net.MapNetworkDrive Drive, SharePath End If Next End If