如何在 Windows 中使用命令提示符获取 chrome 版本 [英] How to get chrome version using command prompt in windows

查看:170
本文介绍了如何在 Windows 中使用命令提示符获取 chrome 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Windows 中使用命令提示符获取已安装的 chrome 版本?

Is it possible to get version installed chrome version using command prompt in windows?

尝试过,

 "C:Program FilesGoogleChromeApplicationchrome.exe" -version
 "C:Program FilesGoogleChromeApplicationchrome.exe" --version
 "C:Program FilesGoogleChromeApplicationchrome.exe" -product-version
 "C:Program FilesGoogleChromeApplicationchrome.exe" --product-version

当我这样做时,浏览器实例正在打开.我应该使用什么标志来获取版本.

When i do that, a browser instance is opening. What flag should I be using to get the version.

我使用的是 Windows 7.Google Chrome 版本是 67.0.3396.87.

I am using Windows 7. Google Chrome version is 67.0.3396.87.

提前致谢

推荐答案

有一个关于此的错误:https://bugs.chromium.org/p/chromium/issues/detail?id=158372

对我有用的是

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

打印

Version=67.0.3396.99

被一些空行包围.

错误评论中还有一些其他建议,例如查询注册表.

There are some other suggestions in the bug comments, like querying the registry.

Chromium 团队的某个人在错误评论线程中发布了这个完全不受支持"的批处理文件:

Someone from the Chromium team posted this "totally unsupported" batch file in the bug comment thread:

@ECHO OFF

:: Look for machine-wide Chrome installs (stable, Beta, and Dev).
:: Get the name, running version (if an update is pending relaunch), and
:: installed version of each.
FOR %%A IN (
    {8A69D345-D564-463c-AFF1-A69D9E530F96},
    {8237E44A-0054-442C-B6B6-EA0509993955},
    {401C381F-E0DE-4B85-8BD8-3F3F14FBDA57}) DO (
  reg query HKLMSoftwareGoogleUpdateClients\%%A /v name /reg:32 2> NUL
  reg query HKLMSoftwareGoogleUpdateClients\%%A /v opv /reg:32 2> NUL
  reg query HKLMSoftwareGoogleUpdateClients\%%A /v pv /reg:32 2> NUL
)

:: Look for Chrome installs in the current user's %LOCALAPPDATA% directory
:: (stable, Beta, Dev, and canary).
:: Get the name, running version (if an update is pending relaunch), and
:: installed version of each.
FOR %%A IN (
    {8A69D345-D564-463c-AFF1-A69D9E530F96},
    {8237E44A-0054-442C-B6B6-EA0509993955},
    {401C381F-E0DE-4B85-8BD8-3F3F14FBDA57},
    {4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}) DO (
  reg query HKCUSoftwareGoogleUpdateClients\%%A /v name /reg:32 2> NUL
  reg query HKCUSoftwareGoogleUpdateClients\%%A /v opv /reg:32 2> NUL
  reg query HKCUSoftwareGoogleUpdateClients\%%A /v pv /reg:32 2> NUL
)

这可能应该被视为暂时的正确方式.

That should probably be seen as the right way to go for the time being.

这篇关于如何在 Windows 中使用命令提示符获取 chrome 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆