Start.Process on remote system.

I am a long time IBM programmer, with a few years now of .net experience, so please forgive me if I get crossed up in terminology a bit;

We have a webserver, system 'A' and an application server, system 'B'.

A webapp on 'A' needs to run/trigger/call a console application on 'B'.

No problem there,  I've been using System.Process, which works quite well except that I recently discovered that when using this technique, the application is actually executing on 'A', not 'B'.

The application server 'B' is a much more powerful system than the webserver 'A'. I want to use the resources of 'B' to execute the app. I haven't been able to find an overload of  system.process.start that specifies which system to execute the app on.

Thanks for your help.
Who is Participating?
SStoryConnect With a Mentor Commented:
Check out system.diagnostics.process
create a ProcessInfo object with the appropriate args for psexec.

dim psi as new ProcessInfo(
dim p as process

I'm not sure how well this will work on a webserver, but you can launch a command-line process from a app.

Here's a way that claims to work:
This will do it for you.

Not sure it will help from a webservice
ordoAuthor Commented:
SStory ,

Thank you very much for your response.

I did look at PsExec, but unless I'm mistaken, it is a command-line tool. Can it be used in a program?
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

ordoAuthor Commented:
I probably should have specified this in my original question, but the webapp 'A' should not have to wait for the process/application on 'B' to complete. Similar to the  -d used in PsExec.
ordoAuthor Commented:

Thanks for your help. Here's what I worked out;

  Dim startInfo As New ProcessStartInfo()
        startInfo.WindowStyle = ProcessWindowStyle.Hidden
        startInfo.CreateNoWindow = True
        startInfo.FileName = "c:\psexec"
        startInfo.UseShellExecute = False
        startInfo.LoadUserProfile = True
        startInfo.Arguments = "\\remote-system-name   folder-path-to-remote-program"


Works like a charm.
All Courses

From novice to tech pro — start learning today.