Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7173067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:44:48+00:00 2026-05-28T15:44:48+00:00

I am have a powershell script that does a few things that all need

  • 0

I am have a powershell script that does a few things that all need to be completed sequentially. Currently I am using this code to run a couple external programs (assume I am in the correct directory)

.\program1.exe
.\program2.exe
.\program3.exe

The problem I am having is that these will all run sequentially, not waiting until the previous one is finished. Is there a way to make them wait until the previous program ends?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:44:49+00:00Added an answer on May 28, 2026 at 3:44 pm

    Most processes will cause PowerShell to wait until their completion unless they do something funky, like Oracle’s installers.

    You could try:

    Start-Process -FilePath program1.exe -Wait

    If this doesn’t work you might have do something like this:

    & program1.exe 
    while ($true) {
        Start-Sleep -Seconds 1
        if (-not (Get-Process -Name program1 -ErrorAction SilentlyContinue)) {
            break
        }
    }
    "...continue here"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL 2008 job that does database backups using a Powershell script.
I have a PowerShell script that does some checks on all Domain Admins in
I have the following code snippet from my PowerShell script that... Loops through a
I have the below code that does various things and checks hotfix info. I
Does anyone have a PowerShell script that will rename a local user account (Guest
Does anyone have a handy powershell script that gets a set of files from
all I implemented my first PowerShell script, that does some setup, sets registry keys
I have a Powershell script that copies files from one location to another. Once
I have a simple PowerShell script that uses WMI to create a web site
I have a complex Powershell script that gets run as part of a SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.