Tuesday, July 16, 2013

Add "Run CCleaner & Shutdown" to the context menu of the Recycle Bin

If you're concerned about your privacy or mistakenly having your laptop's volume maximized while booting your laptop up in a public place then this is a registry tweak for you.

These instructions operate under the following assumptions:
  1. CCleaner is installed to C:\Program Files\CCleaner
  2. A copy of NirCmd (nircmd.exe) has been placed in your system folder at %SystemRoot%\System32
 Windows Registry Editor Version 5.00  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\Run CCleaner && Shutdown]  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\Run CCleaner && Shutdown\command]  
 @="cmd.exe /c nircmd.exe setsysvolume 8738 & \"\"\"%%ProgramFiles%%\\CCleaner\\CCleaner.exe\"\"\" /AUTO /SHUTDOWN"  
Save the file as "addCCleanerToRecycleBin.reg"

Double-click on "addCCleanerToRecycleBin.reg" to execute. If everything went as expected, if you right-click on your Recycle Bin you should see a new menu item: "Run CCleaner & Shutdown". Selecting this menu item will execute NirCmd's setsysvolume function which will lower the system's volume to 8738 (of 65535). Afterwards, CCleaner will execute using the current set of saved options* and upon finishing will shutdown the computer.

*To ensure the highest level of security when cleaning files, enable the "Secure file deletion" option within CCleaner.

Displaying thumbnails from Everything search engine using IrfanView

Everything search engine by voidtools is a great piece of software which I would highly recommend to users looking for a replacement to Windows' built-in search feature. Unfortunately in it's current state, Everything search engine does not allow the option of viewing image thumbnails. One way to work around this problem is to generate a list of all image filenames and import them into IrfanView.

These instructions operate under the following assumptions:
  1. Everything search engine along with "es.exe" (Everything's command-line interface) are installed to C:\Program Files\Everything
  2. IrfanView is installed to C:\Program Files\IrfanView
Open up Notepad (notepad.exe) and paste the following:
 @echo off  
 set ImageFileTypes=gif, jpeg, jpg, png, psd  
 for %%a in (%ImageFileTypes%) do (  
      "%ProgramFiles%\Everything\es.exe" -s ""*.%%a"" >> "%Temp%\images.txt"  
 )  
 "%ProgramFiles%\IrfanView\i_view32.exe" /filelist="%Temp%\images.txt" /thumbs  
 del /f /q "%Temp%\images.txt"  
Save the file as "previewImages.bat"

Make sure Everything search engine is running before executing "previewImages.bat"