Archive

Posts Tagged ‘Windows’

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…

Dual-boot in Ubuntu 10.04

May 6th, 2010 13 comments

Disclaimer: This post is not meant to cover every aspect of dual-booting – it is a general guide, so use these commands at your own risk. If you’re in doubt – don’t do it. Ask for help instead!

One of the most troublesome aspects of upgrading appears to be getting operating systems to play nicely together (or at least to co-exist peacefully) – particularly if you normally dual-boot between Ubuntu and Windows. I’ve had some difficulties on one machine with dual-boot. So here are the results of my investigations. 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!