Skip to content

Commit

Permalink
fix(finalize.cmd): debloat 'Send to' snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyueta committed Aug 2, 2023
1 parent e9cc70a commit c0a3026
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/playbook/Executables/FINALIZE.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,14 @@ for /f "tokens=1" %%a in ('netsh int ip show interfaces ^| findstr [0-9]') do (
:: Set correct username variable of the currently logged in user
for /f "tokens=3 delims==\" %%a in ('wmic computersystem get username /value ^| find "="') do set "loggedinUsername=%%a"

:: Debloat 'Send To' context menu, hidden files do not show up in the 'Send To' context menu
attrib +h "C:\Users\!loggedinUsername!\AppData\Roaming\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail"
attrib +h "C:\Users\!loggedinUsername!\AppData\Roaming\Microsoft\Windows\SendTo\Documents.mydocs"
:: Debloat 'Send To' context menu
for %%a in (
"Fax Recipient.lnk"
"Documents.mydocs"
"Mail Recipient.MAPIMail"
) do (
del /f /q "C:\Users\%loggedinUsername%\AppData\Roaming\Microsoft\Windows\SendTo\%%~a"
)

:: Disable audio exclusive mode on all devices
for %%a in ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture", "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render") do (
Expand Down Expand Up @@ -220,4 +225,4 @@ if "!diskDrive!" == "SSD" (

:: Prevent mobsync.exe from running
ren "!windir!\System32\mobsync.exe" mobsync.old
ren "!windir!\SysWOW64\mobsync.exe" mobsync.old
ren "!windir!\SysWOW64\mobsync.exe" mobsync.old

0 comments on commit c0a3026

Please sign in to comment.