I find adverts on websites annoying, really, really annoying (which is why they’re not on this site). I use IE exclusively in the office and I thought it made sense to block it, so that when I’m reading Ars Technica or El Reg my eyes stop bleeding. I found a great article that explains how to do this at “Learn with Nirab”. I’m rewriting what he says to make it a little easier to follow:

What do I do?

Do this:

Step 1

Go here, http://www.fanboy.co.nz/adblock/ie.html, and underneath Fanboy Adblock List for Internet Explorer 9, click Add TPL.

Click Add TPL

Step 2

Go here, http://dl.dropbox.com/u/17445922/ElementHidingRules.zip, and extract the file to your ‘My Documents’ or ‘Documents’ Library.

Step 3

Now you just need to go to Internet Options > General > Accessibility and select “Format documents using my style sheet”. Enter the path to ElementHidingRules.css file you extracted earlier and hit OK, OK.

Setting the Custom CSS

Step 4

Enjoy. I’ve tried it on Bing, Google, Ars Technica and a handful of others and it all seems to work! :-)

Can I do this via GPO?

Yes, probably. I’ve done a little bit of research and I found the necessary settings within the registry to enforce the CSS.

The key: HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerStyles

Registry Settings

Essentially all you then need is a GPO to copy the file over and have, that same GPO possibly, add this registry key. What I cannot find, because it doesn’t exist, is a GPO to force the necessary TPL setting. There may be a script o’matic solution, or the existing TPL settings could be used. It’s worth a shot at any rate!

Checksums

I’ve checksumed the file ElementHidingRules.css that I used to block ads with, I do not warrant it in any way and you use it at your own discretion!

Checksums generated by ExactFile 1.0.0.15
http://www.exactfile.com
09/01/2012 17:07:07
ElementHidingRules.css
67551 bytes
ADLER32: c3d894d0
CRC32: 72773bae
MD2: dbfd566d28a9a5a6e32117f4e23468ce
MD4: 357813e5fa9fbdf3995d14bf4a6be245
MD5: a94f41ee8d0b0bafc675451c52d27960
SHA1: be107743d27394e7f55018f7a260918653064f5b
SHA256: 31efbc7c5c00412a3eb575284b54da6d7749b050e4caef06f384f51997d2e8f9
SHA384: d6050dd37e316a84b31566510b6668d4d1725d339462d9a554102aee06324d128156e7daac5c30c1373ca15207103950
SHA512: 5ce272fb6210fa6b2c56192688661bbfb6ed10cc1d444b9e53564e2e6daac161c96264511b263f5e768983eadddc08b1dbe1bc8a7e4932842b103af7a380637b
RIPEMD128: fa4af9060f4aae6a3622310fddeec106
RIPEMD160: 7f442bd5259d5e4ed79184be80ebe75f38a7a2b4
TIGER128: cbc05a1cc474c7ec4d351cc20d80b8bf
TIGER160: cbc05a1cc474c7ec4d351cc20d80b8bf55e18ddb
TIGER192: cbc05a1cc474c7ec4d351cc20d80b8bf55e18ddb6381366a
GOST: 5d0612e8fc91edd128ef3f051b5e383c2e6dc74f9b8ae2edaf31d1323f4b85f8

PS How could I be any kind of security consultant and not provide a checksum for a file I link to! :-)