lugos Posted October 19, 2009 Share Posted October 19, 2009 Hello,C# newbie here. I am running an executable on a remote machine with the following code: Process remoteProcess = new Process();ProcessStartInfo remoteProcessStartInfo = new ProcessStartInfo();remoteProcessStartInfo.CreateNoWindow = true;remoteProcessStartInfo.ErrorDialog = false;remoteProcessStartInfo.RedirectStandardError = false;remoteProcessStartInfo.RedirectStandardOutput = false;remoteProcessStartInfo.UseShellExecute = false;remoteProcessStartInfo.FileName = "\\\\<remote_machine>\\winnt\\NOTEPAD.EXE";remoteProcess.StartInfo = remoteProcessStartInfo;remoteProcess.Start();remoteProcess.WaitForExit();remoteProcess.Dispose(); This accomplishes part of what I want to do. However, what I am seeing is that notepad is opening up on my local machine. It almost looks like it's downloading an instance of the notepad exe and running it locally. What I am looking to do is run it on the remote machine and have it open up there.Any assistance/direction would be greatly appreciated.Thanks in advance. Link to comment Share on other sites More sharing options...
lugos Posted October 19, 2009 Author Share Posted October 19, 2009 Hello,C# newbie here. I am running an executable on a remote machine with the following code:Process remoteProcess = new Process();ProcessStartInfo remoteProcessStartInfo = new ProcessStartInfo();remoteProcessStartInfo.CreateNoWindow = true;remoteProcessStartInfo.ErrorDialog = false;remoteProcessStartInfo.RedirectStandardError = false;remoteProcessStartInfo.RedirectStandardOutput = false;remoteProcessStartInfo.UseShellExecute = false;remoteProcessStartInfo.FileName = "\\\\<remote_machine>\\winnt\\NOTEPAD.EXE";remoteProcess.StartInfo = remoteProcessStartInfo;remoteProcess.Start();remoteProcess.WaitForExit();remoteProcess.Dispose(); This accomplishes part of what I want to do. However, what I am seeing is that notepad is opening up on my local machine. It almost looks like it's downloading an instance of the notepad exe and running it locally. What I am looking to do is run it on the remote machine and have it open up there.Any assistance/direction would be greatly appreciated.Thanks in advance. I found that this isn't possible. But I may be able accomplish my goal by creating a scheduled task for the executable and then start it through my application.Thanks. Link to comment Share on other sites More sharing options...
jesh Posted October 20, 2009 Share Posted October 20, 2009 If the other machine had a web server, you could create a page that the first machine hits which fires off that exe. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.