I have an app that installs a few services onto a PC. Now when the services are installed I need to start them.

Problem is that the app tries to start the services even before they are installed.

How can I run a loop that runs until the service exists?