Closed Thread
Results 1 to 4 of 4

Thread: C# Mapping a network drive

  1. #1
    Void's Avatar
    Void is offline Programming Expert
    Join Date
    Jun 2006
    Posts
    410
    Rep Power
    23

    C# Mapping a network drive

    Here is some interesting code I found while browsing the newsgroups:

    Code:
    System.Diagnostics.Process.Start("net.exe", "use K: \\Server\URI\\path\\here");
    System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
    psi.FileName = "C:\\application.exe";
    psi.WorkingDirectory = "K:\\working\\directory";
    psi.WindowStyle = System.Diagnostics.
    ProcessWindowStyle.Maximized;
    System.Diagnostics.Process p =
    System.Diagnostics.Process.Start(psi);
    This code will map a network drive for you. Basically it just uses your Windows OS to do the mapping but is pretty neat to know. After it maps the directory is executes an application and sets the working directory.
    Void

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Lop's Avatar
    Lop
    Lop is offline Speaks fluent binary
    Join Date
    May 2006
    Posts
    1,178
    Rep Power
    30
    Thanks for the post Void. This may come in handy although it is very simple and probably would just be a matter of "thinking" about it.

  4. #3
    Ascension is offline Learning Programmer
    Join Date
    Dec 2008
    Posts
    42
    Rep Power
    0

    Re: C# Mapping a network drive

    Again, i have no idea what you are talking about but it might come in handy later i guess. Thanks?

  5. #4
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: C# Mapping a network drive

    Old threads should not be revived. Lop posted in 2006!

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 guests)

Similar Threads

  1. Automatic Port Mapping
    By plypencil in forum Visual Basic Programming
    Replies: 1
    Last Post: 06-28-2010, 07:59 PM
  2. EER Mapping Help
    By ahmed in forum Database & Database Programming
    Replies: 0
    Last Post: 05-31-2010, 04:31 AM
  3. mapping function?
    By Apprentice123 in forum General Programming
    Replies: 3
    Last Post: 09-04-2009, 09:24 AM
  4. Mount network drive
    By Crop in forum Linux Networking
    Replies: 2
    Last Post: 10-24-2007, 06:35 AM
  5. Mapping database in XSD
    By hoser2001 in forum JavaScript and CSS
    Replies: 1
    Last Post: 07-17-2007, 11:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts