Added option to restore windows 10 style context menu (#11)

Removed some unused regfiles
This commit is contained in:
Raphire
2023-10-31 18:47:03 +01:00
parent 4280f9b7cf
commit 6053c21549
7 changed files with 31 additions and 28 deletions

View File

@@ -29,6 +29,7 @@ param
[Parameter(ValueFromPipeline = $true)][switch]$DisableChat,
[Parameter(ValueFromPipeline = $true)][switch]$HideChat,
[Parameter(ValueFromPipeline = $true)][switch]$ClearStart,
[Parameter(ValueFromPipeline = $true)][switch]$RevertContextMenu,
[Parameter(ValueFromPipeline = $true)][switch]$DisableOnedrive,
[Parameter(ValueFromPipeline = $true)][switch]$HideOnedrive,
[Parameter(ValueFromPipeline = $true)][switch]$Disable3dObjects,
@@ -256,6 +257,15 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
Write-Output ""
# Only show this options for windows 11 users
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){
if ($( Read-Host -Prompt "Remove all pinned apps from the start menu? This applies to all existing and new users and can't be reverted (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('ClearStart', $ClearStart)
}
}
Write-Output ""
if ($( Read-Host -Prompt "Disable telemetry, diagnostic data, app-launch tracking and targeted ads? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('DisableTelemetry', $DisableTelemetry)
}
@@ -283,8 +293,8 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
Write-Output ""
if ($( Read-Host -Prompt "Remove all pinned apps from the start menu? This applies to all existing and new users and can't be reverted (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('ClearStart', $ClearStart)
if ($( Read-Host -Prompt "Restore the old Windows 10 style context menu? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('RevertContextMenu', $RevertContextMenu)
}
}
@@ -295,7 +305,7 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){
Write-Output ""
if ($( Read-Host -Prompt " Align taskbar buttons to left side? (y/n)" ) -eq 'y') {
if ($( Read-Host -Prompt " Align taskbar buttons to the left side? (y/n)" ) -eq 'y') {
$PSBoundParameters.Add('TaskbarAlignLeft', $TaskbarAlignLeft)
}
@@ -465,6 +475,10 @@ else {
RemoveApps "$PSScriptRoot/GamingAppslist.txt" "> Removing gaming-related windows apps..."
continue
}
'ClearStart' {
ClearStartMenu "> Removing all pinned apps from the start menu..."
continue
}
'DisableTelemetry' {
RegImport "> Disabling telemetry, diagnostic data, app-launch tracking and targeted ads..." $PSScriptRoot\Regfiles\Disable_Telemetry.reg
continue
@@ -481,6 +495,10 @@ else {
RegImport "> Disabling tips, tricks, suggestions and ads across Windows..." $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg
continue
}
'RevertContextMenu' {
RegImport "> Restoring the old Windows 10 style context menu..." $PSScriptRoot\Regfiles\Disable_Show_More_Options_Context_Menu.reg
continue
}
'TaskbarAlignLeft' {
RegImport "> Aligning taskbar buttons to the left..." $PSScriptRoot\Regfiles\Align_Taskbar_Left.reg
continue
@@ -517,10 +535,6 @@ else {
RegImport "> Hiding the chat icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Chat_Taskbar.reg
continue
}
'ClearStart' {
ClearStartMenu "> Removing all pinned apps from the start menu..."
continue
}
'ShowHiddenFolders' {
RegImport "> Unhiding hidden files, folders and drives..." $PSScriptRoot\Regfiles\Show_Hidden_Folders.reg
continue