As title says I'm trying to open a Shared Folder on File Explorer using other credentials (I already did it without using userName and Password).
Here's what I tried:
Process prc = new Process();
prc.StartInfo.FileName = Folder; // <-- Calculated string, special characters correctly escaped.
prc.StartInfo.Domain = FolderDomain; // <-- String
prc.StartInfo.UserName = User; // <-- String
prc.StartInfo.Password = Password; // <-- SecureString
prc.StartInfo.UseShellExecute = false;
prc.Start();
That code send me to Catch on "prc.Start();" with the exception message "Access denied". The question is that the user I'm trying to log as does have permissions...
Where am I making the mistake?