0

Dxdiag has very useful data about display card information, but I couldn't find any command line to get silent output from it. I need to get the memory of user's graphic card on Windows. Is there any solution to get it via Dxdiag or other resources?

I am using Python 2.7 on Windows 8.1

2 Answers 2

1

The dxdiag has the following command line options that could output information sliently,

/x outfile    Silently save XML information to <outfile> and quit. 

/t outfile    Silently save txt information to <outfile> and quit.

So, you can simply use "dxdiag /x myoutputfile" or "dxdiag /t myoutputfile"

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I did it then I opened XML file into my project. The problem was the outfile path, because it couldn't accept space character, so I changed the current dir of python using chdir() to temp folder, then I made a bat file and wrote that command line with dxdiag. then I ran the bat file using subprocess and after creation of XML file, I loaded it into my project.
How do you read the results from Python? I tried using subprocess.check_output, but it doesn't wait for the command to complete. It seems that dxdiag detaches itself from the parent process.
1

Dxdiag takes quite a while to complete (15 seconds on my setup), so it's probably not ideal to use from within code. Consider using:

  wmic path win32_VideoController get AdapterRam

That might be the information you are looking for. Additionally, you may be able to get extra information from the wmic interface.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.