anjali rai
anjali rai

Reputation: 195

Get Microsoft Edge Browser Version using registry or command line

How can i get microsoft edge browser version using registry or command line? I don't want to take it from UI.

Upvotes: 4

Views: 20746

Answers (4)

MC-Rhett
MC-Rhett

Reputation: 106

The older answers to this question seem to address Edge Legacy to the exclusion of Edge Chromium (which is now standard). Adding this answer to more fully outline current options targeting Edge Chromium, specifically.

Windows via Registry

For Windows systems, reading the Edge version from the registry is probably your best bet, since it's consistent even when the installation path varies. Some command-line for reading the installed version of Edge Chromium from the registry. There are a few options for that.

Using Powershell:

(Get-ItemProperty -Path HKCU:\Software\Microsoft\Edge\BLBeacon -Name version).version

Using Powershell and Windows Script Host:

(New-Object -ComObject WScript.Shell).RegRead("HKCU\Software\Microsoft\Edge\BLBeacon\version")

Using Reg Query:

reg query HKCU\Software\Microsoft\Edge\BLBeacon /v version

Windows via Executable

If you have more than one instance of Edge installed (for example, an Edge Dev Channel build) and you want to get the version of a specific installation, you can access the VersionInfo metadata of the Edge executable.

Using Powershell:

(Get-Item "C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe").VersionInfo.FileVersion

Using the WMIC tool:

(Note that escaping is required when translating the EXE path into the WMI query)

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

Non-Windows via App Binary

For non-Windows installations, running the binary from your shell with the --version flag seems to be the best bet. Your path may vary.

Ubuntu example:

/usr/bin/microsoft-edge --version

Mac OSX example:

/Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge --version

Via Package Managers:

Especially on Linux installations, where Edge is likely to have been installed using a standard package manager, version querying via package management is also a solid option.

Note that this option does only apply if the Edge installation is under package management, which is pretty uncommon in non-Linux userland.

Using apt (Ubuntu):

apt list microsoft-edge

Using Homebrew (Mac OSX):

brew info microsoft-edge

Using Chocolatey (Windows):

choco list -l microsoft-edge

Upvotes: 8

Lin Yun Wen
Lin Yun Wen

Reputation: 131

In Windows

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

use Get-Item

It is just like Get-AppxPackage. And get the version by adding .VersionInfo.

> (Get-Item "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe").VersionInfo

ProductVersion   FileVersion      FileName
--------------   -----------      --------
85.0.564.63      85.0.564.63      C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe


use wmic

wmic can 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

And then, 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

In MacOS

use --version

The application is executed from /Applications/"Microsoft Edge.app"/Contents/MacOS/"Microsoft Edge. Therefor, we can command like the bottom.

$ /Applications/"Microsoft Edge.app"/Contents/MacOS/"Microsoft Edge" --version
Microsoft Edge 85.0.564.63

Upvotes: 3

gsnedders
gsnedders

Reputation: 5692

For Microsoft Edge Legacy, you can get the version from PowerShell with Get-AppxPackage:

> (Get-AppxPackage Microsoft.MicrosoftEdge).Version
44.18214.1000.0

If you want to call this from cmd.exe, you can just call Powershell:

> powershell.exe "(Get-AppxPackage Microsoft.MicrosoftEdge).Version"
44.18214.1000.0

Upvotes: 3

Jitesh Sojitra
Jitesh Sojitra

Reputation: 4043

Run the following command:

REG QUERY HKEY_CLASSES_root\AppX3xxs313wwkfjhythsb8q46xdsq8d2cvv\Application /v ApplicationName

Example output:

HKEY_CLASSES_ROOT\AppX3xxs313wwkfjhythsb8q46xdsq8d2cvv\Application
    ApplicationName    REG_SZ    @{Microsoft.MicrosoftEdge_40.15063.674.0_neutral__8wekyb3d8bbwe?ms-resource://Microsoft
.MicrosoftEdge/Resources/AppName}

Now you just need to extract the version, e.g. the 40.15063.674.0.

Upvotes: 2

Related Questions