You are here

Using the same (defaultdata) registry key everytime the portable app runs.

4 posts / 0 new
Last post
gbrao
Offline
Last seen: 9 months 2 days ago
Joined: 2013-03-21 10:16
Using the same (defaultdata) registry key everytime the portable app runs.

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]) ?

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 7 hours 48 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
If you want the same data

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.

gbrao
Offline
Last seen: 9 months 2 days ago
Joined: 2013-03-21 10:16
Someone could have whispered

Someone could have whispered "Custom.nsh". For noobs like me.
Problem solved.

judeah666
Offline
Last seen: 10 years 6 months ago
Joined: 2009-03-28 15:53
You Could Use this

[RegistryValueWrite]
HKCU\Software\AppName\Key\Value=REG_DWORD:16
HKCU\Software\AppName\Key\Value2=REG_SZ:%PAL:DataDir%

Log in or register to post comments