Running an .exe file synchronously

Welcome Forums General PowerShell Q&A Running an .exe file synchronously

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 9 months ago.

  • Author
  • #72400

    Points: 1
    Rank: Member

    I need to launch an .exe file from a PowerShell script and wait for the execution to complete.
    By the way, the .exe file is a setup file produced by Installshield.
    My .ps1 file looks like:

    write-host "I am going to install"
    write-host "Installation terminated"

    How can I force the message "Installation terminated" to appear only after mysetup.exe is complete?

  • #72401

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Try using Start-Process. The return object gives you a method you can use to wait for the process to terminate.

The topic ‘Running an .exe file synchronously’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort