Reputation: 2130
I have crated an MFC GUI application (blah.exe), and it works fine. I need to use it in a powershell script, and I need the script to wait for the .exe application to finish. But the .exe runs itself asynchronously, i.e. the invoking process does not wait for it to finish. How do I change this?
The application was created in Visual Studio 2010 with the standard MFC app wizard.
Upvotes: 0
Views: 110
Reputation: 6556
You should start your application using the following command in PowerShell:
Start-Process <path to exe> -NoNewWindow -Wait
Upvotes: 2