|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PowerShellIs there anequivalent of the DOS shell "start /wait", to allow a command,
especially a GUI exe, to finish before executing the next line in the PowerShell. -- Regards, Brillig. Hi,
Not that I'm aware of. You'll get a larger body of people to potentially respond to your PowerShell questions on microsoft.public.windows.powershell. Andrew Watt MVP On Tue, 16 Jan 2007 05:38:00 -0800, Brillig <Bril***@discussions.microsoft.com> wrote: Show quoteHide quote >Is there anequivalent of the DOS shell "start /wait", to allow a command, >especially a GUI exe, to finish before executing the next line in the >PowerShell. > >-- >Regards, >Brillig. get-help start-sleep
Andrew Watt [MVP] wrote: Show quoteHide quote > Hi, > > Not that I'm aware of. > > You'll get a larger body of people to potentially respond to your > PowerShell questions on microsoft.public.windows.powershell. > > Andrew Watt MVP > > On Tue, 16 Jan 2007 05:38:00 -0800, Brillig > <Bril***@discussions.microsoft.com> wrote: > > >Is there anequivalent of the DOS shell "start /wait", to allow a command, > >especially a GUI exe, to finish before executing the next line in the > >PowerShell. > > > >-- > >Regards, > >Brillig. Yes, that takes you part way. But it pauses for a specified period of
time, which is ok if the GUI app exits before the end of that period. A better fit solution from microsoft.public.windows.powershell which doesn't depend on guesssing a period of time for the GUI app to complete is as follows: # get a handle for the Notepad process to wait for $notepad = [System.Diagnostics.Process]::Start( "notepad.exe" ) # wait indefinitely... $notepad.WaitForExit() Andrew Watt MVP Show quoteHide quote On 16 Jan 2007 10:25:46 -0800, "JakeDAHS" <jskib***@gmail.com> wrote: >get-help start-sleep > > > > >Andrew Watt [MVP] wrote: >> Hi, >> >> Not that I'm aware of. >> >> You'll get a larger body of people to potentially respond to your >> PowerShell questions on microsoft.public.windows.powershell. >> >> Andrew Watt MVP >> >> On Tue, 16 Jan 2007 05:38:00 -0800, Brillig >> <Bril***@discussions.microsoft.com> wrote: >> >> >Is there anequivalent of the DOS shell "start /wait", to allow a command, >> >especially a GUI exe, to finish before executing the next line in the >> >PowerShell. >> > >> >-- >> >Regards, >> >Brillig. I'm not worthy :) but I learned something new!
Thanks Andrew Andrew Watt [MVP] wrote: Show quoteHide quote > Yes, that takes you part way. But it pauses for a specified period of > time, which is ok if the GUI app exits before the end of that period. > > A better fit solution from microsoft.public.windows.powershell which > doesn't depend on guesssing a period of time for the GUI app to > complete is as follows: > > # get a handle for the Notepad process to wait for > $notepad = [System.Diagnostics.Process]::Start( "notepad.exe" ) > # wait indefinitely... > $notepad.WaitForExit() > > Andrew Watt MVP > > On 16 Jan 2007 10:25:46 -0800, "JakeDAHS" <jskib***@gmail.com> wrote: > > >get-help start-sleep > > > > > > > > > >Andrew Watt [MVP] wrote: > >> Hi, > >> > >> Not that I'm aware of. > >> > >> You'll get a larger body of people to potentially respond to your > >> PowerShell questions on microsoft.public.windows.powershell. > >> > >> Andrew Watt MVP > >> > >> On Tue, 16 Jan 2007 05:38:00 -0800, Brillig > >> <Bril***@discussions.microsoft.com> wrote: > >> > >> >Is there anequivalent of the DOS shell "start /wait", to allow a command, > >> >especially a GUI exe, to finish before executing the next line in the > >> >PowerShell. > >> > > >> >-- > >> >Regards, > >> >Brillig.
Write to file multiple times from Powershell
Migration from vbscript to powershell Getting group members of group on Domain A that contains users on Domain B checking for blocked inheritance in a group of users Search in text files Can't log AD user in add a local printer Script file for maping network drives ADS_UF_PASSWD_NOTREQD = &h00020 Printer Port Settings |
|||||||||||||||||||||||