Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a possibility to get the installed driver VERSION via command line on a Windows 7 system.

I've already tried driverquery but there is no information about the Version of the drivers, only a Linkdate. (By the way, what does that Link Date mean?)

I don't want tools or programs. I need a cmd line command.

Or can I get the version out of the registry?

share|improve this question

migrated from stackoverflow.com Mar 18 '13 at 19:53

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You can use driverquery /v to include the driver files with the listing, but AFAICS you won't be able to get the version number from the files without additional software. One tool you could use would be sigcheck from SysIntern^WMicrosoft.

@echo off

for /f "delims=, tokens=14" %%d in ('driverquery /v /nh /fo csv') do (
  for /f %%v in ('sigcheck -accepteula -q -n "%%~d"') do (
    echo %%~d %%~v
  )
)

You can't get the version out of the registry, because the information is stored in the file itself.

The link date is probably the date when the file was linked, i.e. the creation date.

share|improve this answer

You can use VBScript or JScript to get what you want. Since you didn't say for which driver you wanted the version number, here's a batch / JScript hybrid script that dumps them all to the console for you. Save this as driverversion.bat:

@if (@a==@b) @end /*
:: batch portion

@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%I in ('driverquery /v /nh /fo csv') do (
    set idx=0
    for %%x in (%%I) do (
        set /a "idx+=1"
        if !idx!==1 (
            set /p "=%%~x version "<NUL
        ) else if !idx!==14 (
            if exist "%%~x" (
                cscript /nologo /e:jscript "%~f0" "%%~x"
            ) else echo N/A
        )
    )
)

goto :EOF

:: JScript portion */
WSH.Echo(new ActiveXObject("Scripting.FileSystemObject").GetFileVersion(WSH.Arguments(0)));
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.