Wonderful Utilities

November 7, 2007

Here are a couple of utilities I use regularly that I consider indispensable and most definitely worth the money.

Ultramonlink

If you have a multi-monitor setup, you must run out and purchase this tool right now.

This tool has changed my life!

OK, maybe not really changed my life, but it has drastically improved my satisfaction level when working across multiple monitors. The price is reasonable at only $39.

Just buy it. Or at least download the trial. You’ll thank me later.

Enso - link

Humanized.com puts out some interesting products; I’ve only tried Enso, and it is truly a beautiful thing. It’s a little hard to explain without actually giving it a whirl, but, in a nutshell, you can teach it to do things when you type short commands, like “open my documents”, or “open intranet”, or “define heuristic”.

If you’re a developer such as myself, your first thought when you take a look at Enso will probably be something like, “I could have done that. This isn’t that hard.” But after using it for a bit, I’ve come to think that it’s too simple and elegant to have been easy to put together. I can open a file, URL, folder, or run a program anywhere on my computer, without searching for it, just by typing a simple intuitive command.

And the price is super reasonable at only $19.99.

Just buy it. Or at least download the trial. You’ll thank me later.


Automagical Update

November 6, 2007

I’m becoming more and more convinced that the best application installer out there is WiX. No, it doesn’t have a fancy GUI, and yes, it has a crazy nasty learning curve, but once you get into it’s innards it is awesomely powerful.

I’m doing some work on the next minor version of Code Toaster, which (hopefully) will include an automatic update feature. After reading (again, for the ka-jillionth time) this tutorial on creating an update msi with WiX, methinks it should be fairly straightforward. The process will go something like this:

  1. When Code Toaster launches, it will download an XML file containing version information.
  2. If there is a new version (as noted in the XML file) Code Toaster will download the msi installer for that update.
  3. Code Toaster will launch the msi and exit.

One problem I’ll have to resolve is how to install an update while Code Toaster is running. The most oft-used and recommended solution for doing auto-updates is to launch your application via a proxy that does the update work, and then launches the application later if no updates are available (or after the update process is complete). But I don’t like that for a couple of reasons. 

  1. If there are two executables, CodeToasterProxy.exe and CodeToaster.exe (or whatever), that might confuse a user as to which one to run (users would run CodeToasterProxy to get the update capabilities, not CodeToaster.exe).
  2. Since CodeToaster.exe can be run as a command-line application (to compile/run templates in batch mode, for example), it should be intuitive which exe to run in that scenario. In this case, the user would run CodeToaster.exe, not CodeToasterProxy.exe.

I bet you’re looking at this post cross-eyed after that wonderful explanation, huh? Maybe I should have boiled it down into one reason: confusion. And we sure don’t want Code Toaster to be confusing.

There is another option : to have Code Toaster check for and download updates, and then launch a separate application to run the msi update. That would keep things intuitive – you would always launch CodeToaster.exe rather from the command-line or from the Windows GUI, and CodeToaster.exe would remain in control of the update process. The only problem, and a minor one at that, would be the installer app would need to wait until the Code Toaster process had successfully exited before beginning the install. So step-by-step, it would work like this…

  1. CodeToaster.exe launches and downloads an XML file containing information about available updates.
  2. If an update is available, CodeToaster.exe asks the user if they want to go ahead and download and install the update.
  3. If the user wants to install the update, CodeToaster.exe initiates the download.
  4. Once the download is complete, CodeToaster.exe launches the installer application, and then exits.
  5. At this point the installer must wait until CodeToaster.exe has finished exiting, and then launch the update .msi file that was downloaded earlier by CodeToaster.exe.
  6. Once the msiexec process has exited, the installer app can re-launch (the now updated and bodacious than ever) CodeToaster.exe, and way the user goes!

Whudya think? I think I like it. That’s the route I will probably take – there are a lot of steps but I think it’s more elegant than having a proxy app between the user and your application. Howsomever, there may be someone out there who knows better – if so let me know.

On another note, I’ve noticed that Windows Installer packages are quite difficult to update. You can’t just run an msi containing a minor (version) update, because you’ll get an error message that says ”Another version of this product is already installed.”

Well, duh! I want to update the version that is already installed!!

So you have to run your msi using the following command:

msiexec /i MsiFileName.msi REINSTALL=ALL REINSTALLMODE=vomus

Don’t ask what “vomus” stands for. I couldn’t find an adequate definition/explanation on Google within my 5-second attention span. But this is another reason to use an automatic update design instead of asking the user to run an update msi manually. Ask a user to do that to update your software and they’ll hate your guts and call you names.

This, too, is documented in the WiX tutorial, lesson 4, if you’re interested in some late night fireside reading while your hunting dog naps beside your overstuffed armchair.

So, looks like I have some work to do.

Onward.