Windows Vista Forums

make the script wait for the execution of a program
  1. #1


    PedroCesar Guest

    make the script wait for the execution of a program

    How do I make the script wait for the execution of a program run
    through the start-process?

    Thanks



      My System SpecsSystem Spec

  2. #2


    Marco Shaw [MVP] Guest

    Re: make the script wait for the execution of a program

    I think you can sometimes try piping to out-null to cause PowerShell to wait
    for completion.

    Give that a try...

    "PedroCesar" <tecdom@newsgroup> wrote in message
    news:7d4f98e8-0530-425d-8c46-55c9597b939a@newsgroup

    > How do I make the script wait for the execution of a program run
    > through the start-process?
    >
    > Thanks

      My System SpecsSystem Spec

  3. #3


    PaulChavez Guest

    RE: make the script wait for the execution of a program

    Start-Process has a -wait parameter that does exactly that, at least in V2.

    "PedroCesar" wrote:

    > How do I make the script wait for the execution of a program run
    > through the start-process?
    >
    > Thanks
    > .
    >

      My System SpecsSystem Spec

  4. #4


    BJ Guest

    Re: make the script wait for the execution of a program

    On 18 Dez., 03:14, PedroCesar <tec...@newsgroup> wrote:

    > How do I make the script wait for the execution of a program run
    > through the start-process?
    >
    > Thanks
    In PS 1.0 i used this:

    ($proc = [system.Diagnostics.Process]::Start
    ("notepad.exe")).WaitForExit()

      My System SpecsSystem Spec

make the script wait for the execution of a program problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wait for finishing a logout script before logging out / shuttingdown Jake Vista General 0 05 Feb 2010
Wait for finishing a logout script before logging out / shuttingdown Jake VB Script 0 05 Feb 2010
After script is complete, wait 15 minutes, then run again Robert Jacobs VB Script 4 23 Jul 2009
need to wait for command execution Frank PowerShell 1 03 Jun 2007
Terminate Script Execution? MKielman PowerShell 13 13 Oct 2006