Open Windows Explorer with network location requiring credentials

1.3k Views Asked by At

Could anyone please advise? I want my winforms app to open a network location. The network location is password protected etc, but that should be left for the user to enter as normal.

I tried this but explorer just opens at the default page (my computer).

Process.Start("Explorer.exe", @"/select,""" + "\\\\SomeLocation\\c$\\SomeDir\\" 
 + "\"");

I also tried this but it raises an exception:

Process.Start("\\\\SomeLocation\\c$\\SomeDir\\");

I got this error

'The specified network password is not correct'

I don't want network credentials to be a part of the application.

1

There are 1 best solutions below

3
On
Process.Start("explorer.exe", @"\\m3\c$");

Note sure if you should pass a subdirectory.