mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 18:42:35 -05:00
Block Adobe Network, Debloat Adobe & Compile
- fixes order of tweaks to always run "WPFTweaksRestorePoint" first. Before it was only the case because if was one of the first letter0s of the alphabet - Fixed some stuff at Debloat Adobe & added Adobe Reader update stopper & "deactivated" Adobe Desktop Service. - Added Blocking of Adobe Servers (as of your suggestion) to it's own Tweak. - ran compile for testing & showing
This commit is contained in:
@ -5,9 +5,6 @@ Function Get-WinUtilCheckBoxes {
|
||||
.SYNOPSIS
|
||||
Finds all checkboxes that are checked on the specific tab and inputs them into a script.
|
||||
|
||||
.PARAMETER Group
|
||||
The group of checkboxes to check
|
||||
|
||||
.PARAMETER unCheck
|
||||
Whether to uncheck the checkboxes that are checked. Defaults to true
|
||||
|
||||
@ -32,7 +29,20 @@ Function Get-WinUtilCheckBoxes {
|
||||
|
||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
|
||||
|
||||
# First check and add WPFTweaksRestorePoint if checked
|
||||
$RestorePoint = $CheckBoxes | Where-Object { $_.Key -eq 'WPFTweaksRestorePoint' -and $_.Value.IsChecked -eq $true }
|
||||
if ($RestorePoint) {
|
||||
$Output["WPFTweaks"] = @('WPFTweaksRestorePoint')
|
||||
Write-Debug "Adding WPFTweaksRestorePoint as first in WPFTweaks"
|
||||
|
||||
if ($unCheck) {
|
||||
$RestorePoint.Value.IsChecked = $false
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($CheckBox in $CheckBoxes) {
|
||||
if ($CheckBox.Key -eq 'WPFTweaksRestorePoint') { continue } # Skip since it's already handled
|
||||
|
||||
$group = if ($CheckBox.Key.StartsWith("WPFInstall")) { "Install" }
|
||||
elseif ($CheckBox.Key.StartsWith("WPFTweaks")) { "WPFTweaks" }
|
||||
elseif ($CheckBox.Key.StartsWith("WPFFeature")) { "WPFFeature" }
|
||||
@ -41,9 +51,7 @@ Function Get-WinUtilCheckBoxes {
|
||||
if ($CheckBox.Value.IsChecked -eq $true) {
|
||||
$feature = switch ($group) {
|
||||
"Install" {
|
||||
# Get the winget value
|
||||
$wingetValue = $sync.configs.applications.$($CheckBox.Name).winget
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($wingetValue) -and $wingetValue -ne "na") {
|
||||
$wingetValue -split ";"
|
||||
} else {
|
||||
@ -66,12 +74,12 @@ Function Get-WinUtilCheckBoxes {
|
||||
Write-Debug "Adding: $($feature) under: $($group)"
|
||||
$Output[$group] += $feature
|
||||
|
||||
if ($uncheck -eq $true) {
|
||||
if ($unCheck) {
|
||||
$CheckBox.Value.IsChecked = $false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $Output
|
||||
return $Output
|
||||
}
|
||||
|
Reference in New Issue
Block a user