; Windows only
Define hProg, Output$
hProg = RunProgram(GetEnvironmentVariable("ComSpec"), ; cmd.exe
                   "/u /c (DIR " + Chr(34) + #PB_Compiler_Home + "\SDK\DocMaker" + Chr(34) + " /B /S /A-D)", "",
                   #PB_Program_Open | #PB_Program_Read | #PB_Program_Error | #PB_Program_Unicode | #PB_Program_Hide)
Output$ = ""
If hProg
	While ProgramRunning(hProg)
		If AvailableProgramOutput(hProg)
			Output$ + ReadProgramString(hProg) + Chr(13)
		EndIf
	Wend
	Output$ + Chr(13) + Chr(13)
	Output$ + "Exitcode: " + Str(ProgramExitCode(hProg))

	CloseProgram(hProg)
EndIf

MessageRequester("Output", Output$)