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.

Screenshots on a PocketPC

Since it took me a while to find out how to do this myself, I’m going to use this opportunity to tell you how to take screenshots on a PocketPC or Windows Mobile device – in my case, Windows Mobile 2003.

First of all, you need to know that, as far as I can tell, your device does not have a screenshot capability built in. It’s not like a Windows machine where you can hit Print Screen or a Mac where you can hit Cmd+Shift+3 – you will have to install some software first. I’m sure there’s some fancy-pants shareware jobby that will do the job painlessly but in this instance we’re going to use Pocket SnapIt (link no longer available), which is available for both normal Windows Mobile/PocketPC devices and Windows Smartphone handsets. There’s also a Windows version for your PC. It’s free and open source.

Choose the relevant package – for my Dell Axim x50v, I chose the PocketPC package – and download it to your device. This may mean downloading it to the Mobile Device folder in My Computer and then using ActiveSync to send it across. Then, click on the cabinet file on your device to have it install. If you’re using Windows Mobile 2003 (and probably 5.0 also) you’ll probably get a warning saying that the application was designed for an older operating system – you can ignore this. Now, go to Programs and run the newly-added Pocket SnapIt icon.

You’ll now need to define a hotkey to trigger the taking of screenshots. I chose the ‘/’ character – to set this, click on Menu and select Options. Then click Menu again, expand Options and choose Capture Options. Now click Menu a third time and click Select Capture Button. Click OK and then select a key on the keyboard. Click OK to go back to the main screen, and then click Start.

Now, open up the program you want to take a screenshot of and press the trigger key – you should hear a noise when you do. You should then find a bitmap file in your My Documents folder call Snap001.bmp – this is your screenshot.

You can see my effort further up the page – this was a shot from Skype for PocketPC. As you can see, the capturing mostly works but it chokes on the font smoothing, so you may want to consider turning this off first. You’ll also need to change the image format to something other than bitmap if you want to post your screenshot on the internet (since bitmaps are not compressed) – PNG is probably the best format to go for. The image I posted is less than 13KB.

Why I’m not switching to WordPress

Now that I’ve announced the book, I’ve had a couple of emails on the lines of “So I’m guessing you’re not switching to WordPress now, huh?”, and indeed I’m not. The book, however, is not the only thing that’s keeping me with MT and I’d like to use this (rather long) entry as a list of reasons why I’m not likely to switch any time soon.

Firstly, MT is what I’m used to. As of the middle of next month, I’ll have been using it for 2 years – whereas I’ve been using WordPress for less than 3 months. It’s the same reason why I use Windows as opposed to Linux – sure, Linux may be more secure and less likely to crash, but I know how Windows works and I feel comfortable in that environment.

Secondly, there’s the templating system, which I’m afraid to say, sucks. Again, maybe I’m just used to how MT works, but altering the way comments display in WordPress requires a lot more time and knowledge than it does in MT. In MT, the templates are totally separate from the MT source code – in WordPress, that separation isn’t so finely defined. Indeed, when you edit wp-comments.php (in 1.2) you’re faced with a 20 lines of PHP that you can’t edit before being able to dig in. And even then, you get comments like “if you delete this the sky will fall on your head” – hardly reassuring for a newbie.

Want to alter how the RSS feeds display? Then you have to edit a page with lots of PHP code which can’t be removed for fear of the sky falling on your head, and with a warning about this being an integral part of WordPress. You also need to know what the file is called since it’s not linked in the WordPress interface. Adding new pages, especially new types of feeds, seems to require a good understanding of PHP – adding a new template in MT is far, far easier.

WordPress isn’t all bad though, and it’s a whole load easier to install than MT is. In fact, a newbie to blogging* would be better off installing WordPress than MT, and includes nice blog-centric features like a links manager. But if you want to control how your site displays and don’t know much PHP then MT is the way to go, in my opinion.

(* = a newbie to blogging would really be better off on a service like Blogger or Typepad, but if they wanted something they could run themselves, WP would be easier than MT)

WordPress also wins on the comments front, despite what I said above, since it has much better comment management features built-in (although in 1.2 they are rather hidden away). That said, MT is brilliant once you have MT-Blacklist installed, since it deals with all the duplicate comments and spam perfectly, but that isn’t included out of the box (though it will be available with MT 3.1).

Rebuilds seem to be a bone of contention with some – if your web server isn’t so fast, they can take forever. I’ve never really had that problem as my host’s servers seem to run well (and I have optimised MT a bit to make it faster) but some people do find that rebuilds take forever for them. With that in mind, I suggest you wait for MT3.1 which adds support for dynamic pages. This will give you the best of both worlds – pages that get requested often like your indexes and feeds can be static, whereas other pages can be generated on the fly as needed. Sure, you can install a caching plug-in for WordPress but it’s not something that’s there out of the box (in 1.2, at least). The result is that rebuilds will be much quicker since only 2 or 3 files are being regenerated each time, plus, unlike in WordPress, you won’t have the PHP preprocessor kicking in and doing an SQL query every single time someone requests your RSS feed.

Rebuilds are also quicker in MT3.x due to its more efficient use of SQL queries and background tasks. Since upgrading to MT3, this site has been a whole lot faster, though I am working a new search script to replace mt-search which is a little slow.

Both packages have plug-ins and while WordPress kicks MT2.x’s arse in that respect, MT3.x does have much better plug-in support and many more hooks to allow developers to integrate their plug-ins with the MT interface without needing to modify the MT source code (detect a theme here?). For example, with MT-Blacklist installed, the comments mass editor has a ‘despam’ link added for running comments through the blacklist and removing the bad ones. As more plug-ins designed for MT3.x are released I’m sure we’ll see some truly great plug-ins that integrate tightly with MT.

MT’s help is better. There are some very extensive help documents provided with MT, whereas WP has a few links back to its rather sparse documentation pages on its web site. There’s also the wiki but like many wikis it suffers from a lack of structure, and some areas are quite patchy, in my opinion. Trying to have information only display on an individual entry page meant having to use a seemingly undocumented PHP function, for example. Apparently the #wordpress chat room is a good source of help but I’m not comfortable with asking for help in chat rooms and it assumes that you have an IRC client and that you’re on a connection that doesn’t block IRC like my university does.

This is getting quite long but as you can see, I have my reasons for not switching. What this isn’t is a “WordPress sucks and I can’t believe you all use it” rant, it is merely pointing out that WP is not for me. I’m sure that when WP reaches maturity it’ll be much better and I may give it another look when it hits 2.1 or something, but I’ve yet to be totally impressed. MT is at 3.01 now and feels much more mature than WordPress does. That said, my test install isn’t about to disappear any time soon, though a test install is what what it will remain.

I’ll leave comments open on here – I know this may seem controversial to some of you so please play nice.

Going into print

The cover of the book 'Hacking Movable Type'

If you read Ben Hammersley and Jay Allen, you may have seen references to “the book” recently. This is Hacking Movable Type (sponsored link), a 500+ page guide to getting deep down and dirty with MT and customising it to the extreme. And now I think it’s time to let you know that I’m writing a couple of chapters for it.

It’s very much a group effort – as well as myself, Jay and Ben, there are contributions from Matt Haughey, Brad Choate and David Raynes amongst others, and the foreword to the book is being written by Ben and Mena Trott themselves. As arguably the least known of any of those, I’m naturally flattered to be involved in such a project.

The book is still very much a work in progress but will be out later this year. I’ll keep you posted. In the meantime, if you want to pre-order it, the ISBN is 076457499X and the publisher is John Wiley & Sons.

Apple Lossless Encoder

One new iTunes feature that slipped by me was the new ‘Apple Lossless Encoder’. Unlike music formats like MP3, AAC and Ogg Vorbis, lossless encoding results in no loss of quality – the music file sounds exactly like the original. The downside to this is that files compressed using lossless compression are typically quite a bit larger than their lossy counterparts.

With the largest iPod topping 40GB it’s hardly surprising that Apple have adopted this – I’m sure the majority of people will never fill that much (even I have only 6-7GB) so the extra space can be set aside for higher quality files. What is surprising is that Apple chose to adopt their own format, and not one of the (many) other lossless encoding formats.

If you thought there was a format war amongst lossy encoders then you’ll be knocked back by how many lossless ones are out there. There’s at least 14, although not all of them are as good as each other. Thankfully, lossless formats are easier to compare since output quality isn’t a factor, but a good format will have quick encoding, a small output file size, many features, and would preferably be open source too.

The most popular is FLAC (Free Lossless Audio Codec), which is now being steered by the Xiphophorus Foundation who are also steering the Ogg Vorbis format. It’s arguably not the best format out there but it’s good enough and it’s entirely open source. It’s well represented on almost all platforms and is even in some hardware players. Monkey’s Audio is a little faster but isn’t so well supported, being restricted to Windows and a command line encoder in Linux. Although it is open source, development has been a little slow of late, and it lacks some features compared to FLAC. Shorten is another popular format.

Apple Lossless Encoder (or ALE for short – nice acronym), is, sadly, based on none of these. It’s a new format which is closed source and currently only works in iTunes (Mac and Windows) and through QuickTime, although a dBpowerAMP codec is apparently in the works. It is quite well featured, offering streaming and seeking support (which a surprising number of other formats lack), and is obviously supported on the iPod with the addition of the latest firmware update, so on paper it has a similar number of features to FLAC. It is, however, slower at encoding and decoding, and files are typically a megabyte or so larger, according to this comparison provided by the FLAC project, however this HydrogenAudio topic suggests it is faster. I’m guessing Apple may have optimised it for the PowerPC processor, in which case compile times on Mac OS X would be better than in Windows.

It’s just a pity that Apple took the decision to re-invent the wheel when good alternatives already exist, although this Macworld column reckons this is because Apple may want to add DRM to it in future so that punters can buy higher quality files from the iTunes Music Store. AAC was an open(-ish) format and look how quickly that was cracked. On the other hand, I doubt the record labels would be interested in giving away their songs on the internet at full quality, based on their previous boneheaded decisions.

There may also be reasons, such as patents or problems with embedding FLAC in the iPod firmware, but seeing as other hardware manufacturers have managed it this seems strange.

In any case, it’s an interesting development. Any support for lossless audio in iTunes is a good thing, I just wish that Apple had gone with the herd rather than go on a tangent and then confuse people. What I would like to know is whether the WMA import function of iTunes allows you to convert them to ALE, since then you wouldn’t lose any quality – I couldn’t find anything that suggested this in my research for this article.

Boing

Hope you enjoy that extra day we have to stick in every 4 years so that the seasons remain in order!

No special plans, although I’ve spent almost half of it asleep now since I only just got up. And then when messing around with Real Alternative I realised I’d missed out on this week’s Radio 4 comedy shows, so that was another hour wasted.

Thanks for the comments about the re-design, I’m glad to hear that all of you who have commented like it.

Media Player Classic

A screenshot of Media Player Classic on Windows XP

This post was originally written in 2004; I’d now recommend using MPC-HC, an improved fork of Media Player Classic.

Does this program look familiar to you? It may well do, because it’s rewrite of Windows Media Player 6, except it’s open source and released under the GNU GPL, and doesn’t have the annoyances of MS’s original. The interface is similar but a little more up-to-date and XP friendly, and comes with some more advanced features.

But probably the best thing about this player is the range of formats it supports. It’ll play just about anything you throw at it, whether it’s an MP3, an Ogg, a WMA, even a QuickTime file. And with Real Alternative (which Media Player Classic is bundled with), you can add RealMedia files to that list, negating the need for RealOne Player, which has to be enough reason to download it in itself.

You can also (probably) ditch QuickTime while you’re at it, since MPC doesn’t take an age to load, doesn’t annoy you with an ‘Upgrade to QuickTime Pro’ popup and lets you view movies in full screen. Unless you have iTunes installed in which case you’ll need to keep it.

Media Player Classic is available on its own from SourceForge but I’d recommend also installing Real Alternative and then deleting RealOne Player, since you won’t want to use it anymore. Anil found Real Alternative about the same time as me, and came to similar conclusions, so you needn’t just take my word for it.

WeeMee

The above is my ‘WeeMee‘ character. It’s a silly thing for MSN6 that allows you to create a cartoon image to use as your avatar while talking to people – that was my best attempt at getting one that looked like me. Though obviously I’m a bit taller. And at the moment I have considerably less hair, although no doubt it’ll be that long in a few weeks.

For some reason, you need IE for it, even though it only uses Flash – it wouldn’t load in Firebird. If it suits you better you can create your own South Park character.

Finally, other than using glorified Flash-animations to draw cartoons of myself, I’m not doing anything much tonight, if it interests you.

Welcome to my world

Hello, and welcome to my world – a world filled with music, computers and other generally weird things. Please fasten your seatbelts and return your seat to an uptight position, as this may be a jerky ride…

I intend to use this page as an outlet for my thoughts and opinions, and will try to update as much as possible (after all, what’s a blog that lies unused?). I’m not going to give much away about my personality yet, since you’ll hopefully find out all you need to know (and more) about my life as you read on.