Hello all,

We have a legacy application that enables to call some dlls files , send some parameters to make it do some actions.

We usually do this from a C# application and using the System.Diagnostics.Process methods with very success.

We would like to have the same funcionality but from an Outsystems application.

I've built a simple OS app to check this but didn't get any success.

1 - Fire up Integration studio and make a simple action with this code :

public void MssCreateAlerts(out string ssResult) {
// TODO: Write implementation for action
            ssResult = "";
            catch (Exception e)
                ssResult = e.Message;
            ssResult = "OK";
} // MssCreateAlerts

2 - Call CreateAlert in a new eSpace.
3 - When running I get the "OK" result message but notepad doesn't open. (it does in a C# console application).
No messages in Event Viewer or Service Center

Any ideas?

I see two issues.  The small issue is that your logic will always return OK as the result.  Delete the first line and move the ssResult = "OK" prior to the try statement and that issue will be solved.

The big issue is that I would never expect this to work.  Remember that the code is running on a web server, not on your local PC.  If Notepad did run, it would run on the server and you would never see it.  More than likely you don't have privileges to do this and you'll get an error, which you will see if you fix the first item I mentioned.

Hope this helps,
Hello Curt,

I'm running OS server in my local machine.

I still get the "OK" message.

I was not hoping it would work right out of the box, but that it would return some message that would send me in the right direction.

I know there's a way of this working, saw some posts here with other kind of errors related to the Process methods but didn't find anywhere what to do to make this work.


Hi André, if im not mistaken, the difference is when you run your code on visual studio, your windows user is running the process so it's visible to you. When the agile platform runs your code the process is lauched by the 'OutSystemsApplications' user. You can verify this by checking the the running processes on your machine, if the code execute you should seen the notepad.exe process running under a different context.
You are right.

It's working with the OutsystemsApplictions username

So should I assume everything is working as it's supposed?
I'll try to build a more complex app.
The one I'm really trying to build doesn't need to open any windows, it's something that will work in the background.
Well, you can attach your visual studio to the w3wp process and you can debug your execution from the OutSystems platform, it's the only way to be 100% sure.

In theory you shouldn't have problems executing the code just remember that the 'OutsystemsApplications' may not have the required permissions for some processes (eg. admin).
I've built a more complex example, both in C# Console and Outsystems, to get the same results.

I use Process.Kill() to kill the process after 30 seconnds if it has not exited and send a message to the output.

I have a dll from the legacy application that I call and set some parameters.
The first thing it does is writing to a txt log file some info.
With the C# Console it gets to that point and the Kill message is not shown meaning it exited before the 30 seconds.

From Outsystems , I see the process being lunched in Task Manager, it exits after the 30 seconds, sending the Kill message and nothing is written to the txt log file.

Guess there are still some permissions issues but I don't get any error message.

Why don't you try to run the application calling the Process.Start in a differente application pool, with a different user that you set with specific permission to write in that folder of the server?

How do set the OS extension to run in a different application pool?
Hello Nelson,

Here by a link that explains how to change the application pool:

You need to manage that change in IIS.
Just to let you know that after setting a new application pool with Localsystem as identity, it's now working and writing to the log file.

Many thanks to all.
glad it solved your problem ;)