Using Process.Start in an expression shape

Home Page Forums BizTalk 2004 – BizTalk 2010 Using Process.Start in an expression shape

Viewing 1 reply thread
  • Author
    Posts
    • #19044

      I am trying to start a process in an expression using the C# code:

       System.Diagnostics.Process.Start(“IExplore.exe”);

       For some reason this is not starting an instance of the browser when the orchestration is run. Can anybody shed some light on why this would be the case?

       I put in another line:

      System.Console.Beep();

      This code is definitely being hit, so I can’t understand why the other line is not being executed.

      Thanks very much

    • #19053

       Launching a GUI application like Internet Explorer from an orchestration is a bad idea for many reasons, but I’m hoping that’s not really what yo’re after 🙂

      Anyway, the reason you won’t see the IE window popup is because your orchestration runs inside a windows service that has no access to the interactive session (in other words, it “pops up” in a different place from your actual desktop you see). What exactly are you trying to accomplish?

      • #19054

        Yep you are right. That is not really what I am after. I need to be able to call an external program from an orchestration – for example I want to run a bat file.

         What do you think?

        • #19067

          You should certainly be able to do that; as long as you remember that whatever process you launch can’t (and shouldn’t) interact with the desktop. In either case, you won’t be able to see the process launching on the desktop while you’re testing it, so use a tool like Procexp (or even plain old task manager) to check that the process is actually launching. You might want to give it some facilities for logging its execution; otherwise tracing errors and problems later may be painful.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.