Dennis,
Beside your complain, for what I am not the best person to give you an
answer, some maybe help for your problem.
I saw your solution for the network drives, nice however the wmi classes
(which do not work on W98/Me so therefore can your solution be better) will
give you a probably better result in what you try to do and I made a sample
special for this problem, however not complete for you. You are smart enough
to know how to use it in my opinion.
------------------------------
Imports System.Manageme nt
\\\
Dim searcher As New ManagementObjec tSearcher _
("SELECT * FROM Win32_LogicalDi sk")
Dim ManObjOp As ManagementObjec t
If searcher.Get.Co unt > 1 Then
For Each ManObjOp In searcher.Get
Dim win32 As String = "Win32_LogicalD isk='" &
ManObjOp("Name" ).ToString & "'"
Dim ManObjLogD As New ManagementObjec t(win32)
For Each diskProperty As PropertyData In
ManObjLogD.Prop erties
If Not diskProperty.Va lue Is Nothing Then
Console.WriteLi ne _
("{0} = {1}", diskProperty.Na me, diskProperty.Va lue)
End If
Next
Next
End If
///
(Probably you can use as well instead of LogicalDisk , NetworkConnecti on)
Than for a lot of other parts you can use
http://msdn.microsoft.com/library/de...rpathtopic.asp
In a normal treeview of course,
However that where you are searching for My Neworklocations I have not
fount, so when you find that, than please let me know.
I have as well changed a little bit your code with the scripting maybe it
interest you
(I found it interesting code)
Imports IWshRuntimeLibr ary
\\\By Dennis of Houston (changed a little bit by Cor Ligthert)
Dim o As IWshNetwork2 = _
CType(CreateObj ect("WScript.Ne twork"), IWshNetwork2)
Dim odrives As WshCollection = CType(o.EnumNet workDrives, WshCollection)
Dim Drives(CInt(odr ives.Count / 2) - 1) As String
If odrives.Count > 0 Then
For i As Integer = 0 To odrives.Count - 1 Step 2
Drives(i) = odrives.Item(i + 0).ToString.ToL ower
Next
end if
///
I hope this helps?
Cor