Creating a new .htaccess file in Windows 7

Have you ever tried to create a new .htaccess file in Windows 7 (or Vista) via windows explorer? If so, this error will probably look familiar.

Rename-Error

Luckily there are a few easy ways around this annoying behavior.

Fix 1

Open Windows Explorer.

Right click > New > Text Document.

Enter “.htaccess.” as your file name and say yes to the warning.

Fix 2

Open Notepad and hit go to File > Save As.

Change the save as type to “All Files”.

Enter “.htaccess” as the file name and hit save.

Fix 3

Open a Command Prompt.

Type “copy con .htaccess” and press enter.

Press CTRL+Z then enter to save and exit your file.


Automatically backup FireFox 3 bookmarks

I like to format my computer fairly often which means having all my data in one easy to find location. Not only does this make backing up easy but it also removes that dreadful feeling you get when you realize your new OS install overwrote your irreplacable bookmarks, precious emails and/or accumulated works of Bettie Page.

Bookmarks are easily forgotten but with a few tweaks FireFox 3 can back them up for you.

Customize your bookmark backup settings

Open FireFox 3.

Go to about:config in your location bar.

Specify browser.bookmarks as your filter.

Set browser.bookmarks.autoExportHTML to true.

Create a new string titled browser.bookmarks.file and set its value to the location you want to backup all your bookmarks to.

In my case I entered “D:\ForestMist\Personal\bookmarks.html”.

firefox 3 about:config example

Restart FireFox.

Epilogue

Everytime you close FireFox it will export a fresh copy of all your bookmarks to the file you specified. There may a slight performance hit for doing this but I think the benefits far outweigh the cost.

Now you can mirror your bookmarks with services like SugarSync, share them easily with friends or just have peace of mind in case the new JSON database FireFox 3 uses behind the scenes explodes in a spectacular example of Murphy’s Law.


Windows Mo’bile

Samsung-BlackjackThe Samsung Blackjack is the best Windows Mobile phone I’ve ever owned.

It crashes daily, drops calls and is as sluggish as Pizza the Hut is delicious.

I upgraded my particular phone from Windows Mobile 5 to 6 mostly to enable fuzzy positioning in Google Maps.

Overall, each OS had a similar issues so you can choose either faster performance in version 5 or prettier interfaces in 6.

Living with my aging phone was becoming a hassle but I wanted to keep using it for maximum monetary efficiency. I thought the best way to do this would be to customize the phone and make it more pleasurable to use. Adding various sound effects and backgrounds was easy but I needed something a bit more custom. I needed something that I could be amused by while restarting for the umpteenth time. I needed a startup animation… with sound!

The device already had an AT&T animation with a swooshy sound effect so it seemed I would just need to track down the file format and replace. Easy yes?

Actually… no. It turns out that the animation is obfuscated within a file called “OemAnimationDll.dll”. The sound effects are at least in the open as “start.wav” and “stop.wav”. They are each 4 seconds long and easy to replace if you are using Windows XP with Active Sync 4.5. Vista is a bit more complicated.

Windows Mobile Device Center in VistaUsing Vista means you will have to deal with the  Windows Mobile Device Center. A shiny product which mostly complicates accessing dialogs which are much easier to find in Active Sync. It also means you won’t be able to overwrite protected files in your smartphone\windows directory. To get around this issue we can edit the registry to change the pointers to both the animation and sound effects to files with new unique names.

Moding the Startup

Make a copy of  smartphone\windows\OemAnimationDll.dll and then open the cloned file with Resource Hacker. Each folder is a frame of animation, 40 total, stored in PNG format. The first 20 images are for starting up and the last 20 are for shutting down.

Resource Hacker

Select the first of the PNG items (titled 1033 within any folder) and then choose Action > Save Resource as Binary File. Name it 1.png then open up the image to see the first frame of animation that your phone uses. The dimensions of these files are 320 by 240.

To replace an animation frame simply right click the image in question, choose “Replace Resource…” select the new PNG you want then enter anything in the Resource Type and Name fields. Press “Replace”.

If you try to copy the updated OemAnimationDll.dll to your phone now you may get an error like this.

Error Cannot Copy File

Unfortunately many system files on your Windows Mobile device are protected in this manner. To get around this issue we’ll have to edit the registry on your phone.

To make sure registry changes persist, download and run SDA Application Unlock. This will also grant also your device the ability to run unsigned code and supposedly overwrite system files although that part didn’t work for me.

Next, install and run MobileRegistryEditor 1.2.

Mobile Registry Editor

Navigate to HKEY_LOCAL_MACHINE\System\Startup\1 and then change the value of Dll to “CustomAnimationDll.dll” or whatever you named your file to.

Copy the file to your smartphone\windows directory and then restart your device.

Frak!

Up to this point I was very hopeful but to my dismay, no animation played. :(

I proceed to go through a soul crushing amount of technological incantations. Different resource editors, image formats, digital signatures and more esoteric experiments but nothing worked.  It’s a damn shame too because I had the perfect TV static animation to go along with the following soundbite from Max Headroom.

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Perfect for a communication device that goes down more often than a narcoleptic nymphomaniac at a romance novel convention!

I console myself with the idea that sharing my experience may help someone else in the same situation. Hopefully they will be able to take the process to completion and make this particular Windows Mobile phone a little easier to live with.

Epilogue

A minor car dismounting accident cracked the screen of my Samsung Blackjack. This led me to the phone I had been secretly lusting after all this time, le perfection.

*Nuzzle*