The search is over! — And why I’ve been tearing my hair out over this

I think I have finally found an answer to programmatically launching the default browser. I’ll get to that in a minute but first I thought I’d tell you why I’m doing this.

As most of you know, I’m pretty paranoid when it comes to email and Internet access. I don’ t like to read my email, for instance, in a web-enabled email client. Too many nasties can sneak past your defenses. I’m not crazy about the protection afforded by accessories external to the main email clients I use (Outlook and Outlook Express) and so I opt to inspect (and often, handle completely) my email through clients that aren’t HTML nor even really web-enabled. Yeah, I know, I’m a throwback, a neanderthal but you just can’t get any safer than that. For the longest time I’ve been using a pure text-mode email client called mutt on my Unix shell account at RawBandwidth. This is a good, safe environment and the email client is under active development so it’s been a pretty good solution. Problem is it can’t render ANY HTML and relies on an external viewer (like lynx) to display anything having HTML in it. One of the shortcomings of such a setup is that when I find an HTML email that I consider “safe,” I can’t easily view it or any of the links in a multimedia browser (like IE or Mozilla or …).

I’ve danced around Pine for quite a few years, never really getting too far in to it … I was happy with mutt. One day I decided to look into it further (probably because a new version became available for Cygwin). Turns out that Pine development has far outstripped what I expected of it. It can display HTML in line-mode but in a form that’s pretty easily understandable. There’s a native Windows PC version and, of course, a version for just about any *nix you care to name (including, I might add, OS X) and they have a fairly recent version on my shell machine. I tried it and, by golly, I like it! Next thing is, naturally, to set it up so I can browse those links in the message I deem “safe.” OK, well, the easiest thing is just to run IE directly. I did that for quite a while but, with all the flipping back and forth between browsers, it became tedious to have a web page come up in IE when I was using Opera or MyIE2. That’s what sent me on my hunt for a way to send a URL to the currently-running browser. You’d think that’d be simple, wouldn’t you? Well, it is simple if you know the trick (ain’t that always the case!).

I was on the right track a few days ago when I asked a few of you if you knew how to do this in VBScript or JScript or a BAT file. My meanderings and Google and Microsoft searches finally led me to ShellExecute — an API function. I’ll go in to the details in the next entry.

Leave a Comment