mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 06:35:51 -06:00
2321c071ee
* Updated Edge Removal Script to the more up-to-date one. (#918) * Update edgeremoval.bat from the original source. * Added my modifications to the extra cleanup part * Updates credits for Edge Removal script * Removed "getfirefox" * Credit to the original source * Compile Winutil * fix typos (#924) * Compile Winutil * Remove ooshutup10 "Disable search box in task bar" (#929) * Compile Winutil * Fix Panel Glitch and add intl * Compile Winutil * Fix Bluetooth services * Compile Winutil * fix function --------- Co-authored-by: Antun Nitraj <antnitraj@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: AdamJedl <100023363+AdamJedl@users.noreply.github.com>
70 lines
2.1 KiB
PowerShell
70 lines
2.1 KiB
PowerShell
Function Get-WinUtilCheckBoxes {
|
|
|
|
<#
|
|
|
|
.DESCRIPTION
|
|
Function is meant to find all checkboxes that are checked on the specific tab and input them into a script.
|
|
|
|
Outputed data will be the names of the checkboxes that were checked
|
|
|
|
.EXAMPLE
|
|
|
|
Get-WinUtilCheckBoxes "WPFInstall"
|
|
|
|
#>
|
|
|
|
Param(
|
|
$Group,
|
|
[boolean]$unCheck = $true
|
|
)
|
|
|
|
|
|
$Output = New-Object System.Collections.Generic.List[System.Object]
|
|
|
|
if($Group -eq "WPFInstall"){
|
|
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"}
|
|
$CheckBoxes = $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter}
|
|
Foreach ($CheckBox in $CheckBoxes){
|
|
if($CheckBox.value.ischecked -eq $true){
|
|
$sync.configs.applications.$($CheckBox.Name).winget -split ";" | ForEach-Object {
|
|
$Output.Add($psitem)
|
|
}
|
|
if ($uncheck -eq $true){
|
|
$CheckBox.value.ischecked = $false
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
if($Group -eq "WPFTweaks"){
|
|
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPF*Tweaks*"}
|
|
$CheckBoxes = $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter}
|
|
Foreach ($CheckBox in $CheckBoxes){
|
|
if($CheckBox.value.ischecked -eq $true){
|
|
$Output.Add($Checkbox.Name)
|
|
|
|
if ($uncheck -eq $true){
|
|
$CheckBox.value.ischecked = $false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if($Group -eq "WPFFeature"){
|
|
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPF*Feature*"}
|
|
$CheckBoxes = $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter}
|
|
Foreach ($CheckBox in $CheckBoxes){
|
|
if($CheckBox.value.ischecked -eq $true){
|
|
$Output.Add($Checkbox.Name)
|
|
|
|
if ($uncheck -eq $true){
|
|
$CheckBox.value.ischecked = $false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Write-Output $($Output | Select-Object -Unique)
|
|
}
|