Collecting Mapped Drives into a ComboBox RRS feed

  • Question

  • Hello,

    First, my apologies (once again) for requesting assistance on such a small matter.  However, I've looked high and low and I'm just not seeing anythnig that would come close to my concerns.

    Second, I'm starting to realize that VB.NET doesn't seem to have a method of collecting mapped drives to the best of my knowledge and it's making life a bit difficult for me.  If it can't be done I can settle for that but if it can I'm just not finding it.

    I simply want to be able to view all logical and mapped drives in any list, dialog, etc.  I've used OpenFolderDialog, OpenFileDialog, Envrionment.? and experimented with WMI.  I'm using Visual Studio 2010 Express with .NET Framework 3/4.  I'm using this bit of code to open a dialog to retrieve a folder:

        Private Sub btn_browse1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_browse1.Click
            ' target button for the open file browser window
            If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
                Txt_Source.Text = FolderBrowserDialog1.SelectedPath
                If Mid(Txt_Source.Text, 1, 1) <> "C" Then
                    radio_Save_Profile.Enabled = False
                    radio_Save_Profile.Checked = False
                    radio_Save_Profile.Enabled = True
                End If
            End If
        End Sub

    I've been in MSDN and other internet sources to no avail. Any assistance will help at this point.



    Thursday, November 22, 2012 8:18 PM