mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-16 23:55:50 -06:00
075f2e9a50
* Update inputXML.xaml * Compile Winutil * Update main.ps1 (#641) Fix DarkMode * Compile Winutil * Compile Winutil * Compile Winutil * Update tweaks.json * fix hovertime * shortcut (#643) add ability to create a shortcut to invoke winutil more easily * Compile Winutil * Tweaks Check (#646) * Tweaks Check Added check for no checked tweaks plus formatting * more formating fixing * Compile Winutil * [ooshutup10] Fixed link to ooshutup10 settings file (#665) * Compile Winutil * Features Migrated to config and runspaces (#667) * Compile Winutil * Document Calendar Disable/Enable Check Disable Notification and click undo tweaks to re-enable calendar * Compile Winutil * Update Edge_Removal.bat * Update Edge_Removal.bat (#660) * garbage commit - read system Trying to read current system registry values state and do a checkbox for enabled or disabled values * Compile Winutil * Add Ubisoft Connect & WinRAR as install options. (#678) * Compile Winutil * adding the code from asheroto to install winget (#684) * adding the code from asheroto to get winget with Server versions of Windows, that come without winget , the script seems unable to install it and then refuses to install any programs. so by adding two lines of code (hopefully) you can include the installation of winget and then fulfill the requirement and let the program run and do all the cool things * instaling winget from asheroto so the script will check if winget is installed on server and LTSC versions of Windows. and tries to install it, when for some reason it can't, then a condition on the code gets fulfilled and the function breaks, this code from the asheroto repo should, (hopefully) make it so winget can get installed and the condition is never met, therefore allowing it the script to continue * Compile Winutil * Add Neovim and Node Version Manager (#691) * Compile Winutil * Preload Winget and tweaks with already installed (#682) * winget * updated runspaces and winget to update gui outside of main thread * registry check for tweaks * add impex to winget * add uninstall button * tweaks done * update tests --------- Co-authored-by: Chris Titus <contact@christitus.com> * Compile Winutil * feat: add postman into developement (#695) Co-authored-by: Chris Titus <contact@christitus.com> * Update inputXML.xaml (#701) Some of the items were missing WPF in the name * Compile Winutil * Split up AllowGameDVR to fix breaking Xbox Game Bar (#692) * Split up AllowGameDVR to fix breaking Xbox Game Bar * Undo changes to winutil * Compile Winutil * Removed Atom due to it having been sunsetted (#711) Co-authored-by: Chris Titus <contact@christitus.com> * Add application GeForce NOW to Applications/Games (#724) * Compile Winutil * Fix syntax and typo * Compile Winutil * Fixing Original Service Types * Compile Winutil * Update inputXML.xaml (#725) Fix typo as upgrade selection will upgrade all * Compile Winutil --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: jokerwrld999 <47574931+jokerwrld999@users.noreply.github.com> Co-authored-by: Raf <69535896+Rafee-M@users.noreply.github.com> Co-authored-by: Jack Boecker <boeckerjack@protonmail.com> Co-authored-by: migno_chrono <75509204+mignochrono@users.noreply.github.com> Co-authored-by: Umair Raza <52033975+umairraza96@users.noreply.github.com> Co-authored-by: dreamsyntax <dreamsyntax@gmail.com> Co-authored-by: Daniel <74148862+Danulal@users.noreply.github.com> Co-authored-by: tomgrice <tomgrice@gmail.com>
196 lines
13 KiB
PowerShell
196 lines
13 KiB
PowerShell
function Invoke-WPFundoall {
|
|
<#
|
|
|
|
.DESCRIPTION
|
|
PlaceHolder
|
|
|
|
#>
|
|
|
|
if($sync.ProcessRunning){
|
|
$msg = "Install process is currently running."
|
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
|
return
|
|
}
|
|
|
|
$Tweaks = Get-WinUtilCheckBoxes -Group "WPFTweaks"
|
|
|
|
if ($tweaks.count -eq 0){
|
|
$msg = "Please check the tweaks you wish to undo."
|
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
|
return
|
|
}
|
|
|
|
Invoke-WPFRunspace -ArgumentList $Tweaks -ScriptBlock {
|
|
param($Tweaks)
|
|
|
|
$sync.ProcessRunning = $true
|
|
|
|
Foreach ($tweak in $tweaks){
|
|
Invoke-WinUtilTweaks $tweak -undo $true
|
|
}
|
|
|
|
$sync.ProcessRunning = $false
|
|
Write-Host "=================================="
|
|
Write-Host "--- Undo Tweaks are Finished ---"
|
|
Write-Host "=================================="
|
|
|
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
|
$MessageboxTitle = "Tweaks are Finished "
|
|
$Messageboxbody = ("Done")
|
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
|
|
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
|
}
|
|
|
|
<#
|
|
|
|
Write-Host "Creating Restore Point in case something bad happens"
|
|
Enable-ComputerRestore -Drive "$env:SystemDrive"
|
|
Checkpoint-Computer -Description "RestorePoint1" -RestorePointType "MODIFY_SETTINGS"
|
|
|
|
Write-Host "Enabling Telemetry..."
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1
|
|
Write-Host "Enabling Wi-Fi Sense"
|
|
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 1
|
|
Write-Host "Enabling Application suggestions..."
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "ContentDeliveryAllowed" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353698Enabled" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 1
|
|
If (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent") {
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Recurse -ErrorAction SilentlyContinue
|
|
}
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 0
|
|
Write-Host "Enabling Activity History..."
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 1
|
|
Write-Host "Enable Location Tracking..."
|
|
If (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location") {
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Recurse -ErrorAction SilentlyContinue
|
|
}
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Allow"
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 1
|
|
Write-Host "Enabling automatic Maps updates..."
|
|
Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 1
|
|
Write-Host "Enabling Feedback..."
|
|
If (Test-Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules") {
|
|
Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Recurse -ErrorAction SilentlyContinue
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "DoNotShowFeedbackNotifications" -Type DWord -Value 0
|
|
Write-Host "Enabling Tailored Experiences..."
|
|
If (Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent") {
|
|
Remove-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Recurse -ErrorAction SilentlyContinue
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableTailoredExperiencesWithDiagnosticData" -Type DWord -Value 0
|
|
Write-Host "Disabling Advertising ID..."
|
|
If (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo") {
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Recurse -ErrorAction SilentlyContinue
|
|
}
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -Type DWord -Value 0
|
|
Write-Host "Allow Error reporting..."
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 0
|
|
Write-Host "Allowing Diagnostics Tracking Service..."
|
|
Stop-Service "DiagTrack" -WarningAction SilentlyContinue
|
|
Set-Service "DiagTrack" -StartupType Manual
|
|
Write-Host "Allowing WAP Push Service..."
|
|
Stop-Service "dmwappushservice" -WarningAction SilentlyContinue
|
|
Set-Service "dmwappushservice" -StartupType Manual
|
|
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
|
|
Write-Host "Enabling Storage Sense..."
|
|
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" | Out-Null
|
|
Write-Host "Allowing Superfetch service..."
|
|
Stop-Service "SysMain" -WarningAction SilentlyContinue
|
|
Set-Service "SysMain" -StartupType Manual
|
|
Write-Host "Setting BIOS time to Local Time instead of UTC..."
|
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 0
|
|
Write-Host "Enabling Hibernation..."
|
|
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 1
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 1
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -ErrorAction SilentlyContinue
|
|
|
|
Write-Host "Hiding file operations details..."
|
|
If (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager") {
|
|
Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Recurse -ErrorAction SilentlyContinue
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -Type DWord -Value 0
|
|
Write-Host "Showing Task View button..."
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Type DWord -Value 1
|
|
|
|
Write-Host "Changing default Explorer view to Quick Access..."
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 0
|
|
|
|
Write-Host "Unrestricting AutoLogger directory"
|
|
$autoLoggerDir = "$env:PROGRAMDATA\Microsoft\Diagnosis\ETLLogs\AutoLogger"
|
|
icacls $autoLoggerDir /grant:r SYSTEM:`(OI`)`(CI`)F | Out-Null
|
|
|
|
Write-Host "Enabling and starting Diagnostics Tracking Service"
|
|
Set-Service "DiagTrack" -StartupType Automatic
|
|
Start-Service "DiagTrack"
|
|
|
|
Write-Host "Hiding known file extensions"
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 1
|
|
|
|
Write-Host "Reset Local Group Policies to Stock Defaults"
|
|
# cmd /c secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
|
|
cmd /c RD /S /Q "%WinDir%\System32\GroupPolicyUsers"
|
|
cmd /c RD /S /Q "%WinDir%\System32\GroupPolicy"
|
|
cmd /c gpupdate /force
|
|
# Considered using Invoke-GPUpdate but requires module most people won't have installed
|
|
|
|
Write-Host "Adjusting visual effects for appearance..."
|
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 400
|
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](158, 30, 7, 128, 18, 0, 0, 0))
|
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 1
|
|
Remove-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -ErrorAction SilentlyContinue
|
|
Write-Host "Restoring Clipboard History..."
|
|
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -ErrorAction SilentlyContinue
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue
|
|
Write-Host "Enabling Notifications and Action Center"
|
|
Remove-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled"
|
|
Write-Host "Restoring Default Right Click Menu Layout"
|
|
Remove-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Recurse -Confirm:$false -Force
|
|
|
|
Write-Host "Reset News and Interests"
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 1
|
|
# Remove "News and Interest" from taskbar
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 0
|
|
Write-Host "Done - Reverted to Stock Settings"
|
|
|
|
Write-Host "Essential Undo Completed"
|
|
|
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
|
$MessageboxTitle = "Undo All"
|
|
$Messageboxbody = ("Done")
|
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
|
|
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
|
|
|
Write-Host "================================="
|
|
Write-Host "--- Undo All is Finished ---"
|
|
Write-Host "================================="
|
|
#>
|
|
} |