It most likely is legal for you to use your cd key with a borrowed cd. Unfortunately, AFAIK, there aren't any programs any more that allow you to look up the cd key once it's installed. I think you're pretty much out of luck, unless you can find it written somewhere in the original packaging.