When I execute gpupdate in an command-window it writes "Updating policy ..." immediately after I started it, but when executed via PureBasic's RunProgram it looks like there is no output until the gpupdate exits:
Code: Select all
handle = RunProgram("gpupdate", "", "", #PB_Program_Open | #PB_Program_Read | #PB_Program_Error)
While ProgramRunning(handle)
Debug "Running ..."
If AvailableProgramOutput(handle)
Debug "Output: " + ReadProgramString(handle)
EndIf
Delay(500)
Wend