mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 14:01:31 -06:00
Fix Misc Errors
This commit is contained in:
parent
908c962a0d
commit
8a6517a52e
50
winutil.ps1
50
winutil.ps1
@ -35,8 +35,11 @@ $xaml.SelectNodes("//*[@Name]") | % { Set-Variable -Name "WPF$($_.Name)" -Value
|
||||
|
||||
Function Get-FormVariables {
|
||||
If ($global:ReadmeDisplay -ne $true) { Write-host "If you need to reference this display again, run Get-FormVariables" -ForegroundColor Yellow; $global:ReadmeDisplay = $true }
|
||||
write-host "Found the following interactable elements from our form" -ForegroundColor Cyan
|
||||
get-variable WPF*
|
||||
|
||||
#====DEBUG GUI Elements====
|
||||
|
||||
#write-host "Found the following interactable elements from our form" -ForegroundColor Cyan
|
||||
#get-variable WPF*
|
||||
}
|
||||
|
||||
Get-FormVariables
|
||||
@ -566,10 +569,12 @@ $WPFtweaksbutton.Add_Click({
|
||||
}
|
||||
|
||||
If ( $WPFEssTweaksDVR.IsChecked -eq $true ) {
|
||||
Set-ItemProperty -Path "HKLM:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type Hex -Value 00000000
|
||||
Set-ItemProperty -Path "HKLM:\System\GameConfigStore" -Name "GameDVR_HonorUserFSEBehaviorMode" -Type Hex -Value 00000000
|
||||
Set-ItemProperty -Path "HKLM:\System\GameConfigStore" -Name "GameDVR_EFSEFeatureFlags" -Type Hex -Value 00000000
|
||||
Set-ItemProperty -Path "HKLM:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 00000000
|
||||
If (!(Test-Path "HKCU:\System\GameConfigStore")) {
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type Hex -Value 00000000
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_HonorUserFSEBehaviorMode" -Type Hex -Value 00000000
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_EFSEFeatureFlags" -Type Hex -Value 00000000
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 00000000
|
||||
}
|
||||
$WPFEssTweaksDVR.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksHiber.IsChecked -eq $true ) {
|
||||
@ -583,11 +588,6 @@ $WPFtweaksbutton.Add_Click({
|
||||
|
||||
}
|
||||
If ( $WPFEssTweaksHome.IsChecked -eq $true ) {
|
||||
Write-Host "Allowing Home Groups services..."
|
||||
Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
|
||||
Set-Service "HomeGroupListener" -StartupType Manual
|
||||
Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
|
||||
Set-Service "HomeGroupProvider" -StartupType Manual
|
||||
$WPFEssTweaksHome.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksLoc.IsChecked -eq $true ) {
|
||||
@ -822,15 +822,15 @@ $WPFtweaksbutton.Add_Click({
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 10
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 10
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -Type DWord -Value 5000
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "HungAppTimeout" -Type DWord -Value 4000
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "AutoEndTasks" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "LowLevelHooksTimeout" -Type DWord -Value 1000
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -Type DWord -Value 5000
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -Type DWord -Value 4000
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "AutoEndTasks" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "LowLevelHooksTimeout" -Type DWord -Value 1000
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "ClearPageFileAtShutdown" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Services\Ndu" -Name "Start" -Type DWord -Value 4
|
||||
Set-ItemProperty -Path "HKLM:\Control Panel\Mouse" -Name "MouseHoverTime" -Type DWord -Value 10
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseHoverTime" -Type DWord -Value 10
|
||||
|
||||
|
||||
# Network Tweaks
|
||||
@ -841,7 +841,7 @@ $WPFtweaksbutton.Add_Click({
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value $ram -Force
|
||||
|
||||
Write-Host "Disable News and Interests"
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 0
|
||||
# Remove "News and Interest" from taskbar
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 2
|
||||
|
||||
@ -867,15 +867,17 @@ $WPFtweaksbutton.Add_Click({
|
||||
}
|
||||
If ( $WPFEssTweaksWifi.IsChecked -eq $true ) {
|
||||
Write-Host "Disabling Wi-Fi Sense..."
|
||||
If (!(Test-Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting")) {
|
||||
New-Item -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Force | Out-Null
|
||||
If (!(Test-Path "HKCU:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting")) {
|
||||
New-Item -Path "HKCU:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 0
|
||||
$WPFEssTweaksWifi.IsChecked = $false
|
||||
}
|
||||
If ( $WPFMiscTweaksLapPower.IsChecked -eq $true ) {
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -Type DWord -Value 00000000
|
||||
If (Test-Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling") {
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -Type DWord -Value 00000000
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name "HiberbootEnabled" -Type DWord -Value 0000001
|
||||
$WPFMiscTweaksLapPower.IsChecked = $false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user