Create a Safely Remove Hardware shortcut

A screenshot of a Safely Remove Hardware shortcut on Windows desktop.

Here’s a tip I gleamed from today’s Windows Secrets newsletter. You may well be familiar with the ‘Safely Remove Hardware’ icon which appears in your notification area (or ‘system tray’ if you must) when you plug in a removable hard drive or camera (or whatever). You may also notice that the icon sometimes isn’t there – and this is a problem which my parents’ computer randomly suffers from – which means it’s difficult to safely disconnect removable devices. The answer: a desktop shortcut.

Right-click on the desktop, select ‘New’ and then ‘Shortcut’. For the item location, copy and paste the following:

RunDll32.exe shell32.dll,Control_RunDLL HotPlug.dll

Then click ‘Next’. Call the shortcut ‘Safely Remove Hardware’, and you should be done. If you want to make it look snazzier, right-click the icon, choose ‘Properties’ and then the ‘Shortcut’ tab, click on ‘Change Icon’ and in the ‘Look for icons’ box type:

%windir%\system32\HotPlug.dll

The first icon in this file matches the ‘Safely Remove Hardware’ icon so you’ll be able to recognise it more easily.

Now, if the normal notification icon doesn’t appear, all you need do is double-click your new desktop icon to safely remove any disks before unplugging them.

Update (November 2023): This was written back in April 2007, but it still seems to work in Windows 10.

Quickly compress PNG images

Before posting any PNG images on here, I use the open source Pngcrush tool to compress the images as much as possible first. Even when I set the compression to its highest value in programs like IrfanView, Pngcrush is still able to make most images even smaller.

Unfortunately, Pngcrush is a command-line tool, so it’s not the easiest tool to use in Windows. So here’s how to add a ‘Crush’ option to the context (right-click) menu in Windows Explorer for quicker crushing.

Firstly, you’ll need to download Pngcrush, which is availble at Sourceforge. You’ll want the win32 version. Download it and unpack it somewhere.

The instructions that follow are for Windows XP; for older versions they’ll be a little different.
Open Control Panel and choose Folder Options. Select the File Types tab, and scroll down to the ‘PNG’ entry. Click on ‘Advanced’, then click on ‘New…’.

In ‘Action’, type Crush, and in ‘Application used to perform action’, type the following:

C:\Downloads\pngcrush\pngcrush.exe -e 2.png "%1"

The first portion should be the location of the pngcrush.exe file that you extracted from the archive. The ‘-e 2.png’ bit specifies what the outputted PNG image will be called, which in the case it’ll be the filename with ’2′ appended to it (so the crushed version of ‘catpicture.png’ would be called ‘catpicture2.png’). You could also use the following:

C:\Downloads\pngcrush\pngcrush.exe -brute -e 2.png "%1"

This does the same as the above but does a ‘brute force’ crush – rather than use one of a few common methods to crush the file, it will use all of them. It’ll take longer, especially on older hardware, but may result in a smaller PNG file.

And you’re done. Now, when you right-click on a PNG file, you can select ‘Crush’ and have Pngcrush your image for you. Remember that the compression is lossless – you won’t lose any quality by using the tool.