How do I make the script wait for the execution of a program run
through the start-process?
Thanks
How do I make the script wait for the execution of a program run
through the start-process?
Thanks
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
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
> .
>
On 18 Dez., 03:14, PedroCesar <tec...@newsgroup> wrote:In PS 1.0 i used this:
> How do I make the script wait for the execution of a program run
> through the start-process?
>
> Thanks
($proc = [system.Diagnostics.Process]::Start
("notepad.exe")).WaitForExit()
| 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 |