I have an external application which I want to launch and wait for a response from using an azure function, i.e. allowing me to execute it from PowerApps and Microsoft Logic.
I cobbled together some C# code (below - it is probably wrong) which should execute the process with the params supplied and report the STDOUT.
namespace FunctionApp1
{
    public static class Function1
    {
        [FunctionName("GetInfos")]
        public static void Run(string param, ILogger log){
            var process = System.Diagnostics.Process.Start("Obscure_Application.exe", param);
            var output = process.StandardOutput.ReadToEnd();
            process.WaitForExit();
            log.LogInformation(output);
        }
    }
}
I realize that if this application were to run it would have to:
- Be running on a machine with Windows OS.
 - Have the application installed.
 
As far as I understand the Azure Function hosts the runtime. How do you therefore:
- Ensure it is running on the correct OS?
 - Ensure it has the correct applications installed?
 
Edit:
This is different from Run EXE in Azure Functions, because a specific requirement is that the software is installed. The solution given in that question is strictly regarding self-contained exe files. If software is supplied as an installable msi, the above solution will not work.