Use api or net use command to map drives?

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

    Use api or net use command to map drives?

    Hi,

    I just want to map a drive to some shared folder. I have simple
    requirements. I don't have login required for this mapped connection so
    I was wondering should I just use "net use" via Process class?

    I found,
    http://www.codeproject.com/csharp/mapnetdrive.asp which seems pretty
    neat but I was just wondering if I don't need the UI and some other
    stuff from that API why to use it unncessary? I don't think I would
    need those functionality in future as well.

    Is there some obvious drawback of using the "net use" vs some API built
    on mpr.dll??

    Btw, I am using Windows 2000 if that matters in anyway.

    Regards,
    Maulin

  • Willy Denoyette [MVP]

    #2
    Re: Use api or net use command to map drives?


    "Maulin Vasavada" <maulin.vasavad a@gmail.com> wrote in message
    news:1108205998 .016013.242940@ o13g2000cwo.goo glegroups.com.. .[color=blue]
    > Hi,
    >
    > I just want to map a drive to some shared folder. I have simple
    > requirements. I don't have login required for this mapped connection so
    > I was wondering should I just use "net use" via Process class?
    >
    > I found,
    > http://www.codeproject.com/csharp/mapnetdrive.asp which seems pretty
    > neat but I was just wondering if I don't need the UI and some other
    > stuff from that API why to use it unncessary? I don't think I would
    > need those functionality in future as well.
    >
    > Is there some obvious drawback of using the "net use" vs some API built
    > on mpr.dll??
    >
    > Btw, I am using Windows 2000 if that matters in anyway.
    >
    > Regards,
    > Maulin
    >[/color]

    No, just stick to the command line utilities if you can. I would also
    suggest to use UNC paths in your code instead of drive mapping.

    Willy.


    Comment

    Working...