Hi there
How can I start a process on a remote computer in c#, say computer name = "someComputer", using System.Diagnostics.Process class?
I Created a small Console app on that remote computer that just writes "Hello world" to a txt file, and I would like to call it remotely Console app path: c:\MyAppFolder\MyApp.exe
currently I have this:
ProcessStartInfo startInfo = new ProcessStartInfo(string.Format(@"\\{0}\{1}", someComputer, somePath);
startInfo.UserName = "MyUserName";
SecureString sec = new SecureString();
string pwd = "MyPassword";
foreach (char item in pwd)
{
sec.AppendChar(item);
}
sec.MakeReadOnly();
startInfo.Password = sec;
startInfo.UseShellExecute = false;
Process.Start(startInfo);
I keep getting "Network path was not found"