Craig Box's journeys, stories and notes...

Archive for April, 2007

Access 2003 fires up Windows Installer every time you run it

Monday, April 30th, 2007

Found an interesting problem this morning - Access 2003 fires up Windows Installer (msiexec.exe) every time you start it, and for users without administrator rights, it just doesn't go.

After looking at dozens of newsgroup posts and trying a few solutions, I finally had enough debugging information to find the solution that worked: registry keys are missing from HKLM\Software\Microsoft\Jet\4.0\Engines. Copy them from another machine (changing paths where required) and it works again!  Would of course love to know what caused a bunch of registry keys to just disappear...

For those interested, I found that msiexec was writing to a log file using Filemon, and the log file contained the error "Cannot Open Jet XL ISAM registry key" - descriptive enough to find the solution.

WordPress header bug: Chunked encoding causes some aggregators to hate you

Friday, April 27th, 2007
  • Are people telling you your WordPress site isn't aggregating properly? (Do you check the output, see the RSS is fine, and think they must be mad?
  • Do you check the feed and see a weird 4 bytes on the top of it, and possibly a 0\r\n at the end, but only with wget - not with curl, and not with feedvalidator?
  • Are you running PHP 5.2.1?

If you answered 'yes' to these questions, you have this WordPress HTTP/1.0 causing chunked encoding bug. Thanks to Phil and John for identifying it.

<kinko> write(3, "GET /blog/wp-rss2.php HTTP/1.0\r\nUser-Agent: Wget/1.10.2\r\nAccept: */*\r\nHost:\r\nConnection: Keep-Alive\r\n\r\n", 126) = 126
<kinko> so wget should at least give a warning message that it got an invalid response to a http1.0 request, instead of breaking 🙂
<alastair> I hope you didn't strace wget there, kinko...
<meanphil> strace(or ktrace on fbsd) + tcpdump are the only tools you ever need to debug anything

(Note: fixed in WordPress 2.2.)

LVM bug on Feisty

Friday, April 27th, 2007

Once upon a time, there was a race condition between udev and device-mapper (the kernel interface used for EVMS and LVM2). DM would create and destroy devices regularly, say in the action of creating an LVM snapshot, and udev would say "ooh, shiny new device created" and try and do stuff with it, only to find it had gone away.

For some time, the fix for Ubuntu was a udev rule instructing it to ignore dm-N devices, as such:

KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"

All well and good, until they fixed that bug in Feisty. Now, if you still have that option in your udev rules, you will get LVM snapshots taking 10 minutes to create, and you'll also get LVM not starting properly at boot.

Check your workarounds when you upgrade packages. Sometimes, they not only don't work around any more, they cause all new problems.

Gray boxes when viewing Java applets

Wednesday, April 25th, 2007

Do you find you get gray boxes when you're looking at a web page with a Java applet (such as the Companies Office or JavaTester)?

You know you have the Sun JVM installed correctly, there are no traces of the Microsoft JVM, the plugin exists, but you can't see it in either Firefox or IE?

I had this problem for some time, and have finally found the cause - I have a custom transform for deploying Java, which turned off automatic updates, set the default JVM, etc, and also accepted the EULA.  As of about 1.5.0 Update 6,  setting EULA to 0 means that the JVM looks for EULA.DLL, doesn't find it, and silently dies.

Don't set the EULA property to 0 anymore. Ignore it.

You also used to be able to turn off the Automatic Updates in the properties table, but you can't any more.  You have to edit the MSI to run a registry script as the last action, and even then there are reports that Java will create the links on first-run.  I don't want my workstations getting a pop-up message saying Java will update when I carefully select the version to deploy, thanks Sun!

ProfileTool beta released

Wednesday, April 25th, 2007

ProfileTool screenshotI don't often write code, but I do find it's a good complement to cricket watching. So, in honour of New Zealand playing Sri Lanka in the World Cup semi-final, I'm proud to announce the release of the first public beta of the IT Partners ProfileTool.

ProfileTool lets you take a Windows 2000 or XP user's profile and assign it to a different user, without having to copy any files or perform any manual procedures.

This is a common task for people who are taking a network of PCs that have not been on a domain, and joining them to one; or if you replace a domain controller without keeping security information, which is sometimes done on sites upgrading from a badly installed SBS 2000 installation to a nicely installed SBS 2003 installation.

It also has useful features for deleting a profile off the disk/from the registry, and changing profiles from roaming to local, replicating the features of the User Profiles capplet.

The source is available under the Mozilla Public License, with the implication of "Do what you like with this code, but if you improve it, I'd like your source to come back to me please".

The Internet gets what it wants

Friday, April 20th, 2007

Where possible, I subscribe to the Internet through Google Reader. It's online nature makes it make sense to me

Some feeds only have half of the information on them - MySpace blogs (if you're a Crowded House fan you might be interested to know their head roadie writes a diary) are cut off after about 200 characters, and web comics like Penny Arcade and the Perry Bible Foundation have RSS feeds, but without the actual comics in it.
But the Internet fixes these problems, even if the people who publish the information don't.

Props to XKCD for publishing their comics in their feed.  I guess it takes a nerd comic to get it.

T9 dictionary editor for a Smartphone

Thursday, April 19th, 2007

I have problems with my T9 on my Smartphone. For example, it seems to like the word "diem1t" rather than "didn't". Someone must have written a dictionary editor, right?

  • Pocket PC dictionary editor - runs on the device, but doesn't want to run on my iMate SP5 (crashes with an exception).
  • T9 Editor - doesn't like the T9AW.UDB my phone has (crashes with an exception).
  • msT9ed - also doesn't support the new format, but loads it with some weird looking data.

In other news, shareware authors could do to handle exceptions better.

Any suggestions?

I like bargains

Wednesday, April 18th, 2007

 Note: this is all now sold.

ServerAnd I have many to offer today.

How about an IBM X226 server, kitted out with 3GB of RAM, for $1? Or perhaps you'd be more interested in a Mac Mini, for $1?

Trinkets traded

Wednesday, April 18th, 2007

A while ago I offered free Ubuntu stickers to anyone who sent me a self-addressed, stamped envelope.

One person sent me an outside envelope but no inside one. I had no choice but to add the stickers and post the original envelope back to him "Return to Sender". I hope you feel good, nameless postal scammer.

I asked for people to add little messages to brighten my day, and I must say, almost a month later, I still haven't been able to bring myself to throw these things away:

Gifts from Dominic

Thanks, Dominic. You're weird, but you rock!

Some housekeeping

Saturday, April 14th, 2007

I'm going on a big trip in a few months, and figure it's a good time to start planning a bit more actively.

I've used the "Getting Things Done" methodology in my e-mail for a while (basically: your inbox should always be empty, you should have an "Action this" folder and a "Reference" folder, and you should either deal with an incoming e-mail immediately or file it into one of these two folders for later processing).  It seems like it might be fun to try it a bit more with the things I need to arrange before I go - you really do have to break things down into small steps when it's "move half way across the world for fun".  So I'm looking at Tracks, a GTD program written in Ruby on Rails.

Before setting this up though, I needed to play with my web host a little, so have categorized my posts to this site.  This crosses something off my aforementioned list-of-things-to-do, and also means that I will be a bit easier to read on, where I am now showing up.  Also, I'll probably do the whole Postcards from Uncle Travelling Matt thing, and I'm sure my Mum will find posts about Exim a bit over her head.

I've also seen a lot of people using Google Calendar, and now there is a way to get Thunderbird to use it directly, and you can publish stuff to the web in a neat fashion, I might see if it can arrange my trip for me.

Any other suggestions are welcome, bearing in mind I will need them to be easily accessible from anywhere.