Browse Source

Removed Set-AppGraphicsPerformance function as unnecessary one

pull/635/head
Dmitry Nefedov 11 months ago
parent
commit
70f2f13ce6
  1. 13
      Wrapper/Config/config_Windows_10.json
  2. 15
      Wrapper/Config/config_Windows_10_LTSC.json
  3. 13
      Wrapper/Config/config_Windows_11.json
  4. 14
      Wrapper/Config/config_Windows_11_LTSC.json
  5. 2
      Wrapper/Config/wrapper_config.json
  6. 10
      Wrapper/Localizations/de-DE/tooltip_Windows_10.json
  7. 10
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  8. 10
      Wrapper/Localizations/en-US/tooltip_Windows_10.json
  9. 10
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  10. 10
      Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
  11. 10
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  12. 60
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  13. 4
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  14. 62
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  15. 6
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  16. 60
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  17. 4
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  18. 60
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  19. 4
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  20. 60
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  21. 4
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  22. 60
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  23. 4
      src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1
  24. 60
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  25. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

13
Wrapper/Config/config_Windows_10.json

@ -1861,19 +1861,6 @@
"Preset": "Zero", "Preset": "Zero",
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{
"Region": "Gaming",
"Control": "chk",
"Required": "false",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "Zero",
"WindowsDefault": ""
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Control": "cmb", "Control": "cmb",

15
Wrapper/Config/config_Windows_10_LTSC.json

@ -1783,21 +1783,6 @@
"LTSC2019": "false", "LTSC2019": "false",
"LTSC2021": "true" "LTSC2021": "true"
}, },
{
"Region": "Gaming",
"Control": "chk",
"Required": "false",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "Zero",
"WindowsDefault": "",
"LTSC2019": "true",
"LTSC2021": "true"
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Control": "cmb", "Control": "cmb",

13
Wrapper/Config/config_Windows_11.json

@ -1658,19 +1658,6 @@
"Preset": "Zero", "Preset": "Zero",
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{
"Region": "Gaming",
"Control": "chk",
"Required": "false",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "Zero",
"WindowsDefault": ""
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Control": "cmb", "Control": "cmb",

14
Wrapper/Config/config_Windows_11_LTSC.json

@ -1669,20 +1669,6 @@
"WindowsDefault": "", "WindowsDefault": "",
"LTSC2024": "true" "LTSC2024": "true"
}, },
{
"Region": "Gaming",
"Control": "chk",
"Required": "false",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "Zero",
"WindowsDefault": "",
"LTSC2024": "true"
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Control": "cmb", "Control": "cmb",

2
Wrapper/Config/wrapper_config.json

@ -15,4 +15,4 @@
"widthWrapperInPixelsRU": "1055", "widthWrapperInPixelsRU": "1055",
"widthWrapperInPixelsDE": "1020", "widthWrapperInPixelsDE": "1020",
} }
] ]

10
Wrapper/Localizations/de-DE/tooltip_Windows_10.json

@ -1567,16 +1567,6 @@
} }
} }
}, },
{
"Region": "Gaming",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Wählen Sie eine Anwendung aus und stellen Sie für diese die \"Hohe Leistung\" für die Grafikleistung ein. Nur mit einer dedizierten GPU."
}
}
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Function": "GPUScheduling", "Function": "GPUScheduling",

10
Wrapper/Localizations/de-DE/tooltip_Windows_11.json

@ -1452,16 +1452,6 @@
} }
} }
}, },
{
"Region": "Gaming",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Wählen Sie eine Anwendung aus und stellen Sie für diese die \"Hohe Leistung\" für die Grafikleistung ein. Nur mit einer dedizierten GPU."
}
}
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Function": "GPUScheduling", "Function": "GPUScheduling",

10
Wrapper/Localizations/en-US/tooltip_Windows_10.json

@ -1561,16 +1561,6 @@
} }
} }
}, },
{
"Region": "Gaming",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Choose an app and set the \"High performance\" graphics performance for it. Only if you have a dedicated GPU."
}
}
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Function": "GPUScheduling", "Function": "GPUScheduling",

10
Wrapper/Localizations/en-US/tooltip_Windows_11.json

@ -1471,16 +1471,6 @@
} }
} }
}, },
{
"Region": "Gaming",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Choose an app and set the \"High performance\" graphics performance for it. Only if you have a dedicated GPU."
}
}
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Function": "GPUScheduling", "Function": "GPUScheduling",

10
Wrapper/Localizations/ru-RU/tooltip_Windows_10.json

@ -1567,16 +1567,6 @@
} }
} }
}, },
{
"Region": "Gaming",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Выбрать приложение и установить для него параметры производительности графики на \"Высокая производительность\". Только при наличии внешней видеокарты."
}
}
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Function": "GPUScheduling", "Function": "GPUScheduling",

10
Wrapper/Localizations/ru-RU/tooltip_Windows_11.json

@ -1452,16 +1452,6 @@
} }
} }
}, },
{
"Region": "Gaming",
"Function": "Set-AppGraphicsPerformance",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Выбрать приложение и установить для него параметры производительности графики на \"Высокая производительность\". Только при наличии внешней видеокарты."
}
}
},
{ {
"Region": "Gaming", "Region": "Gaming",
"Function": "GPUScheduling", "Function": "GPUScheduling",

60
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -11953,66 +11953,6 @@ function XboxGameTips
} }
} }
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Hardware-accelerated GPU scheduling Hardware-accelerated GPU scheduling

4
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -1131,10 +1131,6 @@ XboxGameTips -Disable
# Включить советы Xbox Game Bar (значение по умолчанию) # Включить советы Xbox Game Bar (значение по умолчанию)
# XboxGameTips -Enable # XboxGameTips -Enable
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
<# <#
Turn on hardware-accelerated GPU scheduling. Restart needed Turn on hardware-accelerated GPU scheduling. Restart needed
Only if you have a dedicated GPU and WDDM verion is 2.7 or higher Only if you have a dedicated GPU and WDDM verion is 2.7 or higher

62
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -8913,68 +8913,6 @@ function AppSuggestions
} }
#endregion Start menu #endregion Start menu
#region Gaming
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
#endregion Gaming
#region Scheduled tasks #region Scheduled tasks
<# <#
.SYNOPSIS .SYNOPSIS

6
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -830,12 +830,6 @@ AppSuggestions -Hide
# AppSuggestions -Show # AppSuggestions -Show
#endregion Start menu #endregion Start menu
#region Gaming
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
#endregion Gaming
#region Scheduled tasks #region Scheduled tasks
<# <#
Create the "Windows Cleanup" scheduled task for cleaning up Windows unused files and updates. Create the "Windows Cleanup" scheduled task for cleaning up Windows unused files and updates.

60
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -9970,66 +9970,6 @@ function PinToStart
#endregion Start menu #endregion Start menu
#region Gaming #region Gaming
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Hardware-accelerated GPU scheduling Hardware-accelerated GPU scheduling

4
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -959,10 +959,6 @@ PinToStart -Tiles ControlPanel, DevicesPrinters
#endregion Start menu #endregion Start menu
#region Gaming #region Gaming
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
<# <#
Turn on hardware-accelerated GPU scheduling. Restart needed Turn on hardware-accelerated GPU scheduling. Restart needed
Only if you have a dedicated GPU and WDDM verion is 2.7 or higher Only if you have a dedicated GPU and WDDM verion is 2.7 or higher

60
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -11997,66 +11997,6 @@ function XboxGameTips
} }
} }
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Hardware-accelerated GPU scheduling Hardware-accelerated GPU scheduling

4
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -1135,10 +1135,6 @@ XboxGameTips -Disable
# Включить советы Xbox Game Bar (значение по умолчанию) # Включить советы Xbox Game Bar (значение по умолчанию)
# XboxGameTips -Enable # XboxGameTips -Enable
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
<# <#
Turn on hardware-accelerated GPU scheduling. Restart needed Turn on hardware-accelerated GPU scheduling. Restart needed
Only if you have a dedicated GPU and WDDM verion is 2.7 or higher Only if you have a dedicated GPU and WDDM verion is 2.7 or higher

60
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -10992,66 +10992,6 @@ function XboxGameTips
} }
} }
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Hardware-accelerated GPU scheduling Hardware-accelerated GPU scheduling

4
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -1061,10 +1061,6 @@ XboxGameTips -Disable
# Включить советы Xbox Game Bar (значение по умолчанию) # Включить советы Xbox Game Bar (значение по умолчанию)
# XboxGameTips -Enable # XboxGameTips -Enable
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
<# <#
Turn on hardware-accelerated GPU scheduling. Restart needed Turn on hardware-accelerated GPU scheduling. Restart needed
Only if you have a dedicated GPU and WDDM verion is 2.7 or higher Only if you have a dedicated GPU and WDDM verion is 2.7 or higher

60
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -10327,66 +10327,6 @@ function UninstallUWPApps
#endregion UWP apps #endregion UWP apps
#region Gaming #region Gaming
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Hardware-accelerated GPU scheduling Hardware-accelerated GPU scheduling

4
src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1

@ -1007,10 +1007,6 @@ UninstallUWPApps
#endregion UWP apps #endregion UWP apps
#region Gaming #region Gaming
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
<# <#
Turn on hardware-accelerated GPU scheduling. Restart needed Turn on hardware-accelerated GPU scheduling. Restart needed
Only if you have a dedicated GPU and WDDM verion is 2.7 or higher Only if you have a dedicated GPU and WDDM verion is 2.7 or higher

60
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -11036,66 +11036,6 @@ function XboxGameTips
} }
} }
<#
.SYNOPSIS
Choose an app and set the "High performance" graphics performance for it
.EXAMPLE
Set-AppGraphicsPerformance
.NOTES
Works only with a dedicated GPU
.NOTES
Current user
#>
function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Menu $Browse -Default 1 -AddSkip
switch ($Choice)
{
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$OpenFileDialog.Filter = "*.exe|*.exe|{0} (*.*)|*.*" -f $Localization.AllFilesFilter
$OpenFileDialog.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$OpenFileDialog.Multiselect = $false
# Force move the open file dialog to the foreground
$Focus = New-Object -TypeName System.Windows.Forms.Form -Property @{TopMost = $true}
$OpenFileDialog.ShowDialog($Focus)
if ($OpenFileDialog.FileName)
{
if (-not (Test-Path -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences))
{
New-Item -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Force
}
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
$KeyboardArrows {}
}
}
until ($Choice -ne $KeyboardArrows)
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Hardware-accelerated GPU scheduling Hardware-accelerated GPU scheduling

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -1068,10 +1068,6 @@ XboxGameTips -Disable
# Включить советы Xbox Game Bar (значение по умолчанию) # Включить советы Xbox Game Bar (значение по умолчанию)
# XboxGameTips -Enable # XboxGameTips -Enable
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
# Выбрать приложение и установить для него параметры производительности графики на "Высокая производительность". Только при наличии внешней видеокарты
Set-AppGraphicsPerformance
<# <#
Turn on hardware-accelerated GPU scheduling. Restart needed Turn on hardware-accelerated GPU scheduling. Restart needed
Only if you have a dedicated GPU and WDDM verion is 2.7 or higher Only if you have a dedicated GPU and WDDM verion is 2.7 or higher

Loading…
Cancel
Save