Where stored the key? In register of windows?
In files. It depends on the system. They shouldn't be changed by the user. Use our API. Namely, CheckAndSavePKey() and Deactivate(). (As well as all the other API functions).
CheckAndSavePKey()
Deactivate()