Thursday, February 18, 2010

Opening the Temporary Internet Files folder for Outlook attachments (OLK5A, for example)

One of our employees opened up a PowerPoint attachment (ugh, I know) from an email in Outlook. He then edited it extensively and saved it using the File → Save As menu command. Unfortunately he did not bother changing the folder he was saving it to, with the result that it was saved in whatever temporary folder Outlook uses for holding email file attachments. The problem is that this folder is hidden and very hard to find. Even typing in the path directly in Windows Explorer does not work. So when he closed out of PowerPoint he realized he was in danger of losing all the work he had done unless he could find and open that folder.

I found the solution here after some searching, but even that page only explains how to learn where this temporary folder is located; it does not make it clear how to actually open the file. I found how to do it though.

Open Registry Editor (Click Start → Run, type regedit and hit Enter). Browse to the following location in the registry structure, depending on the version of Outlook you use:

Outlook 97HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Outlook\Security
Outlook 98HKEY_CURRENT_USER\Software\Microsoft\Office\8.5\Outlook\Security
Outlook 2000HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
Outlook 2002/XPHKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security
Outlook 2003HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security
Outlook 2007HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security

Double click the OutlookSecureTempFolder value, and copy that value to the clipboard (i.e., select all the text, right-click and hit Copy on the popup menu).

Then go to Start → Run and paste the value in, and hit enter. An Explorer window will open showing the folder, containing probably every attachment you’ve ever opened.

Wednesday, February 17, 2010

BBM Messenger Log Cleanup Script

As mentioned previously, the CSV files produced by Blackberry Messenger 5.0+ need some cleaning up before they can be properly used. I finally wrote a short script for doing just that.

You can download the VBScript here: bbmcleaner-1.1.zip. This code is released to the public domain.

Once you have the BBM log file on your computer (email it there from your phone, again, see the last post on this subject), just drag and drop it onto this VBS file, and a “clean” version will be produced as a separate file in the same directory. The new file will have human-readable dates and the message will be properly escaped – in short, it will be something you can just open and use in Excel (e.g.).

Change Log

Version 1.1 (Feb 20, 2010)

  • Added GMTOffset constant to allow timestamps to be properly adjusted for time zones.

Friday, February 12, 2010

No internet access over wifi (the infamous "local access only" problem)

On my Windows laptop, wifi connnects easily to all wireless routers, but every once in awhile it will not allow connections all the way out to the internet. This mainly seems to happen when I switch to a new environment, such as bringing my laptop out of the home and out to a coffee shop. This first started happening to me in Vista, and the problem has persisted in Windows 7 Pro.

The problem, which you can verify by opening a command prompt and typing ipconfig, is that sometimes Windows assigns itself a bizzarro IP address instead of the one given by the DHCP service on the wifi router. This made-up IP address is usually on some odd subnet and never of course on the same one as the actual wifi network.

Here’s the (ugly) solution: Open Notepad and cut/paste in the following:

ipconfig /release
ipconfig /renew

Save it as something like wifi.bat. Save it somewhere permanent but out of the way, and put a shortcut to it somewhere handy (on your Start menu or something).

Now when you have the problem, right-click this file/shortcut and click “Run as Administrator”.1 It might take a little while, but five’ll getcha ten your problem will be all cleared up afterwards.

1 If you have UAC turned off, you can just run it the normal way.

Blackberry Messenger Logs - Timestamp Format

(Update: I've written a VBScript to convert BBM logs into something cleaner and a bit easier to read.) The newer versions of Blackberry Messenger (BBM) include an option to save chat history to your device memory or media card. I was glad to find it save chats in comma-separated value format (CSV) — or at least that the files it creates have a .csv extension — since CSV has been around for decades and is easy to read on any platform. There are a few caveats with BBM’s particular log file format, however.

To get the files off my phone, I just emailed them to myself (they’re stored on my media card under /Media Card/BlackBerry/im/BlackBerry Messenger/your_pin/history). You can open up the file in a text editor like Notepad, and you will see the messages are in the following one-per-line format:

[timestamp], "[sender PIN]", "[receiver PIN]", Message...

Example:

201002101265815660914,"8194BE13","31E12A40",Ok, heading out the door!

The format for the timestamp is a mish-mash of things: the left eight characters are the date in text format (yyyymmdd) while the rest is actually epoch time with an extra three digits added for the milliseconds. So the date part is really redundant (since epoch time includes the date) but whatever.

The other caveat here, as you can see in the example above, is that the actual message portion is not enclosed in quotes, which is unfortunate. A proper CSV file would enclose in quotes any field that may contain a comma (since commas are used to delimit fields in CSV files). Thus, if the message contains any commas, that particular record will appear “broken” to any CSV parser. I consider this to be a bug in the Blackberry Messenger software1. This could be fixed in this case by creating a script2 that cleans the file up into strict CSV form: insert a quote mark before the 45th character of every line, and another at the very end, and double all quote marks in between (that is, in the original message) — again, see the wiki article for more info on the CSV format.

1 The bug is especially weird since the PIN fields, which have no possibility of containing commas, are enclosed in quotes.

2 I will probably do this myself at some point in the future I just can’t say when. I wrote the script: you can read about it and download it in this followup post.

Friday, December 18, 2009

Removing DRM from your audiobooks

Like many, I was dismayed to find, after signing up for a year at audible.com, that their audiobooks are still in a proprietary DRM format. Ten and twenty years from now, after iTunes and audible are both gone, I still want to be able to listen to these audiobooks for which I've paid good money, so I set out to find a way to free the data.

Note that these instructions will not work unless you have a valid playback license for the original audiobooks. I'm talking about protecting your own media from planned obsolecence here, not filesharing.

There are probably completely free ways to do this, but the straightforward way is just to buy DRM Converter. No, I'm not getting a referral fee for mentioning them here (I wish). Yes, it's not a free solution. But it works without a lot of rigmarole. Twenty-five bucks gets you un-DRMed audiobooks — for someone like me who has a lot of them, that's worth it. The only other downside is that, for Audible files, at least, DRM Converter removes the encryption in real time. That is, it takes the program eight hours to un-DRM an eight hour audiobook. The good thing is that it can do more than one at a time.

Because I'm kooky, I like to create both MP3 and unprotected iTunes Audiobook (.m4b) versions of my audiobooks. I'll show you how to do both here.

Method One: Converting AA to MP3

This is the easy one. Just set DRM converter to use the MP3 format.

When it has finished, there are a couple more steps to take to get the file into the proper place in iTunes. Add the file to your library (using File menu, → Add File to Library), and it will show up in your Music section, not in your audiobooks. Right click the file in iTunes, select Get Info and go to the Options tab.

Select the Audiobook and Remember Playback Position options as shown above. Voila! The file will now appear in the Audiobooks section of iTunes.

You may also want to copy and paste the album artwork from the original Audible file (again, using the right-click menu → Get Info.

If you want to add chapter breaks, you'll need to create a .m4b file instead. Here's how:

Method Two: Converting AA to M4B with chapter breaks

This method involves the use of an additional program, Chapter and Verse, which is free. Download and install it before continuing!

The first step is to use convert the AA file to an M4A file using DRM Converter. Use the following settings:

Most of my audible.com audiobooks are encoded at 32kbps anyways so there's not much point in going higher.

After you have your .m4a file, open Chapter and Verse, and add that file to your project. (If you get an error at this point, see below)

If you're picky about having chapter breaks in the actual spots between chapters in the audiobook, you'll have the chance to poke through the audio and insert chapter breaks in the right spots. Myself, I just have it automatically insert chapter breaks at 30-minute intervals (most of mine are fiction so there's not much call to go skipping back and forth between chapters):

Once ready (don't forget title/artist metadata and cover art!), click Build Audiobook as shown above, and the program will produce an M4B audiobook and offer to add it to your iTunes library for you. Once there, it will immediately be in the Audiobooks section of your library, no additional tweaking required.

“Not recognized as a valid audiofile” — If Chapter and Verse gives you this error when attempting to open your m4a file, it is probably because the sample rate is too high given the length of the audio.

This is explained by the program's author in detail here, but in our scenario, the problem comes because DRM Converter saves its m4a files at 44.1khz (not configurable). When the file reaches a certain length in minutes, it becomes too big for Chapter and Verse to handle at that sample rate.

To solve this problem, you can use iTunes to downsample the m4a file. in iTunes, go to Edit menu → Preferences and on the General tab, click Import Settings….

Set the import settings as follows: AAC encoder, 22.050kHz sample rate, 32kbps bit rate.

Click OK to close all the dialog boxes. Now go to the .m4a file in iTunes (or the .mp3 file you may have created earlier for that matter, it's up to you), right-click it and click "Create AAC version." iTunes will re-encode the file using your new settings and you should be able to open that new .m4a file in Chapter and Verse.

Thursday, October 15, 2009

How to protect yourself from viruses without installing anti-virus software.

You don’t really need antivirus software on your Windows computer. Over the past several years, antivirus scanning has become much more centralized. Most of what you download over email or at work has already been scanned for viruses and malware anyway — why pay Norton or McAffee to have it scanned again once it reaches your hard drive? And why have another program running on your computer, slowing it down and wasting resources?

Running antivirus software on Windows these days is almost like getting a smallpox vaccine. Your individual situation may vary (see below), but very likely you can be both free and safe without antivirus software by taking a few basic precautions and being generally security-aware. You may already be aware of these precautions, but you may not have known that following them may effectively eliminate the need for stand-alone antivirus software on your computer.

  1. Use Gmail (or your corporate account) to send and receive file attachments via email. Many free email providers, such as Gmail, Yahoo and Hotmail, scan attachments for viruses and malware for you, so you know the file is clean when it gets to your hard drive. Many businesses, both small and large, do this as well on their own internal mail servers. (If there is a good way of testing and verifying email providers’ attachment scanning claims and abilities, though, I would like to know about it.)
  2. Use the Internet from behind a router. Don’t plug directly into your Cable or DSL modem. Plug a router into that thing (a wireless router if that’s how you like to roll) and then use that. Most off-the-shelf routers have built-in firewalls that prevent the most common attacks.
  3. Limit the amount of software you download. Get the programs you like installed and then keep your computer the way you like it for a good long while. Don’t be constantly looking for and downloading new utilities.
    • Especially don’t download anything in response to a popup window, ever. If you ever get a popup warning you about viruses on your computer, for example, it’s a lie. Just close it.
  4. Don’t use LimeWire or BitTorrent (unless you really know what you're doing out there). As Dylan Boom said in this comment at Lifehacker, “I work at Best Buy for Geek Squad, and the computers that come in with the most viruses, etc. normally have two things on them: AVG as their virus protection software, and Limewire.” It is impossible to verify the authenticity or origin of anything that passes through a torrent service (not counting md5 signatures on Linux distributions etc). Consequently people love to insert malware on stuff and send it on to unsuspecting downloaders as the real deal.
  5. Use open-source whenever possible and download directly from the software’s main website.
  6. Stick to mainstream, trusted websites and access them through your bookmarks or browser shortcuts whenever possible – don’t get in the habit of visiting the same website repeatedly by typing its name into Google (or any search engine) and clicking on the top result. Stay away from porn sites and any place offering something for nothing. Don’t click on ads.
  7. Keep your computer updated. Windows has a provision for automatically downloading and installing security updates and fixes – make sure it’s turned on and that it’s working.
  8. Use a more secure web browser such as Chrome or Firefox. Make sure it is fully up to date (instructions for how to do that on Chrome and Fireox).
    • Don’t use Internet Explorer. Even the US DoHS has advised against it. While that security advisory is a few years old by now, the fact remains that IE’s security model is too broken to trust.

Note that if you don't follow most of these practices already, no antivirus program is going to be able to keep you safe indefinitely anyway!

The main principal here is to clean and verify all the ways that you exchange information into and out of your computer: that mainly means email, web browsing, your physical internet connection, and being cautious about installing new software. Note that you may still need antivirus software installed if:

  • You need to share files through shared network drives or email accounts at work that you know are not scanned by antivirus software. (this would include things like shared folders on Dropbox accounts, which, as far as I can tell are not scanned for viruses.)
  • You regularly exchange files using thumb drives or external hard drives owned by other people.

Comments and proposed changes & additions welcome!

Update, Nov 11 2009 — After I submitted this post a couple of times at Lifehacker, they came up with their own variant: Stop Paying for Windows Security; Microsoft’s Security Tools Are Good Enough [sic]. (Not suggesting there's a relationship there. Well OK maybe I am.) I still believe Microsoft’s security tools are unnecessary, however supremely adequate they may be for the job they're supposed to do, but there are a lot of good points in the article, and I highly recommend it.

Friday, August 28, 2009

Ready for the Desktop

I've been having issues on my Sony VGN TZ190 ever since I installed a certain operating system on it, shortly after I bought it in 2007(Yes, even I have computer problems I can't seem to solve):
  • About every seventh time I open a file window, the file browser crashes and complains that it was because of my Bluetooth driver, for which no update is available from Sony. Now it is stupid that Sony has not provided an update, but there is no good reason whatsoever why a Bluetooth driver should be crashing my file browser.
  • When I start my computer, and at least once a day, I get a message that says "Sony Vaio Services (sub-module) has stopped working." I have no idea what this is, really, or how it's affecting me.
  • The Fn keys for screen brightness do not work at all. The Fn keys for volume control work but do not provide any visual feedback.
  • After working for two years both the programs that play DVDs now crash when I try to play a DVD.
  • Printing to a network printer is essentially broken. If you try, the program from which you are printing will hang for a good 5-10 minutes before sending the job, and then it will only print half the time.
  • Wifi connnects easily to wireless routers, but every once in awhile will not allow connections all the way out to the internet. I have to run a command-line program to get it working again.

Looking at this list, you'd think I was running a Linux distribution from 2005. No, these are all problems I'm having with Vista, SP2 no less.

By contrast, I recently downloaded Ubuntu Netbook Remix (version 9.04) and gave it a shot, and guess what? Everything worked flawlessly with no configuration necessary, including all the Fn keys on my Sony Laptop's keyboard, which I would have thought would depend on some vendor-specific drivers. And it's speedy, even running off of a Sandisk USB flash drive.

I don't know how long it will take for Linux to be truly ready for the corporate world. But for private persons, Windows and Linux seem to have changed places while I was asleep. It's now Vista that's the haggle-draggle OS requiring command-line fixes and plagued with buggy drivers.