Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start-Process -Wait Not Working

I have powershell script that calls another .exe file. Start-Process ".\file.exe" -wait

file.exe is a simple windows with some message and has one only button to close the the .exe.

This is the first line in the main script runs. I want to wait and let the user to click close to proceed with the rest of the code.

However, the process starts, but the main program does not wait and starts executing the rest of the code.

Is there something else I need to do?

like image 225
Imsa Avatar asked Sep 16 '25 18:09

Imsa


1 Answers

not sure if this is what you're looking for, but you can use NSI wrapper to run the first script using ExecWait "powershell -File .\file.exe" and that should do the job.

run any other script after that and it will do what you're looking for.

like image 119
Omar Avatar answered Sep 19 '25 09:09

Omar