C# map network drive and printers on Vista and XP

Posted on 2009-04-24
Last Modified: 2013-12-17

I worked on a small program that enable people who are not connected to our AD to map the drives they need

the program authinticate the user agains AD and then if the user is on the AD and the password is correct it map few drives

now I found some tool online help me with maping drives

BUT is there any way to use a native .Net functions ?

for mapping network drives and printers ?

Question by:Data-Base
    LVL 74

    Accepted Solution

    There is, to my knowledge, no native C# commands/libraries that allow you to map a drive. Your options include either using System.Diagnostics.Process.Start() to run a "net use" command, or use the Windows API or use the method you mentioned (which I'm sure uses one of the aforementioned methods).

    Author Comment

    Thanks for your reply,

    which one is better ?

    the API or the System.Diagnostics.Process.Start() and why

    and does both run on Vista ?

    Author Closing Comment

    Thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    Title # Comments Views Activity
    network + 7 57
    How do I fix a datagridview scramble in a Windows Form? 9 38
    IIs block files web.config 6 48
    C# primary key 9 46
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now