在注册表中查找 Chrome 浏览器的版本
Find version of Chrome browser in registry
如何使用 PowerShell 获取 Chrome 版本?我尝试了以下查询:
(Get-ItemProperty 'HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome').DisplayVersion
这没有用。
这可能是您想要的(它读取可执行文件的版本,而不是注册表中的值):
(Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
这是获取 GC 版本并将其保存在服务器文件中的脚本。
希望你能用得上。
#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'
您可以尝试以下路径:
Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
但我认为访问 "About" 页面更容易阅读有关 Chrome 版本的信息。无论如何,这是更快的方法,请访问此 link 了解更多信息:https://rocketfiles.com/articles/what-version-of-chrome-do-i-have。
看来此位置 HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon 现在具有名称为 version
的版本值
如何使用 PowerShell 获取 Chrome 版本?我尝试了以下查询:
(Get-ItemProperty 'HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome').DisplayVersion
这没有用。
这可能是您想要的(它读取可执行文件的版本,而不是注册表中的值):
(Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
这是获取 GC 版本并将其保存在服务器文件中的脚本。 希望你能用得上。
#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'
您可以尝试以下路径:
Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
但我认为访问 "About" 页面更容易阅读有关 Chrome 版本的信息。无论如何,这是更快的方法,请访问此 link 了解更多信息:https://rocketfiles.com/articles/what-version-of-chrome-do-i-have。
看来此位置 HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon 现在具有名称为 version
的版本值