Skip to content

Commit 26c57a7

Browse files
committed
Added list of running services
1 parent b22359b commit 26c57a7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

MTADiag/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
#include <time.h>
2727
#include "Log.h"
2828

29-
#define VERSION "2.7.20"
29+
#define VERSION "2.7.21"

MTADiag/Diag.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void Diag::Begin ( void )
161161

162162
// gather the most useful system information first
163163
#ifndef SKIPDXDIAG
164-
if ( DoSystemCommandWithOutput ( std::string( "dxdiag /dontskip /whql:off /t " ) + files[FILE_TEMP], OUTPUT_NONE, 120000 ) == WAIT_TIMEOUT )
164+
if ( DoSystemCommandWithOutput ( std::string( "dxdiag /dontskip /whql:off /t " ) + files[FILE_TEMP], OUTPUT_NONE, 120000 ) != ERROR_SUCCESS )
165165
{
166166
// If timed out, try again but allow dxdiag to skip problem area
167167
ProgressBar ( 5 );
@@ -171,6 +171,8 @@ void Diag::Begin ( void )
171171
#endif
172172
DoSystemCommandWithOutput ( "tasklist", OUTPUT_ANSI, 120000 );
173173
ProgressBar ( 20 );
174+
DoSystemCommandWithOutput ( "net start", OUTPUT_ANSI, 120000 );
175+
ProgressBar ( 20 );
174176

175177
// write some of MTA's logs to our log
176178
Log::WriteDividerToLog ();
@@ -669,7 +671,7 @@ DWORD Diag::DoSystemCommandWithOutput ( std::string command, int outputType, DWO
669671
{
670672
DWORD dwExitCode = 0xFFFFFFFF;
671673
GetExitCodeProcess( pi.hProcess, &dwExitCode );
672-
ss << command << " (returned " << dwExitCode << ") [Took " << time( NULL ) - startTime << " seconds]";
674+
ss << command << " (returned 0x" << std::hex << dwExitCode << ") [Took " << time( NULL ) - startTime << " seconds]";
673675
}
674676
CloseHandle( pi.hProcess );
675677
CloseHandle( pi.hThread );

0 commit comments

Comments
 (0)