In my project I have a "Secure Property" which is set by the user in one of the dialogs and written in registry. During first install, the property is encrypted successfully and I can see the encrypted value in the registry.
In maintenance mode, "Modify" to be precise, I show the same dialog to the user allowing him to modify the value if needed. In the "Init Events" of this dialog, I decrypt the value and display in the edit box. The value is decrypted successfully and original value is shown in the edit box.
However, on termination of the "Maintenance", the new value that is provided by the user is not encrypted and original value is written in the registry.
So, is there a reason, why the property is not enctypted (secured) in this mode?
Notes:
1. I have added "Reinstall one or more features" custom action in order to install the feature again even if there is no change in the "CustomizeDlg" during maintenance mode.
2. In the InstallExecuteSequence table "AI_SecureProperty" action is set to be executed before "WriteRegistryValues" action and there is no condition set for both of them.