mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
change GDIProcessHandleQuota to 20000 (#2780)
This commit is contained in:
committed by
GitHub
parent
5afe6fcc4e
commit
09ea8edb54
@@ -0,0 +1,9 @@
|
||||
# https://docs.microsoft.com/en-us/windows/win32/sysinfo/gdi-objects
|
||||
# This value can be set to a number between 256 and 65,536
|
||||
|
||||
$defaultValue = 20000
|
||||
Write-Host "Set the GDIProcessHandleQuota value to $defaultValue"
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" -Name GDIProcessHandleQuota -Value $defaultValue
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Windows" -Name GDIProcessHandleQuota -Value $defaultValue
|
||||
|
||||
Invoke-PesterTests -TestFile "WindowsFeatures" -TestName "GDIProcessHandleQuota"
|
||||
@@ -56,4 +56,13 @@ Describe "DynamicPorts" {
|
||||
|
||||
$udpPorts | Should -BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GDIProcessHandleQuota" {
|
||||
It "The GDIProcessHandleQuota value is 20000" {
|
||||
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows"
|
||||
$regPath32 = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Windows"
|
||||
(Get-ItemProperty $regPath).GDIProcessHandleQuota | Should -BeExactly 20000
|
||||
(Get-ItemProperty $regPath32).GDIProcessHandleQuota | Should -BeExactly 20000
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,6 +329,7 @@
|
||||
"scripts": [
|
||||
"{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1",
|
||||
"{{ template_dir }}/scripts/Installers/Configure-DynamicPort.ps1",
|
||||
"{{ template_dir }}/scripts/Installers/Configure-GDIProcessHandleQuota.ps1",
|
||||
"{{ template_dir }}/scripts/Installers/Configure-Shell.ps1"
|
||||
],
|
||||
"elevated_user": "{{user `install_user`}}",
|
||||
|
||||
@@ -322,6 +322,7 @@
|
||||
"scripts": [
|
||||
"{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1",
|
||||
"{{ template_dir }}/scripts/Installers/Configure-DynamicPort.ps1",
|
||||
"{{ template_dir }}/scripts/Installers/Configure-GDIProcessHandleQuota.ps1",
|
||||
"{{ template_dir }}/scripts/Installers/Configure-Shell.ps1"
|
||||
],
|
||||
"elevated_user": "{{user `install_user`}}",
|
||||
|
||||
Reference in New Issue
Block a user