I need to run an exe file that is located on an network drive in my domain. The drive is successfully attached to my PC as "M:\", but I know that Process.Start( string , string...) need to have URL paths to files when staring processes located on network share.
This is my code:
string user = "user";
string password = "Qwerty1";
string domain = "nwtraderds";
string open = "file://myshare\dir1\dir2\dir3\test.exe";
string PwString = password;
char[] PasswordChars = PwString.ToCharArray();
SecureString Password = new SecureString();
foreach (char c in PasswordChars)
Password.AppendChar(c);
System.Diagnostics.Process.Start(open, user, Password, domain);
The funny thing is that:
System.Diagnostics.Process.Start(open);
Works fine. I have run out of ideas, could someone help me please?