Monday, December 22, 2008

Windows XP and "invalid boot disk" message

This happened to the partner of a work colleague on his main computer.

Absolute bummer!

"Oh crap", I thought, "this might need a repair install..... *groan*"

But all is not lost!

Reboot the PC with the original XP cdrom.
Move through the screens till you get to the point of installing Windows XP, or using the "Recovery Console"

DO NOT choose the 'R' option to use the Recovery Console.
Just press Enter to install XP. (Don't worry - this is what this post is all about....)

Eventually, after accepting the license agreement and such, you'll be presented with a screen that shows you the current XP installation.

Here's where it all went wrong for my work colleague's partner.

There were no options to select the current XP installation. Bad news I thought. His disk is crapped out - looks like a new disk at worst, a re-installation at best.

But NO!

Somewhere in that series of screens will be something that shows what the current Setup thinks is the current disk configuration, and the current XP installation.

In the case of my work colleague's machine, his *external* USB drive was showing up as Drive C:
His recently bootable internal hard drive was showing up as Drive D:, and there was no identifiable XP installation.

"This is not right", I thought.

SO! What to do?

....
....
...
....
....
....
....
....
....

Yes. Unplug the external USB hard drive and reboot.

Lo and behold and thanks to whatever diety you worship!

His Windows XP PC booted just fine and dandy.

Plugged the USB hard drive back in, and everything was back to normal.

Good stuff.

Saturday, December 06, 2008

Debugging an activex dll called from a classic asp page.....

in the Visual Basicv 6 IDE used to work so easily before all the security updates from MS made it a lot harder.

I had an idea for a web app that I could run on my webserver here, but wanted the flexibility of single-stepping through my code in VB6 instead of having to put lots of response.write statements in the classic asp code.

Basically, calling an ActiveX DLL requires the following code in the asp page:

<%

Dim oObject

Set oObject = Server.CreateObject("Project1.Class1")

Response.Write oObject.DoSomething

Set oObject = nothing

%>

That's all the asp page needs to be - the rest of the code is in the Class1 module of the Project1 project. All fine so far.

So anyway, to be able to actually debug in the VB6 IDE, you need to follow the instructions here:

But I still couldn't get it to work. Here's my solution:

Put a breakpoint on a line of code in your AxDLL.

Start your project (Ctrl-F5)

Start Regedit.

Find the Project1.Class1 key in HKLM\Software\Classes

Right click it.

Select Permissions.

Click Add.

Type "everyone" (the everyone group)

Click Ok.

Select the Everyone entry.

Click the Allow checkbox to the right of the Full Control label.

Click Ok.

Browse to the asp file in a web browser.
With any luck, the VB6 IDE will now be active and you can step through the code.

Press F5 to continue running and return the result back to the asp page.

You should see your results.

Now, stop your project.

Refresh the RegEdit page.

See how the Project1.Class1 entry has disappeared? Bummer isn't it? You'll have to go through the process of granting Everyone Full Control each and every time you run your AxDLL project, but hey, its a small price to pay to get it to break in the IDE from your asp page.

Hope this helps someone, somewhere.

Oh! And by the way, this is only meant for development on your local machine. Once you've got the AxDLL finalised, you can then compile and register it for real on your web server machine. Once you've done that, you'll need to give full rights to the HKLM\Software\Classes Project1.Class1 key to IUSR_???? and the NETWORK service - I think. Please correct me if I'm wrong.



Reblog this post [with Zemanta]

Thursday, December 04, 2008

Glenda will do it herself...

I have heard of Glenda Watson Hyatt before.

I decided to type out the first paragraph of her most recent blog post using just my left thumb, as Glenda does. So here goes: current time: 5:05pm.

"In this economic downturn, it's easy to ignore and forget individuals who are truly in need, those who are struggling to find food to eat and a warm place to sleep. But, this is exactly the time when they are in need the most, to know that they are not alone and that others still care."

Time now: 5:08pm. (Italics and inverted commas added by me at the end) - I have no idea how Glenda manages bold and italics in a blog post.

Anyway, it took me just over three minutes to type that one paragraph with one thumb.

If you think you're having problems, spare a moment to think about all the other people in the world who have way many more problems than you.

Tuesday, December 02, 2008