megahyperion Posted April 30, 2005 Posted April 30, 2005 Is it possible to get the computers current direct x version and the current cpu speed. Also would it be possible to get the direct x version supported by the video card ? i.e. direct x 7 on geforce 3 thanks in advance
Westi Posted April 30, 2005 Posted April 30, 2005 Runwait("dxdiag.exe /t dx.tmp /whql:off" , @tempdir ) FileOpen ( $file, 0 ) If $file = -1 Then Exit $cpu = FileReadLine ( $file , 11 );line to read the cpu info $dxv = FileReadLine ( $file , 15 );line to read the DirectX info $ddi = FileReadLine ( $file , 54 );line to read the DDI info FileClose( $file ) ;FileDelete ( $file ) MsgBox(0, "CPU", $cpu ) MsgBox(0, "DirectX-Version", $dxv ) MsgBox(0, "DDI-Version", $ddi ) Is this want u want?
Westi Posted April 30, 2005 Posted April 30, 2005 (edited) Sorry, i forget the vars:Dim $file = @tempdir & "\dx.tmp", $cpu, $dxv, $ddi Runwait("dxdiag.exe /t dx.tmp /whql:off" , @tempdir ) FileOpen ( $file, 0 ) If $file = -1 Then Exit $cpu = FileReadLine ( $file , 11 );line to read the cpu info $dxv = FileReadLine ( $file , 15 );line to read the DirectX info $ddi = FileReadLine ( $file , 54 );line to read the DDI info FileClose( $file ) ;FileDelete ( $file ) MsgBox(0, "CPU", $cpu ) MsgBox(0, "DirectX-Version", $dxv ) MsgBox(0, "DDI-Version", $ddi ) Edited April 30, 2005 by Westi
megahyperion Posted April 30, 2005 Author Posted April 30, 2005 Im getting an error on Fileclose Saying Invalid file handle used.
megahyperion Posted April 30, 2005 Author Posted April 30, 2005 Can you run me through what this line should be doing ? ("dxdiag.exe /t dx.tmp /whql:off" , @tempdir ) Maybe I can figure it out
megahyperion Posted April 30, 2005 Author Posted April 30, 2005 Ok I got this to work Runwait("dxdiag.exe /t dxtest.txt", @tempdir ) Dim $file = (@tempdir & "\dxtest.txt") FileOpen ( $file, 0 ) If $file = -1 Then Exit $cpu = FileReadLine ( $file , 11 );line to read the cpu info $dxv = FileReadLine ( $file , 15 );line to read the DirectX info $ddi = FileReadLine ( $file , 54 );line to read the DDI info ;FileDelete ( $file ) MsgBox(0, "CPU", $cpu ) MsgBox(0, "DirectX-Version", $dxv ) MsgBox(0, "DDI-Version", $ddi ) seems it didnt like the whql part
Westi Posted April 30, 2005 Posted April 30, 2005 Ok, i wrote it very fast. Here is a working script, sorry. :"> Dim $file = @tempdir & "\dx.tmp", $cpu, $dxv SplashTextOn("DX-Diag", " Please wait while processing...", 280, 30, -1, -1, 4, "", 14) Runwait("dxdiag.exe /t dx.tmp /whql:off" , @tempdir ) If FileExists ( $file ) then FileOpen ( $file, 0 ) If $file = -1 Then Exit $cpu = FileReadLine ( $file , 11 );line to read the cpu info $dxv = FileReadLine ( $file , 15 );line to read the DirectX info $ddi = FileReadLine ( $file , 54 );line to read the DDI info ;Check the right line in the dxd.tmp FileClose( $file ) SplashOff() MsgBox(0, "CPU", $cpu ) MsgBox(0, "DirectX-Version", $dxv ) MsgBox(0, "DDI-Version", $ddi ) MsgBox(0, "Whole textfile is in:", $file ) else MsgBox(4096,"Error", $file & " does not exist.") EndIfFor more information about dxdiag, type "dxdiag /?" in a console window.
megahyperion Posted April 30, 2005 Author Posted April 30, 2005 I found the problem, the whql needs to come before the file write SO Runwait("dxdiag.exe /whql:off /t dx.tmp" , @tempdir ) instead of Runwait("dxdiag.exe /t dx.tmp /whql:off" , @tempdir ) Thanks for the help though, its apreciated and all working now
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now