(I hope I got this in the right place)
Hello, I'm creating my own portable version of RollerCoaster Tycoon 2(hence I don't follow official specs or anything) and I've run into a problem. I got this piece of code:
${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames\" "HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames-backup\" $R0
Sleep 100
Which works as expected. However, the opposite does nothing:
${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames-backup\" "HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames\" $R0
Sleep 100
I remove HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames\ by restoring a .reg file containing:
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames]
before trying to rename the backup key back. The backup simply disappears instead of being renamed.
Anyone know of a solution?
I'm running Windows 7 Home Premium x86 right now, if that matters.
And I'm not very skilled with NSIS, by the way.
I've tested your code and it does work on my side, stangely enough ! You could do away with the last back-slash, thought.
Anyhow, in the portableApps launchers we use a slightly extended bit of code, just to play safe.
Before to start your app:
On exit:
Have a look in the source of the PortableApps launchers! Like NsisPortable, as a simple example !
Formerly Gringoloco
Windows XP Pro sp3 x32
There's no settings that change anyway in the registry so saving it for the next run isn't needed. Also, you're correct that it works. It probably something else removing the keys, I'll have to check further. Thank you anyway
EDIT: Scratch everything, seems to be a problem with the EXE file I was launching(not a official one). Also I'm not sure what settings are stored so the ability to save settings might come in handy, thanks again
EDIT#2: Now everything's working as it should. I just increased the Sleep to 1000, and now I'm saving the local data before importing the data that makes it work.