![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest
Posts: n/a
| 'runwait' equivalent I'm not sure if this question has been asked but searching returned nothing. Is there an easy way to wait until a process is complete when invoking native commands? What I'm doing is writing a script to measure the time it takes to map a printer using con2prt.exe. Each line is asynchrynously executed so obviously the measurements by measure-command are incorrect. Thanks in advance. |
|
|
| |
| | #2 (permalink) | ||||||||||||
| Guest
Posts: n/a
| RE: 'runwait' equivalent Okay, so looking down 6 lines, I see that someone asked about running external commands. Sorry, I guess I just suck at searching also :-(. I'll use the Diagnostics.Proces objects as indicated in that thread for my purpose but can anyone tell me if this will add unecessary time to my measurements? "Cookiecutter" wrote:
| ||||||||||||
| |||||||||||||
| | #3 (permalink) | ||||||||||||
| Guest
Posts: n/a
| Re: 'runwait' equivalent "Cookiecutter" <Cookiecutter@xxxxxx> wrote in message news:96C337E8-A68D-42B7-B500-C31323F97150@xxxxxx
PS> notepad | out-null -- Keith | ||||||||||||
| |||||||||||||
| | #4 (permalink) | ||||||||||||||||||||||||
| Guest
Posts: n/a
| Re: 'runwait' equivalent Wow, it IS really that simple. Thank you kind sir. "Keith Hill [MVP]" wrote:
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
| | #5 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest
Posts: n/a
| Re: 'runwait' equivalent How about this? $backup_process = get-process ntbackup $backup_process.waitforexit() -- Rob Pettrey Microsoft Small Business Specialist "Cookiecutter" wrote:
| ||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
| |
| |