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

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

问题描述

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

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

尝试过,

 "C:\Program Files\Google\Chrome\Application\chrome.exe" -version
 "C:\Program Files\Google\Chrome\Application\chrome.exe" --version
 "C:\Program Files\Google\Chrome\Application\chrome.exe" -product-version
 "C:\Program Files\Google\Chrome\Application\chrome.exe" --product-version

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

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

我正在使用Windows7。GoogleChrome版本为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

There's a bug filed about this: 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小组的某人将此完全错误注释线程中的 nsupported批处理文件:

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 HKLM\Software\Google\Update\Clients\%%A /v name /reg:32 2> NUL
  reg query HKLM\Software\Google\Update\Clients\%%A /v opv /reg:32 2> NUL
  reg query HKLM\Software\Google\Update\Clients\%%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 HKCU\Software\Google\Update\Clients\%%A /v name /reg:32 2> NUL
  reg query HKCU\Software\Google\Update\Clients\%%A /v opv /reg:32 2> NUL
  reg query HKCU\Software\Google\Update\Clients\%%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天全站免登陆