I have an application installed on my machine. I also have its source code but somehow the ProductCode and UpgradeCode of this application were changed.

Now I want to get the UpgradeCode and ProductCode of this installed application. I feel there must be some tool for this. 

Can anyone kindly let me know how to get the UpgradeCode and ProductCode of an installed application?