Find version of Chrome browser in registry

2020-07-17 14:13发布

问题:

How do I get Chrome version using PowerShell? I tried the following query:

(Get-ItemProperty 'HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome').DisplayVersion

This didn't work.

回答1:

This is probably what you want (it reads the version of the executable, not a value from the registry):

(Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo


回答2:

Here is a script to get GC version and save it in a file on a server. Hope you can use it.

#Set file path to store data
$filepathToStoreData = '\\v-server\Reports\O365ver\version.txt'

#Get Hostname
$hostname = Get-Content env:computername

#Get Google Chrome Version
$GCVersionInfo = (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Window\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
#Write-Host $GCVersionInfo.ProductVersion
$GCVersion = $GCVersionInfo.ProductVersion

#Add Date and Time
$CDate = Get-Date

$lineToWriteInFile = "$hostname,$GCVersion,$CDate"


#Writeversions in file
$lineToWriteInFile | Out-File -Encoding unicode -Append $filepathToStoreData
$lineToWriteInFile | Out-File -Encoding unicode -Append '´n'


回答3:

You can try following this path:

Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo

But I think it is easier to read about the Chrome version visiting the "About" Page. It is faster way in any case, visit this link for more info: https://rocketfiles.com/articles/what-version-of-chrome-do-i-have.



回答4:

It appears that this location HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon now has the version value with the name version