Yes, Ultimate will have a different product key than the one supplied with the Home Premium DVD.
This utility will find it from the Windows Registry: https://www.magicaljellybean.com/keyfinder/
I am assuming your friend installed the upgrade:
1) using a genuine product key that hasn't already been used on a different PC
2) It's not
a pirate copy and does not use a 'crack' to bypass product activation.