Skip to content

Commit 7a06a56

Browse files
authored
Restore annoying USB notifications
1 parent 8feae3b commit 7a06a56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Win11-Explorer-Fix.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ if /i "%restoreOneDrive%"=="y" (
101101
) else (
102102
echo OneDrive entry was not restored.
103103
)
104+
105+
:: Ask if the user wants to restore annoying USB notifications
106+
set /p disableAnnoyingUSB=Do you want to restore the annoying USB notifications (ex. Scan and Fix)? (y/n):
107+
if /i "%restoreAnnoyingUSB%"=="y" (
108+
reg add HKCU\HKCU\SOFTWARE\Microsoft\Shell\USB /v NotifyOnUsbErrors /t REG_DWORD /d 0 /f
109+
echo Annoying USB notifications have been disabled.
110+
) else (
111+
echo Annoying USB notifications have not been disabled.
112+
)
104113
goto :restartExplorer
105114

106115
:restartExplorer

0 commit comments

Comments
 (0)