Mapping Network Drives

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • GWold

    #1

    Mapping Network Drives

    Hi all!

    I'm trying to figure out how to map a network drive in VB.NET/.NET
    Framework. I understand that I can add references to wscript and the
    scripting runtime library, but I want to do it w/VB.NET & the Framework.
    Suggestions? Thanks in advance!
  • Siva M

    #2
    Re: Mapping Network Drives

    One option is to spawn the "net use" command.

    "GWold" <GWold@discussi ons.microsoft.c om> wrote in message
    news:A3E7B265-0E35-4262-9505-D0718BFA1EFA@mi crosoft.com...
    Hi all!

    I'm trying to figure out how to map a network drive in VB.NET/.NET
    Framework. I understand that I can add references to wscript and the
    scripting runtime library, but I want to do it w/VB.NET & the Framework.
    Suggestions? Thanks in advance!


    Comment

    • GWold

      #3
      Re: Mapping Network Drives

      Right. I knew I could do that too, but I do want to use "pure" VB.NET and the
      ..NET Framework. Thanks for the suggestion Siva!

      "Siva M" wrote:
      [color=blue]
      > One option is to spawn the "net use" command.
      >
      > "GWold" <GWold@discussi ons.microsoft.c om> wrote in message
      > news:A3E7B265-0E35-4262-9505-D0718BFA1EFA@mi crosoft.com...
      > Hi all!
      >
      > I'm trying to figure out how to map a network drive in VB.NET/.NET
      > Framework. I understand that I can add references to wscript and the
      > scripting runtime library, but I want to do it w/VB.NET & the Framework.
      > Suggestions? Thanks in advance!
      >
      >
      >[/color]

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Mapping Network Drives

        "GWold" <GWold@discussi ons.microsoft.c om> schrieb:[color=blue]
        > Right. I knew I could do that too, but I do want to use "pure" VB.NET and
        > the
        > .NET Framework. Thanks for the suggestion Siva![/color]

        The .NET Framework currently doesn't support mapping network drives. You
        may either want to use WSH or p/invoke + 'NetShareAdd'.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        Working...