From 70f2f13ce6f918830b6e1ccd3531c986bf716a20 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 11 May 2025 13:38:06 +0300 Subject: [PATCH] Removed Set-AppGraphicsPerformance function as unnecessary one --- Wrapper/Config/config_Windows_10.json | 13 ---- Wrapper/Config/config_Windows_10_LTSC.json | 15 ----- Wrapper/Config/config_Windows_11.json | 13 ---- Wrapper/Config/config_Windows_11_LTSC.json | 14 ----- Wrapper/Config/wrapper_config.json | 2 +- .../de-DE/tooltip_Windows_10.json | 10 --- .../de-DE/tooltip_Windows_11.json | 10 --- .../en-US/tooltip_Windows_10.json | 10 --- .../en-US/tooltip_Windows_11.json | 10 --- .../ru-RU/tooltip_Windows_10.json | 10 --- .../ru-RU/tooltip_Windows_11.json | 10 --- .../Module/Sophia.psm1 | 60 ------------------ src/Sophia_Script_for_Windows_10/Sophia.ps1 | 4 -- .../Module/Sophia.psm1 | 62 ------------------- .../Sophia.ps1 | 6 -- .../Module/Sophia.psm1 | 60 ------------------ .../Sophia.ps1 | 4 -- .../Module/Sophia.psm1 | 60 ------------------ .../Sophia.ps1 | 4 -- .../Module/Sophia.psm1 | 60 ------------------ src/Sophia_Script_for_Windows_11/Sophia.ps1 | 4 -- .../Module/Sophia.psm1 | 60 ------------------ .../Sophia.ps1 | 4 -- .../Module/Sophia.psm1 | 60 ------------------ .../Sophia.ps1 | 4 -- 25 files changed, 1 insertion(+), 568 deletions(-) diff --git a/Wrapper/Config/config_Windows_10.json b/Wrapper/Config/config_Windows_10.json index 4a48174e..d70b916e 100644 --- a/Wrapper/Config/config_Windows_10.json +++ b/Wrapper/Config/config_Windows_10.json @@ -1861,19 +1861,6 @@ "Preset": "Zero", "WindowsDefault": "One" }, - { - "Region": "Gaming", - "Control": "chk", - "Required": "false", - "Function": "Set-AppGraphicsPerformance", - "Arg": { - "Zero": { - "Tag": "" - } - }, - "Preset": "Zero", - "WindowsDefault": "" - }, { "Region": "Gaming", "Control": "cmb", diff --git a/Wrapper/Config/config_Windows_10_LTSC.json b/Wrapper/Config/config_Windows_10_LTSC.json index 71c6352c..d0e501f5 100644 --- a/Wrapper/Config/config_Windows_10_LTSC.json +++ b/Wrapper/Config/config_Windows_10_LTSC.json @@ -1783,21 +1783,6 @@ "LTSC2019": "false", "LTSC2021": "true" }, - { - "Region": "Gaming", - "Control": "chk", - "Required": "false", - "Function": "Set-AppGraphicsPerformance", - "Arg": { - "Zero": { - "Tag": "" - } - }, - "Preset": "Zero", - "WindowsDefault": "", - "LTSC2019": "true", - "LTSC2021": "true" - }, { "Region": "Gaming", "Control": "cmb", diff --git a/Wrapper/Config/config_Windows_11.json b/Wrapper/Config/config_Windows_11.json index 7fe505a5..0a0c655e 100644 --- a/Wrapper/Config/config_Windows_11.json +++ b/Wrapper/Config/config_Windows_11.json @@ -1658,19 +1658,6 @@ "Preset": "Zero", "WindowsDefault": "One" }, - { - "Region": "Gaming", - "Control": "chk", - "Required": "false", - "Function": "Set-AppGraphicsPerformance", - "Arg": { - "Zero": { - "Tag": "" - } - }, - "Preset": "Zero", - "WindowsDefault": "" - }, { "Region": "Gaming", "Control": "cmb", diff --git a/Wrapper/Config/config_Windows_11_LTSC.json b/Wrapper/Config/config_Windows_11_LTSC.json index 5a4c74c5..06840002 100644 --- a/Wrapper/Config/config_Windows_11_LTSC.json +++ b/Wrapper/Config/config_Windows_11_LTSC.json @@ -1669,20 +1669,6 @@ "WindowsDefault": "", "LTSC2024": "true" }, - { - "Region": "Gaming", - "Control": "chk", - "Required": "false", - "Function": "Set-AppGraphicsPerformance", - "Arg": { - "Zero": { - "Tag": "" - } - }, - "Preset": "Zero", - "WindowsDefault": "", - "LTSC2024": "true" - }, { "Region": "Gaming", "Control": "cmb", diff --git a/Wrapper/Config/wrapper_config.json b/Wrapper/Config/wrapper_config.json index 2d434e92..443bb857 100644 --- a/Wrapper/Config/wrapper_config.json +++ b/Wrapper/Config/wrapper_config.json @@ -15,4 +15,4 @@ "widthWrapperInPixelsRU": "1055", "widthWrapperInPixelsDE": "1020", } -] \ No newline at end of file +] diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json index 088c0a18..ba05133c 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json +++ b/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", "Function": "GPUScheduling", diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_11.json b/Wrapper/Localizations/de-DE/tooltip_Windows_11.json index 1dc08dd9..8813aa98 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_11.json +++ b/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", "Function": "GPUScheduling", diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_10.json b/Wrapper/Localizations/en-US/tooltip_Windows_10.json index 218b219b..54ae4867 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_10.json +++ b/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", "Function": "GPUScheduling", diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_11.json b/Wrapper/Localizations/en-US/tooltip_Windows_11.json index 33d9401d..fd9ad73d 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_11.json +++ b/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", "Function": "GPUScheduling", diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json index 7872e848..81f51591 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json @@ -1567,16 +1567,6 @@ } } }, - { - "Region": "Gaming", - "Function": "Set-AppGraphicsPerformance", - "Arg": { - "Zero": { - "Tag": "", - "ToolTip": "Выбрать приложение и установить для него параметры производительности графики на \"Высокая производительность\". Только при наличии внешней видеокарты." - } - } - }, { "Region": "Gaming", "Function": "GPUScheduling", diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json index 1684d231..29b2fc22 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json @@ -1452,16 +1452,6 @@ } } }, - { - "Region": "Gaming", - "Function": "Set-AppGraphicsPerformance", - "Arg": { - "Zero": { - "Tag": "", - "ToolTip": "Выбрать приложение и установить для него параметры производительности графики на \"Высокая производительность\". Только при наличии внешней видеокарты." - } - } - }, { "Region": "Gaming", "Function": "GPUScheduling", diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index f99252f1..60095737 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/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 Hardware-accelerated GPU scheduling diff --git a/src/Sophia_Script_for_Windows_10/Sophia.ps1 b/src/Sophia_Script_for_Windows_10/Sophia.ps1 index c2b316c9..99097296 100644 --- a/src/Sophia_Script_for_Windows_10/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10/Sophia.ps1 @@ -1131,10 +1131,6 @@ XboxGameTips -Disable # Включить советы Xbox Game Bar (значение по умолчанию) # 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 Only if you have a dedicated GPU and WDDM verion is 2.7 or higher diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index b8dbd9ba..1d73e841 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -8913,68 +8913,6 @@ function AppSuggestions } #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 <# .SYNOPSIS diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 index b253529e..b268ef64 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 @@ -830,12 +830,6 @@ AppSuggestions -Hide # AppSuggestions -Show #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 <# Create the "Windows Cleanup" scheduled task for cleaning up Windows unused files and updates. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 65461cc6..ae37f03c 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -9970,66 +9970,6 @@ function PinToStart #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) - } -} - <# .SYNOPSIS Hardware-accelerated GPU scheduling diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 index 78875d5e..6716b682 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 @@ -959,10 +959,6 @@ PinToStart -Tiles ControlPanel, DevicesPrinters #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 - <# Turn on hardware-accelerated GPU scheduling. Restart needed Only if you have a dedicated GPU and WDDM verion is 2.7 or higher diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index caf6fbc3..5a6ebd89 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/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 Hardware-accelerated GPU scheduling diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 index 77c7b2c9..33856984 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 @@ -1135,10 +1135,6 @@ XboxGameTips -Disable # Включить советы Xbox Game Bar (значение по умолчанию) # 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 Only if you have a dedicated GPU and WDDM verion is 2.7 or higher diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index fe9a8852..d40f2c12 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/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 Hardware-accelerated GPU scheduling diff --git a/src/Sophia_Script_for_Windows_11/Sophia.ps1 b/src/Sophia_Script_for_Windows_11/Sophia.ps1 index 04a70408..cca9d125 100644 --- a/src/Sophia_Script_for_Windows_11/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11/Sophia.ps1 @@ -1061,10 +1061,6 @@ XboxGameTips -Disable # Включить советы Xbox Game Bar (значение по умолчанию) # 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 Only if you have a dedicated GPU and WDDM verion is 2.7 or higher diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 index 7eff4189..a0b7bf96 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 @@ -10327,66 +10327,6 @@ function UninstallUWPApps #endregion UWP apps #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 Hardware-accelerated GPU scheduling diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 index 98547286..c2da385c 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 @@ -1007,10 +1007,6 @@ UninstallUWPApps #endregion UWP apps #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 Only if you have a dedicated GPU and WDDM verion is 2.7 or higher diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index 3c66a9e0..1d14d751 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/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 Hardware-accelerated GPU scheduling diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 index 1e62ddb9..41722600 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 @@ -1068,10 +1068,6 @@ XboxGameTips -Disable # Включить советы Xbox Game Bar (значение по умолчанию) # 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 Only if you have a dedicated GPU and WDDM verion is 2.7 or higher