Multiple changes and additions

* Improved certain registry edits that remove suggested content
* Added a few new third party apps to removal list
* Added option to hide taskview button from taskbar
This commit is contained in:
Raphire
2023-08-07 00:49:41 +02:00
parent eb7c99e8c4
commit 12963ebd3e
10 changed files with 21 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ param
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchIconTb,
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchLabelTb,
[Parameter(ValueFromPipeline = $true)][switch]$ShowSearchBoxTb,
[Parameter(ValueFromPipeline = $true)][switch]$HideTaskview,
[Parameter(ValueFromPipeline = $true)][switch]$DisableWidgets,
[Parameter(ValueFromPipeline = $true)][switch]$HideWidgets,
[Parameter(ValueFromPipeline = $true)][switch]$DisableChat,
@@ -88,7 +89,7 @@ function RegImport {
}
# Change script mode based on provided parameters or user input
# Change script execution based on provided parameters or user input
if ((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (($PSBoundParameters.Count -eq 1) -and ($PSBoundParameters.ContainsKey('WhatIf') -or $PSBoundParameters.ContainsKey('Confirm') -or $PSBoundParameters.ContainsKey('Verbose')))) {
if ($RunDefaults -or $RunWin11Defaults) {
$Mode = '1';
@@ -207,6 +208,7 @@ if ((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
$PSBoundParameters.Add('TaskbarAlignLeft', $TaskbarAlignLeft)
}
# Show options for search icon on taskbar, only continue on valid input
Do {
Write-Output ""
Write-Output " Options:"
@@ -233,7 +235,12 @@ if ((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
'4' {
$PSBoundParameters.Add('ShowSearchBoxTb', $ShowSearchBoxTb)
}
}
Write-Output ""
if ($( Read-Host -Prompt " Hide the taskview button from the taskbar? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('HideTaskview', $HideTaskview)
}
}
@@ -398,6 +405,11 @@ switch ($PSBoundParameters.Keys) {
Write-Output ""
continue
}
'HideTaskview' {
RegImport "> Hiding the taskview button from the taskbar..." $PSScriptRoot\Regfiles\Hide_Taskview_Taskbar.reg
Write-Output ""
continue
}
{$_ -in "HideWidgets", "DisableWidgets"} {
RegImport "> Disabling the widget service and hiding the widget icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Widgets_Taskbar.reg
Write-Output ""