On Error Resume Next Dim objNetwork, objDrives, objShell Dim strSubst, strSubstVal, strSubstName, strEnumDrive Set objNetwork = CreateObject("WScript.Network") Set objShell = CreateObject("Shell.Application") Set objDrives = objNetwork.EnumNetworkDrives For i = 0 to objDrives.Count - 1 Step 2 strSubst = objShell.NameSpace(objDrives.Item(i) & Chr(92)).Self.Name strSubstVal = inStr(1,strSubst, Chr(40)) - 2 strSubstName = Mid(strSubst, 1, strSubstVal) strEnumDrive = strEnumDrive & "Drive Letter: " & objDrives.Item(i) & vbCrlF & _ "Drive Name: " & strSubstName & vbCrlF & "Drive Path: " & _ objDrives.Item(i+1) & vbCrLf & vbCrLf Next MsgBox strEnumDrive ,, "All mapped Drives"
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE