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.