if your friends pc is "branded" suchs as HP, dell etc and you try to use your own copy which is "retail" then his key won't work with your copy.
You could always install your copy and then call Microsoft and register over the phone. Just give your friends serial number and they will give you...