Open windows explorer at server path

Discussion in 'Microsoft Dot NET Framework' started by Colin Williams, Sep 14, 2006.

  1. I am trying to open windows explorer at a specific path on a server.
    Path is not found
    whe run. It works ok using a local path. How do i address a server?

    Code as follows;
    {
    System.Diagnostics.ProcessStartInfo exploreTest
    = new System.Diagnostics.ProcessStartInfo();
    exploreTest.FileName = "explorer.exe";
    exploreTest.Arguments ="\"\\servername\\path\\";
    System.Diagnostics.Process.Start(exploreTest);
    }
    Thanks
    Colin Williams
     
    Colin Williams, Sep 14, 2006
    #1
    1. Advertisements

  2. Hello, Colin!

    CW> I am trying to open windows explorer at a specific path on a server.
    CW> Path is not found
    CW> whe run. It works ok using a local path. How do i address a server?

    CW> Code as follows;
    CW> {
    CW> System.Diagnostics.ProcessStartInfo exploreTest
    CW> = new System.Diagnostics.ProcessStartInfo();
    CW> exploreTest.FileName = "explorer.exe";
    CW> exploreTest.Arguments ="\"\\servername\\path\\";
    CW> System.Diagnostics.Process.Start(exploreTest);
    CW> }

    You're missing double "\" symbol. Server name must be prefixed with
    doble "\"

    So, change this line of code
    exploreTest.Arguments ="\\\\servername\\path\\";
    or
    exploreTest.Arguments = @"\\servername\path\";

    --
    Regards, Vadym Stetsyak
    www: http://vadmyst.blogspot.com
     
    Vadym Stetsyak, Sep 15, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Tom Dacon

    "Open .Net Command Window Here" context menu for Windows Explorer

    Tom Dacon, Nov 2, 2003, in forum: Microsoft Dot NET Framework
    Replies:
    0
    Views:
    386
    Tom Dacon
    Nov 2, 2003
  2. gerry

    why relative hint path but absolute reference path

    gerry, Sep 22, 2004, in forum: Microsoft Dot NET Framework
    Replies:
    1
    Views:
    2,292
    Peter Huang
    Sep 23, 2004
  3. MW

    Windows Installer: Registry path + Fixed path

    MW, Mar 4, 2005, in forum: Microsoft Dot NET Framework
    Replies:
    2
    Views:
    1,099
    Phil Wilson
    Mar 5, 2005
  4. Guest

    Windows path and settings file

    Guest, Apr 27, 2005, in forum: Microsoft Dot NET Framework
    Replies:
    2
    Views:
    174
    Guest
    Apr 29, 2005
  5. Replies:
    3
    Views:
    3,181
    Nick Malik [Microsoft]
    Jun 14, 2005
  6. start/open windows explorer from code

    , Mar 30, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    3
    Views:
    207
  7. elgdav

    Get machine name path from relative or absolute path

    elgdav, Sep 1, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    4
    Views:
    2,771
    elgdav
    Sep 5, 2006
  8. Walter Deodiaus

    what is the location of the dll's path on a server

    Walter Deodiaus, May 21, 2008, in forum: Microsoft Dot NET Framework
    Replies:
    12
    Views:
    404
    Juan T. Llibre
    May 26, 2008
Loading...