Execute an Exe in Azure

DoctorWho 46 Reputation points
2022-04-08T20:01:55.157+00:00

Hi,

I have a standalone application, I mean it's a C++ application with an EXE in a folder and other dependencies that are needed during executing this EXE. I want to execute this EXE, and based on the result of the exe, do further actions, like upload files to storage. My first thought is that using Azure function: in an Azure function, execute exe and upload files. Is it possible to execute exe in Azure function? And how to do that? If it's not possible, then how can I achieve my goal in Azure? Building a micro service or something?

Thanks a lot.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,209 questions
{count} vote

Accepted answer
  1. Lohith GN 511 Reputation points
    2022-04-09T02:22:03.34+00:00

    Are you hosting your azure function on windows or linux ? i mean - the function app that is created - is it windows based or linux based?

    Steps that would involve is - deploying both your function code as well as the exe to your function app.

    Then you need to build the path to the exe at runtime and start a process to execute the exe. Here is a helpful blog which showcases executing an exe but the function code is in C#. I presume you should be able to do similar process execution from python - https://tharaka-madhusanka.medium.com/execute-windows-executable-file-from-azure-function-3e6f163f1b56

    Hope this helps

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Frank Boucher 1 Reputation point Microsoft Employee
    2022-12-09T16:46:33.567+00:00

    You need to bring your EXE or DLL with your Azure Function code. Then refer them from your Azure Function.
    Here is a 2-minute video that explains how to do it: Microsoft Developer - Execute an Exe in Azure

    0 comments No comments