check product key windows 10 cmd application code example
Example 1: get windows product key cmd
wmic path softwarelicensingservice get OA3xOriginalProductKey (do this in cmd, as administrator, Windows/system32)
Example 2: how to get current product key windows 10
wmic path softwarelicensingservice get OA3xOriginalProductKey