Launch application via command line script in release branch devops

I'm very new to this and have been picked up a task from a previous developer with the purpose being to run an automated test which launches an application via the command line script and reads some statistics. This all worked but the agent ran as interactive whereas I ideally want it running as a service. The problem is that the application won't launch unless the agent listener command prompt is active which defeats the point of it running as a service. So my question is - is there a way to launch an application via the command line script in a release pipeline when the agent is running as a service?