Likurg Posted February 19, 2010 Share Posted February 19, 2010 (edited) Hello. I have an AutoIt script. It calls another process and I need to things: 1) Retrieve output of that another process 2) Retrieve exit code of another process Currently, the code gets only output(from out and err): Local $cmd = $BuildExePath & " /nologo /t:rebuild /p:Configuration=" & $ConfigName & " " & $SolutionName LogData("Cmd: " & $cmd) Local $process = Run(@ComSpec & ' /c ' & $cmd, $CurrentProjectDir, @SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD) Local $line While 1 $line &= StderrRead($process) If @error Then ExitLoop Sleep(10) WEnd While 1 $line &= StdoutRead($process) If @error Then ExitLoop Sleep(10) WEnd But I can not get exit code of msbuild I tried to use ProcessWaitClose and check @extended, but it seems, that it doesn't work this way, because @extended was something like -8983429347, but msbuild.exe must return 0 if everything is ok. I tried to use ShallExecute and RunWait, these two functions return exit code, but I don't see any possibility to retrieve output with them. Please, help! Any help would be highly appreciated. Edited February 19, 2010 by Likurg Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now