I don't think there's any such thing as a BIOS built-in test, but some OEMs do install diagnostics, such as Dell. I don't recall for sure about the others. Is it an OEM build or custom build or what? (OEM = HP, Dell, Acer, etc)... custom build would describe anything if you can't find a label on it pretty much.
It does sound like your hard drive for sure, and the hdd tests on the Ultimate Boot CD should let you know that.
The reason is this: Ubuntu was running off the CD drive and RAM, never touching the hard drive since you didn't install, so you've eliminated that one piece of hardware.
The Windows CD is trying to recognize your hard drive, b/c it's trying to see where to install it... if it's having difficulty reading the drive info to tell what's raggedy there, whether you want to install, upgrade, repair, whatever, well it'll end up timing out and saying can't find the drive, or something else if you let it go long enough.. unless it just gets stuck, I suppose that's possible.
I'd quit testing, myself, buy a new hard drive if possible (assuming its yours), replace the old with the new (but don't just toss the old)... after installing Windows on the new, and getting it ready - updates, drivers, security, etc... then shut off the PC, reconnect the old on another cable (if SATA) or as a slave (if IDE / PATA), and try to copy any files that you still need off at possible.
The reason I say all that is if you keep trying to deal with the broken one, particularly with some types of damage, it will only get worse - so the more you test, the worse the damage will be. That's why I think it'd be best to cut the losses, so you hopefully can still recover some data.