How can I make a portable app use the same reg key every time it runs. That is, any changes made to the key by the app itself should be discarded when the app is closed.
I cannot use [FileWriteN] because the value in the key is very long. And, the app writes random values to the key so I do not know what to "Find".
The other option would be to first delete the saved reg files in Data\settings every time the app runs, I'm assuming the reg files in Defaultdata will be used then. Is it possible to delete files in Data\settings ?
Where can I find a example of "-=registry key location" (from [RegistryKeys]) ?
If you want the same data written every time just use [RegistryValueWrite].
It won't be backed up when the app is closed and will always be the same when the app is started.
Deleting a single file from Data won't do you any good though - the whole Data directory needs to be deleted to have the Launcher copy files from DefaultData.
Someone could have whispered "Custom.nsh". For noobs like me.
Problem solved.
[RegistryValueWrite]
HKCU\Software\AppName\Key\Value=REG_DWORD:16
HKCU\Software\AppName\Key\Value2=REG_SZ:%PAL:DataDir%