April 2008 Archive

Prevent Security Warnings Using ADO With HTAs

April 6th, 2008

If you are using the ADO object to connect to a database within an HTA in a networked environment then you will get a rather annoying message box warning about ActiveXObjects.

To prevent this in all my HTAs I start the script off with the following statements (this is in Javascript).

var objShell = new ActiveXObject("WScript.Shell")
objShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1406", 0, "REG_DWORD")
objShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains\\myServer\\file", 2, "REG_DWORD")
objShell=null

The effect of the first RegWrite is to allow ‘Access data sources across domains’ and then the second write adds my network location (myServer) to the trusted sites.

These can be manually changed from within Internet Explorer as they are the zones settings in Internet Options.

Setting these keys requires no admin rights but they may well get overwritten by Group Policy so it’s best just to include them at the start of the script.

Note that the first time the application is run you will still get the warning as it will have read the old values, but by the next run they will be set.

The Internet Without Adblock Plus

April 5th, 2008

Mozillia released Firefox 3 beta 5 a few days ago so I upgraded from the beta 4 release. Unfortunately the Adblock Plus addon has not been updated yet.

I’ve been using this addon for so long and have it installed whenever I install Firefox on a computer that I’ve completely forgotten just how many annoying adverts there are on many web sites I visit. On top of that they slow down my browsing while I wait for some massive Flash movie to load or some other useless ad.

It’s so bad that I’ve actually gone back to using Firefox 2.0.0.13 that I also have installed, just to avoid the ads. Of course now I have the problem that I’ve got so used to Firefox 3 betas that going back to Firefox 2 is also pretty hard…

Enable gzip Compression in Wordpress 2.5

April 4th, 2008

I only noticed today that the gzip compression option was removed from Wordpress 2.5. Apparently this was done as it’s easy to acheive the same thing using mod_deflate on Apache.

The problem is that my host uses Apache 1.3 and also doesn’t have mod_gzip installed so I had no choice but to do this in PHP.

Fortunately I came across this plugin that re-enables gzipping of pages saving me bandwidth and my visitors downloading time.

GNOME’s New Virtual File System

April 2nd, 2008

I upgraded my blog to Wordpress 2.5 tonight.

Normally I would unzip the files to my local computer, start up gFTP, and simply upload the files. Quick and easy.

For a change I decided to do the whole process within Nautilus since I have the ftp account to my web host set up as a mounted folder within Nautilus. Soon after starting I regretted this choice, the main problem was one of speed.

My internet connection varies slightly but averages around 8-10 Mbits/s download and upload since it’s an symmetric line. However tonight when uploading 2 folders containing 511 files Nautilus would spend about 3 minutes just preparing for uploading and then it took about 25 minutes to uplad the files.

During this time my netspeed applet reported an upload speed of about 20kbits/s. Just to check it wasn’t a problem at my end I emailed a 2 MB file just afterwards and sure enough it was sent in a matter of seconds.

Ironically enough, today I was reading an ars technica review about the release of GNOME 2.22 and the new GNOME virtual file system (GVFS). It sound like something that will fix a lot of my complaints with the current system which, to be frank, just seems unreliable.

As another example, just a few days ago I tried the ‘Connect to Server’ option with Nautilus to mount an SSH connection. Nautilus just responded with the error:

Nautilus cannot display “ssh://root@172.16.*.***:22/”.

Please select another viewer and try again.

I know this works fine from the command line so it’s definately a Nautilus issue.