|
1 | 1 | Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\Open-File.psm1"
|
| 2 | +Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\Get-HardwareInfo.psm1" |
2 | 3 | Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\Title-Templates.psm1"
|
3 | 4 | Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\Unregister-DuplicatedPowerPlan.psm1"
|
4 | 5 | Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\debloat-helper\Set-ItemPropertyVerified.psm1"
|
@@ -32,6 +33,7 @@ function Optimize-Performance() {
|
32 | 33 | )
|
33 | 34 | }
|
34 | 35 |
|
| 36 | + $PCSystemType = Get-PCSystemType |
35 | 37 | # Initialize all Path variables used to Registry Tweaks
|
36 | 38 | $PathToLMMultimediaSystemProfile = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile"
|
37 | 39 | $PathToLMMultimediaSystemProfileOnGameTasks = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games"
|
@@ -80,8 +82,14 @@ function Optimize-Performance() {
|
80 | 82 |
|
81 | 83 | Write-Section "Power Plan Tweaks"
|
82 | 84 |
|
83 |
| - Write-Status -Types "+", $TweakType -Status "Setting Power Plan to High Performance..." |
84 |
| - powercfg -SetActive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c |
| 85 | + If ($PCSystemType -eq 1) { |
| 86 | + Write-Status -Types "+", $TweakType -Status "Desktop ($PCSystemType): Setting Power Plan to High Performance..." |
| 87 | + powercfg -SetActive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c |
| 88 | + } ElseIf ($PCSystemType -eq 2) { |
| 89 | + Write-Status -Types "@", $TweakType -Status "Laptop ($PCSystemType): Keeping current power plan..." -Warning |
| 90 | + } Else { |
| 91 | + Write-Status -Types "@", $TweakType -Status "Unknown ($PCSystemType): Keeping current power plan..." -Warning |
| 92 | + } |
85 | 93 |
|
86 | 94 | Write-Status -Types "+", $TweakType -Status "Creating the Ultimate Performance hidden Power Plan..."
|
87 | 95 | powercfg -DuplicateScheme e9a42b02-d5df-448d-aa00-03f14749eb61
|
|
0 commit comments