Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 779f7ed

Browse files
committed
add classic flyouts
1 parent 056403c commit 779f7ed

File tree

4 files changed

+55
-12
lines changed

4 files changed

+55
-12
lines changed

library/GeneralFunctions.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# General functions
22

3-
$version = "1.0.4 (2021.12.01)"
3+
$version = "1.0.4 (2021.12.14)"
44
$title = "Windows Toolbox $version"
55
$host.UI.RawUI.WindowTitle = $title
66
$build = (Get-CimInstance Win32_OperatingSystem).version

library/Tweaks.psm1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,14 @@ function EnableClassicMenu {
223223
# Credit: https://www.reddit.com/r/Windows11/comments/pu5aa3/howto_disable_new_context_menu_explorer_command/
224224
Write-Output "Enabling classic context menu..."
225225
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
226+
}
227+
228+
function EnableClassicVolumeFlyout {
229+
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC") -ne $true) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -force -ea SilentlyContinue };
230+
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC' -Name 'EnableMtcUvc' -Value 0 -PropertyType DWord -Force -ea SilentlyContinue;
231+
}
232+
233+
function EnableClassicBatteryFlyout {
234+
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell") -ne $true) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" -force -ea SilentlyContinue };
235+
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell' -Name 'UseWin32BatteryFlyout' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;
226236
}

library/UndoFunctions.psm1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,14 @@ function DisableOldContextMenu {
241241
# Credit: https://www.reddit.com/r/Windows11/comments/pu5aa3/howto_disable_new_context_menu_explorer_command/
242242
Write-Output "Disabling old context menu..."
243243
reg.exe delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
244+
}
245+
246+
function DisableClassicVolumeFlyout {
247+
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC") -ne $true) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -force -ea SilentlyContinue };
248+
Remove-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC' -Name 'EnableMtcUvc' -Force -ea SilentlyContinue;
249+
}
250+
251+
function DisableClassicBatteryFlyout {
252+
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell") -ne $true) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" -force -ea SilentlyContinue };
253+
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell' -Name 'UseWin32BatteryFlyout' -Value 0 -PropertyType DWord -Force -ea SilentlyContinue;
244254
}

main.ps1

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,26 +152,31 @@ $objects = @{
152152
)"
153153

154154
'UI Tweaks' = @{
155-
'Shell tweaks' = "@(
155+
'Appearance' = "@(
156156
'Enable dark mode',
157-
'Disable Aero Shake',
158-
'Switch Windows With a Single Click on the Taskbar',
159-
'Disable Action Center',
160-
'Disable Accessibility Keys',
161-
'Set Win+X menu to Command Prompt',
162-
'Fix No Internet prompt',
163-
'Enable verbose startup / shutdown messages',
164-
'Disable Xbox Game DVR and Game Bar',
157+
'Enable Windows 7-style volume flyout',
158+
'Enable Windows 7-style battery flyout',
165159
'Hide People icon on the Taskbar',
166160
'Restore classic context menu (Windows 11 only)'
167161
)"
168162

169-
'Explorer tweaks' = "@(
163+
'Explorer' = "@(
170164
'Remove user folders under This PC',
171165
'Show build number on desktop',
172166
'Show full directory path in Explorer title bar',
173167
'Change default explorer view to This PC'
174168
)"
169+
170+
'Behavior' = "@(
171+
'Disable Aero Shake',
172+
'Switch Windows With a Single Click on the Taskbar',
173+
'Disable Action Center',
174+
'Disable Accessibility Keys',
175+
'Set Win+X menu to Command Prompt',
176+
'Fix No Internet prompt',
177+
'Enable verbose startup / shutdown messages',
178+
'Disable Xbox Game DVR and Game Bar'
179+
)"
175180
}
176181

177182
'Boot Configuration Data (BCD)' = "@(
@@ -321,7 +326,9 @@ $objects = @{
321326
'(Re)Enable Activity History',
322327
'(Re)Enable Superfetch',
323328
'Hide build number on desktop',
324-
'Disable old context menu (Windows 11 only)'
329+
'Disable old context menu (Windows 11 only)',
330+
'Disable Windows 7-style volume flyout',
331+
'Disable Windows 7-style battery flyout'
325332
)"
326333

327334
'6) Options' = "@(
@@ -1135,6 +1142,14 @@ while ($true) {
11351142
EnableClassicMenu
11361143
}
11371144

1145+
"Enable Windows 7-style volume flyout" {
1146+
EnableClassicVolumeFlyout
1147+
}
1148+
1149+
"Enable Windows 7-style battery flyout" {
1150+
EnableClassicBatteryFlyout
1151+
}
1152+
11381153
#BCD edit
11391154

11401155
"Remove entry" {
@@ -1207,6 +1222,14 @@ while ($true) {
12071222
DisableOldContextMenu
12081223
}
12091224

1225+
"Disable Windows 7-style volume flyout"{
1226+
DisableClassicVolumeFlyout
1227+
}
1228+
1229+
"Disable Windows 7-style battery flyout" {
1230+
DisableClassicBatteryFlyout
1231+
}
1232+
12101233
#Options
12111234
"1) Create restore point" {
12121235
Write-Output "Creating restore point..."

0 commit comments

Comments
 (0)