如何使用注册表或命令行获取microsoft edge浏览器版本? 我不想从UI中获取它。
答案 0 :(得分:3)
您可以使用Get-AppxPackage从PowerShell中获取版本:
> (Get-AppxPackage Microsoft.MicrosoftEdge).Version
44.18214.1000.0
如果要从cmd.exe调用它,则可以仅调用Powershell:
> powershell.exe "(Get-AppxPackage Microsoft.MicrosoftEdge).Version"
44.18214.1000.0
答案 1 :(得分:2)
运行以下命令:
REG QUERY HKEY_CLASSES_root\AppX3xxs313wwkfjhythsb8q46xdsq8d2cvv\Application /v ApplicationName
示例输出:
HKEY_CLASSES_ROOT\AppX3xxs313wwkfjhythsb8q46xdsq8d2cvv\Application
ApplicationName REG_SZ @{Microsoft.MicrosoftEdge_40.15063.674.0_neutral__8wekyb3d8bbwe?ms-resource://Microsoft
.MicrosoftEdge/Resources/AppName}
现在您只需要提取版本,例如40.15063.674.0
。
答案 2 :(得分:0)
首先,您需要获取应用程序.exe文件的路径。
Get-Item
就像Get-AppxPackage
。并通过添加.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
wmic
wmic
可以获取应用程序的信息。然后,我们为您要检查的应用程序设置了name
键。
> 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
然后,通过在命令末尾添加get {key}
来过滤结果。
> wmic datafile where 'name="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"' get version
Version
85.0.564.63
--version
该应用程序从/Applications/"Microsoft Edge.app"/Contents/MacOS/"Microsoft Edge
执行。因此,我们可以像底部一样命令。
$ /Applications/"Microsoft Edge.app"/Contents/MacOS/"Microsoft Edge" --version
Microsoft Edge 85.0.564.63