I have already done some fundamental statements in the past in my post Question regarding the registry on this topic. In this respect this post here represents only a supplement.
In this post I want consider the following code:
[Activate] Registry=true [RegistryKeys] -=HKCU\Software\AppName
Actually, the launcher must perform the same operations in this case, as I have already described in my above mentioned post. Please look for more detailed informations under my comment with the subject"revision of the instructions". In combination with the above mentioned specific code is the only change, that step #7 is omitted. Here is a summary of the complete instructions for the above specific code.
- If the launcher detect a local installation of the same program on the PC, then a backup of the registry key "HKCU\Software\AppName" with "resident" program settings in a log file is created, which I call "backup.reg".
- Delete the registry key "HKCU\Software\AppName". This serves to initialize the working environment of the portable program.
- The launcher creates a registry key "HKCU\Software\AppName" with no entries in the registry.
- If at the first start of the program the developer/publisher wish to use individual settings, then he must save an appropriate file "appname_predifined.reg" in the folder DefaultData.
- Startup and use of the portable program. By changing the settings of the program the registry key "HKCU\Software\AppName" may also be changed.
- Closure of the portable program.
- Delete the registry key "HKCU\Software\Appname".
- Restore "resident" program settings previously saved in the file "backup.reg".
- Delete the file "backup.reg".
Does anyone have any additions to that?
On startup: if there is a key HKCU\Software\AppName and no portable backup for it (under HKCU\Software\PortableApps.com\Keys), move it to HKCU\Software\PortableApps.com\Keys\HKCU\Software\AppName.
On close: delete HKCU\Software\AppName, and if there is a backup for it under HKCU\Software\PortableApps.com\Keys, move the backup back to its original location.
Previously known as kAlug.
Thank you for this supplement. Through this additional information is now a further problem for me solved. Namely the question of where the backups are stored. These backups will stored under HKCU\Software\PortableApps.com\Keys.
Under No. 3 of my above instructions have I mentioned , that nevertheless will be created an empty registry key. That's so far true or?
We don't create the key; we just backup and restore it (if it existed previously).
Previously known as kAlug.
I'm very sure that such an empty registry key is created. Assume the non portable version of the app named "AppName" creates the registry HKCU\Software\AppName. Moreover, there exists no locally installed version of the program on the computer. If you now launch the portable version of the program "AppName", then it will store its settings in the registry key HKCU\Software\AppName. Because after the start of the portable app, however, no registry key is present, the launcher must generate that key. Accordingly the launcher creates the empty registry key HKCU\Software\AppName, then the portable app will launch and can now stores its settings in this key.
Please stop assuming things about PAL. Especially when one of the PAL developers has just told you personally how it works.
PAL backs up the existing key when it exists but does not create a new one by itself. It will create it if the appropriate .reg key already exists, though. This key will not exist by default unless it was within DefaultData, copied to Data and then loaded on start. If it does not exist, the key is not created and it is up to the app itself to create it. We have released portable apps that take both approaches.
Sometimes, the impossible can become possible, if you're awesome!
First, you should accept that everyone here can express its thoughts freely, as long as something is not clear. And in the future you should be more responsive to my questions with correct answers, because only in such a case it is possible to realize a really fruitful discussion.
For I have you in another post twice explicitly asked where the backup is stored. But you don't give me any answer.
First, folks here are supposed to be working together as that's the point of these forums. That means taking a developer at their word when they tell you how the software they wrote works unless you have observed it behaving differently. You stating that what Aluisio told you was impossible with no evidence takes away from the discussion, it doesn't add to it.
Second, I didn't answer as I didn't know. I didn't write the current PAL implementation. Aluisio and Chris did. And you can also find out by checking the PAL code.
Finally, not receiving an answer is not an excuse for escalation. We're just talking about software and code here. And there is likely a bit lost in translation between these posts as two of the three of us are multilingual. Just breathe, relax, and let's build cool stuff.
Sometimes, the impossible can become possible, if you're awesome!