mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-07 23:46:51 +08:00
Windows have lot's of tasks and services running which are slowing
the performance of build machine. Also 'windows' and 'windows
defender' updates need's to be "permanently" disabled.
Task-number: QTQAINFRA-3182
Change-Id: I8f6b237fcdc6e38fa9a06836d349821d86c58afc
(cherry picked from commit a3136bdbfe)
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
24 lines
554 B
PowerShell
24 lines
554 B
PowerShell
# The Windows as a Service (WaaS) Update Assessment Platform provides information on a device's Windows updates.
|
|
|
|
$limit = (Get-Date).AddMinutes(20)
|
|
$path = "C:\Windows\System32\WaaSAssessment.dll"
|
|
|
|
DO {
|
|
takeown /F $path
|
|
icacls $path /grant Administrators:f
|
|
Write-host "Deleting $path"
|
|
|
|
Try {
|
|
del $path
|
|
}
|
|
Catch [System.UnauthorizedAccessException] {
|
|
Write-host "Access to the path '$path' is denied."
|
|
Continue
|
|
}
|
|
|
|
if ((Get-Date) -gt $limit) {
|
|
exit 1
|
|
}
|
|
|
|
}while (Test-Path -Path "$path")
|