Description
When saving the settings to the registry, RegCreateKeyEx should be used to open the releated key
instead of RegOpenKeyEx, otherwise the settings are not saved if the key doesn't already exist.
Also, since the function only creates/sets values, the requested access rights should be
KEY_SET_VALUE instead of KEY_ALL_ACCESS. Otherwise saving the settings may fail if the user
doesn't have full access rights to the key in question.