Can someone help me with this problem?
I have got a set of executable files locally, and those need to be run remotely and the output returned from them. I've got the remote machine logon credentials. Could you let me know if there is a way to do this programmatically in C++, C#/powershell/WMI etc?
You should look at using Both PSTools combined the the c# Process Class. PSTools allow you to fire processes remote machines.
An Example :-
** EDIT **
An example of running a batch file on a remote machine :-
// Create a New Process Object.
Process p = new Process();
//Assign the file you wish to execute.
p.StartInfo.FileName = "C:\\Utilities\\psexec.exe";
// We don't want a window creating for this task
p.StartInfo.CreateNoWindow = true;
// We don't want to use the operating system shell.
p.StartInfo.UseShellExecute = false;
// Here we set the argument to fire on the remote machine that will launch the Batc File.
p.StartInfo.Arguments = "\\\\" + RemoteMachineName + " C:\\YourBatFile.bat";
// Now to Start the Process.
p.Start();
// If you want to wait until the Process before moving on
p.WaitForExit();
This should give you the Idea to move forward with other tasks. It works for more than just opening files. You can use it to Insatll / Uninstall MsiInstaller products just like you can with WMI. If you want to Redirect the Output, you simply store it in a string object.