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.Management
\\\
Dim searcher As New ManagementObjectSearcher _
("SELECT * FROM Win32_LogicalDisk")
Dim ManObjOp As ManagementObject
If searcher.Get.Count > 1 Then
For Each ManObjOp In searcher.Get
Dim win32 As String = "Win32_LogicalDisk='" &
ManObjOp("Name").ToString & "'"
Dim ManObjLogD As New ManagementObject(win32)
For Each diskProperty As PropertyData In
ManObjLogD.Properties
If Not diskProperty.Value Is Nothing Then
Console.WriteLine _
("{0} = {1}", diskProperty.Name, diskProperty.Value)
End If
Next
Next
End If
///
(Probably you can use as well instead of LogicalDisk , NetworkConnection)
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 IWshRuntimeLibrary
\\\By Dennis of Houston (changed a little bit by Cor Ligthert)
Dim o As IWshNetwork2 = _
CType(CreateObject("WScript.Network"), IWshNetwork2)
Dim odrives As WshCollection = CType(o.EnumNetworkDrives, WshCollection)
Dim Drives(CInt(odrives.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.ToLower
Next
end if
///
I hope this helps?
Cor