mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-04 22:17:45 +08:00
With possibility to extend other drivers's versions into log
Task-number: QTQAINFRA-7168
Pick-to: 6.9 6.8
Change-Id: Ib10887fb904a75ccbb91bef2e9be0e83625da784
Reviewed-by: Matti Paaso <matti.paaso@qt.io>
(cherry picked from commit fc6aa80d32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
22 lines
678 B
PowerShell
22 lines
678 B
PowerShell
# Copyright (C) 2025 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
# This script will output usable drivers' versions in provision log
|
|
|
|
function LogDriverVersion
|
|
{
|
|
Param (
|
|
[string]$Name = $(BadParam("a name of the driver"))
|
|
)
|
|
|
|
$version = (Get-WmiObject Win32_PnPSignedDriver -Filter "DeviceName = '$Name'" | Format-Table Driverversion -HideTableHeaders | Out-String).Trim()
|
|
if ([string]::IsNullOrEmpty($version) -eq $true) {
|
|
Write-Host "No driver version found: '$Name'"
|
|
return
|
|
}
|
|
|
|
Write-Host "$Name = $version"
|
|
}
|
|
|
|
LogDriverVersion "VirtIO Serial Driver"
|