-
Notifications
You must be signed in to change notification settings - Fork 7
/
Wipe-free-space.reg
12 lines (10 loc) · 2.29 KB
/
Wipe-free-space.reg
1
2
3
4
5
6
7
8
9
10
11
12
Windows Registry Editor Version 5.00
; WindowsContextMenuTools created by VincentBounce
;Wipe free space
[-HKEY_CLASSES_ROOT\Drive\shell\run300WipeFreeSpace]
[HKEY_CLASSES_ROOT\Drive\shell\run300WipeFreeSpace]
;"Extended"="" ;used to show command in context menu only if Shift pressed
@="&Overwrite deleted data" ;symbol '&' used for keyboard shortcut, applies on the letter next to
"Icon"="%SystemRoot%\\system32\\shell32.dll,-260" ;cmd.exe alone works ;%SystemRoot%\\system32\\cmd.exe works
[HKEY_CLASSES_ROOT\Drive\shell\run300WipeFreeSpace\command]
@="powershell.exe -Command \"[console]::WindowWidth=100; [console]::WindowHeight=10; [console]::BufferWidth=[console]::WindowWidth;$host.UI.RawUI.WindowTitle = 'Overwriting deleted data in %1 - [Ctrl+C] to abort'; New-Item -Path '%1' -Name 'EFSTMPWP' -ItemType 'directory' -Force; Set-Location '%1EFSTMPWP'; Clear-Host; Write-Output 'Securing free space by creating successively 3 temporary big files in'; Write-Output '%1EFSTMPWP\\fil____.tmp to wipe all free space.'; Write-Output ' '; cipher /w:'%1'; Set-Location $env:USERPROFILE; Remove-Item '%1EFSTMPWP'; Read-Host -Prompt '[Enter] to close'>$null\""