Pls can you help, I am trying to execute a remote process (bat file for example) on a remote server . The remote bat file is not on the same web server, but on a remote application server , but the 2 machines are in the same domain.

Do you have a code sample for that pls ??

For example, if I have a bat file on a remote machine which renames a remote file Test1.txt to Test2.txt. For now If I just use the regular startinfo process like this:

Processp = new Process();

p.StartInfo.RedirectStandardOutput = true;

p.StartInfo.UseShellExecute = false;

p.StartInfo.FileName = @"C:\myBatFile";

p.StartInfo.CreateNoWindow = true;

p.Start();

p.WaitForExit();
The issue I m facing with that code is that the bat file "myBatFile" executes on the web server itself rather than on the remote application serve. in other word, if I have a test file local on the web server: test1.txt it gets renamed to test2.txt , however my remote file: "test1.txt" on the application server remains as is "test1.txt"

any insight into this pls ??

Thank you