1

I want to get Version number for particular installed program on windows. I do not want complete list of program, just version number for particular program just like we get java version e.g. java -version

I tried to get version number for Google chrome installed on my system:

Command : google chrome -version

I am expecting just like below command gives exact version of java , I should get version number of any installed program on my system

java -version

shows exact version

AKHILESH ANASANE
  • 31
  • 1
  • 1
  • 2
  • 2
    Possible duplicate of [Windows: Command line to read version info of an executable file?](https://stackoverflow.com/questions/25648155/windows-command-line-to-read-version-info-of-an-executable-file) – Valentino Apr 12 '19 at 15:07
  • If the program to test doesn't support that command line arg you'll have to use another tool with powershell present try from cmd line: `powershell -nop -c "(gcm \"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe\").Version"` –  Apr 12 '19 at 15:09
  • If the executable returns the version info in the console, try something like [`for /F`](https://ss64.com/nt/for_cmd.html)`"delims=" %I in ('some.exe -option 2^>^&1') do @echo %I`... – aschipfl Apr 13 '19 at 08:36

2 Answers2

3
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value

OUTPUT:

Version=73.0.3683.103

3

In Windows

The first of all, you need to get the path of the .exe file of the application.

You can use wmic to get the information of the application. And we set the name key for which application you want to check.

> wmic datafile where 'name="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"'

AccessMask  Archive  Caption                                                       Compressed  CompressionMethod  CreationClassName  CreationDate               CSCreationClassName   CSName           Description                                                   Drive  EightDotThreeFileName                                         Encrypted  EncryptionMethod  Extension  FileName  FileSize  FileType     FSCreationClassName  FSName  Hidden  InstallDate                InUseCount  LastAccessed               LastModified               Manufacturer           Name                                                          Path                                              Readable  Status  System  Version      Writeable
1179817     TRUE     C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe  FALSE                          CIM_LogicalFile    20200924185451.733609+480  Win32_ComputerSystem  DESKTOP-QCUDFJL  C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe  c:     c:\program files (x86)\microsoft\edge\application\msedge.exe  FALSE                        exe        msedge    2882448   Application  Win32_FileSystem     NTFS    FALSE   20200924185451.733609+480              20200928200140.091076+480  20200923164851.469016+480  Microsoft Corporation  C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe  \program files (x86)\microsoft\edge\application\  TRUE      OK      FALSE   85.0.564.63  TRUE

In addition, you can filter the result by adding get {key} at the end of command.

> wmic datafile where 'name="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"' get version

Version
85.0.564.63
Lin Yun Wen
  • 91
  • 1
  • 5