diff options
author | Elias Toivola <elias.toivola@qt.io> | 2024-02-12 16:34:21 +0200 |
---|---|---|
committer | Elias Toivola <elias.toivola@qt.io> | 2024-03-28 18:30:59 +0200 |
commit | 5157d1ef93d1a59f4a64c49c411f53c51a9a6d58 (patch) | |
tree | 32814ea63f20eaf2b30d7d09611209df6ad7039f /coin/pre-provisioning/qtci-windows-11_23H2-x86_64/disable-windows-update-medic.ps1 | |
parent | 786faf4727b13ac9d47b39a3a56bc50199f09fb0 (diff) |
Add Windows 11 23H2 as non-blocking in CI
Windows 11 23H2 version which will replace Windows 11 22H2 once the new version is deemed as stable. Until then, 23h2 tests will be set as insignificant.
Task-number: QTQAINFRA-6075
Task-number: QTQAINFRA-6113
Change-Id: I15054813896210fadf14da815ad5a7b3e402e800
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Diffstat (limited to 'coin/pre-provisioning/qtci-windows-11_23H2-x86_64/disable-windows-update-medic.ps1')
-rw-r--r-- | coin/pre-provisioning/qtci-windows-11_23H2-x86_64/disable-windows-update-medic.ps1 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/coin/pre-provisioning/qtci-windows-11_23H2-x86_64/disable-windows-update-medic.ps1 b/coin/pre-provisioning/qtci-windows-11_23H2-x86_64/disable-windows-update-medic.ps1 new file mode 100644 index 00000000..6accbd3b --- /dev/null +++ b/coin/pre-provisioning/qtci-windows-11_23H2-x86_64/disable-windows-update-medic.ps1 @@ -0,0 +1,25 @@ +# Windows Update Medic Service (WaaSMedicSvc)'PerformRemediation' helps recover update-related services to the supported configuration. +# WaasMedicSvc keeps re-starting Windows Update, even if it disabled manually. +# Even Admin user don't have privileged to disable PerformRemediation from Task Scheduler which means that WaaSMedicSvc.dll need's to be removed from the system + +$limit = (Get-Date).AddMinutes(20) +$path = "C:\Windows\System32\WaaSMedicSvc.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") |