Archive

Archive for the ‘Windows’ Category

Booting Ubuntu through NTLDR or Windows Boot Manager

August 4th, 2010 16 comments

You know you’re a bit of a dinosaur when you get excited and nostalgic at the prospect of using assembly language again. Assembler was the second computer language I learnt – straight after Sinclair BASIC on the ZX Spectrum, which was nearly 26 years ago. For a while I hand-assembled my programs, painstakingly writing each instruction on paper, and then converting the opcodes and operands into their hex equivalents for eventual POKEing into memory. I went on to learn x86 assembler, but haven’t used it in years. Until now!

Imagine that you have two hard drives (sda and sdb). Windows is installed and working happily(?) on sda. You have installed Ubuntu on sdb. You don’t want to mess with your Windows partition, so you’ve installed Grub to the MBR of sdb, but you do want to be able to launch Ubuntu via the Windows NTLDR boot menu. This was a problem, which recently arose on the Ubuntu forums. I’m blogging about it, because it was a lot of fun to solve, and it may help people understand a little better what goes on in the boot sequence. Read more…

Jailbreak for iPhone 3G

June 3rd, 2010 No comments

Being somewhat of a hacker at heart, it was only a matter of time until I decided to jailbreak my new iPhone. I know that it invalidates my warranty, but I liked the idea of some of the cool tools I could download, which aren’t available through the iTunes store. Plus – it’s my phone, so if I break it I’ve only got myself to blame! Jailbreaking the phone – a term for removing the restriction to only download software approved by Apple – was a bit of a paradoxical exercise. It was simultaneously easier, and more difficult, than I thought! Read more…

Error: 0x8002801D Library not registered

November 10th, 2009 3 comments

The more I use Linux, the less patience I have for what I consider to be stupid Windows errors. Unfortunately, in my job as a systems administrator, I can’t escape stupid Windows errors!

Today was a prime example. I had a custom application, which worked perfectly on my machine. It calls Microsoft Word to import text from a document, and then processes it. I went to install the application on another machine, tried the same procedure and got the following wonderful error in the event viewer:

Exception: System.InvalidCastException: Unable to cast COM object
of type 'Word.ApplicationClass' to interface type 'Word._Application'.
This operation failed because the Query Interface call on the COM
component for the interface with IID '{xxx etc.}' failed due to the
following error: Library not registered. (Exception from HRESULT:
0x8002801D (TYPE_E_LIBNOTREGISTERED)).

Hmmmm…at first I thought it could be differences between versions of Office – 2000 on one machine and 2003 on the other, but I knew the app would definitely work with 2000. Both machines run Windows XP Professional, with the same service pack level.

A lot of digging eventually pointed towards “Microsoft Office 2007 Primary Interop Assemblies“. But, wait – didn’t I just say that the machines were Office 2000 and 2003? Yep, but it seems that HP “helpfully” pre-installed it on the brand new PC I’d bought for this particular project. Although I’d uninstalled the “trial” edition of Office 2007, the interop assemblies had remained.

What are Primary Interop Assemblies?

The interop assemblies contain metadata, allowing access to the Microsoft Office COM objects. The Primary Interop Assemblies contain the official definitions from Microsoft. That’s why the call to the COM object in my application failed, because the Office 2007 Primary Interop Assemblies can’t communicate with Office 2000 and 2003.

Going into the Control Panel and removing the Microsoft Office 2007 Primary Interop Assemblies fixed the problem. Of course, I’m still curious about why the interop assemblies weren’t removed with the full uninstallation procedure, but maybe that’s a question I shouldn’t ask!

Browser Wars II

July 10th, 2009 No comments

Anyone who was using the Internet in the early-to-mid nineties will remember the Netscape vs Internet Explorer browser wars. Oh…the good old days of having to initiate your Windows 3.1 dial-up connection before launching Trumpet Winsock.  But I digress! Unsurprisingly for anyone who knows me, I held on to using Netscape Navigator & Communicator for as long as I possibly could, before giving in to Internet Explorer. Yet again, “standards” were being set – not by technical superiority, but by the sheer might of one company’s dominance on the desktop.

That’s not to say that Navigator/Communicator was always superior to IE. Initially, yes – but I abandoned using Navigator when it was renamed to Communicator. At this point IE was significantly better and didn’t produce a BSoD as soon as I started working on something important! Later I switched to Mandrake Linux on my desktop and used Konqueror instead. Now, my daily  browser is the spiritual successor to Navigator – Mozilla Firefox. Not only is it extremely fast at rendering pages, it’s compact and very stable.  IE is installed, but is reserved for checking how a page renders to ensure that my stylesheets are correct.

It seems that I’m not alone in my decision to change browsers. A recent story on Slashdot regarding IE’s apparently reducing market share shows that the Browser Wars are definitely not over – just the names have changed, well…one of them has, anyway.  The story reported that IE’s market share appeared to have dropped from 64% to 56% in just over a month! Wikipedia shows IE holding 65.5% of the market with Firefox at 22.1% as of May 2009.

The question is, though, what is IE’s actual market share? Where are the most accurate figures for browser usage? Where can you find statistics that reflect what’s happening in the real world? I’m sure the answer is on the tip of your tongue, but I’ll say it anyway  – the access logs for www.mattrudge.net of course!

Firstly – I don’t usually access or look at my own website, so the figures aren’t skewed by my visits, but the statistics for July 2009 are surprising: Firefox accounted for 51.4% of visits, Internet Explorer 33.1%. Other browsers, such as Konqueror, Safari, Chrome, Opera, iBrowse and Netscape Navigator 5 (?) made up remaining 15.5%.

For June, the figures were completely reversed with IE showing 51.7% and Firefox 26.6%, and for the year-to-date, IE is at 45.8% and 31.6% for Firefox. There were also 25 visits from a lunatic using Netscape 1.0! Whilst visits to mattrudge.net have increased since 2008, the percentage of visits from IE users has steadily decreased.

Whether these statistics reflect what’s going on in the real world or not, I don’t know – maybe it’s just that IE users have better things to do with their time than visit my little corner of the web. What these and other statistics do show, however, is that for the first time in many years, there is a credible (and highly recommended) alternative to IE.

Error 403.2 Read Access Forbidden on IIS

July 5th, 2009 4 comments

Every so often, as most system administrators know, a problem arises on a server, which is interesting, frustrating, time consuming and, ultimately, extremely satisfying to solve. I had this kind of problem recently on one of my Windows Server 2003 boxes. I installed Microsoft Data Protection Manager 2007 to provide snapshots of my other Windows servers, and also wanted this machine to serve some internal web pages. [Note: yes, I know that Microsoft's guidelines state that a DPM server should be single use, and not an application server, but we're only talking about serving 4 or 5 pages generated from a PHP script on my internal network - not exactly taxing!!]

IIS appeared to be set up correctly.  I copied in the web pages,  tried to access them from my workstation and received “Error 403.2 Forbidden – Read Access Forbidden”. I checked all the things you usually check – user permissions, file and directory permissions, IIS permissions through the MMC snap-in.  Everything seemed to be correct.

I checked forums, newsgroups and the Microsoft Knowledge Base, all of which said to check the same things. Oddly, I could view the pages if I opened Internet Explorer on the IIS machine itself, which led me on another wild goose chase of checking firewall settings.

Finally, a newsgroup post led me into the murky world of the IIS Metabase – an XML file of IIS metadata. Much of the data contained here cannot be modified from the IIS user interface snap-in. To view or modify these settings, install the Metabase Explorer from the IIS Resource Kit.

In Metabase Explorer, I expanded the LM/W3SVC/1/ROOT key and checked the AccessFlags property. This was set to 30209, which means that AccessNoRemoteRead and AccessNoRemoteScript bits were set. Resetting them to the normal value of 513 (AccessScript and AccessRead bits set true) for each virtual directory listed in Metabase Explorer, and restarting IIS solved the problem.

IIS 6 Metabase Explorer

IIS 6 Metabase Explorer

The question is…how did these flags, which are not accessible through the standard UI, get set in the first place? Although I haven’t seen it written anywhere, I suspect it’s an undocumented feature of the DPM set-up. Given the warnings about not using the DPM server as an application server, it would appear that DPM modifies the metabase directly and hardens IIS by preventing remote reads.

After that initial few hours of frustration, my slightly expanded use of the DPM server seems to be working fine.

Reference: Microsoft IIS AccessFlags property