Hi,
I have noticed a strange behaviour in NSIS (as a launcher)...
Many days ago I have reformatted my HD.
From that moment, ALL THE PROGRAMS that I've portabilized (and use registry backup) with NSIS failed to run.
Or better, the launcher start the program but it doesn't backup/restore the registry data.
And all that programs worked fine before reformatting HD...
The programs that doesn't use registry.nsh still works fine.
May this be caused by a bug in NSIS or in registry.nsh?
Thanks
Registry.nsh
8 posts
Try Process Monitor. Maybe your program only works when certain keys already exist?
I don't know what looking for...
All the programs never works.
Even if I use ProcessMonitor, what should I control?
The keys in regedit are all new and blank (like new installation or unregistred programs).
All the old backup keys are deleted (as programmed) on exit the program.
But the new keys are not backupped.
All the programs never works.
Even if I use ProcessMonitor, what should I control?
The keys in regedit are all new and blank (like new installation or unregistred programs).
All the old backup keys are deleted (as programmed) on exit the program.
But the new keys are not backupped.
Look for a copy/backup operation on your key.
The code is this, and worked fine for months:
Section "MOUNT REGKEY"
!include "Registry.nsh"
!define REGKEY1 "HKEY_CURRENT_USER\Software\MyApp"
!define DATAKEY1 "$EXEDIR\Data\MyApp.reg"
${registry:😁eleteKey} "${REGKEY1}-BackupBy${APPNOSPACE}Portable" $R0
Sleep 200
${registry::MoveKey} "${REGKEY1}" "${REGKEY1}-BackupBy${APPNOSPACE}Portable" $R0
Sleep 200
${registry::RestoreKey} "${DATAKEY1}" $R0
Sleep 200
SectionEnd
Section "UNMOUNT REGKEY"
Delete "${DATAKEY1}"
${registry::SaveKey} "${REGKEY1}" "${DATAKEY1}" "/A=1" $R0
Sleep 200
${registry:😁eleteKey} "${REGKEY1}" $R0
Sleep 200
${registry::MoveKey} "${REGKEY1}-BackupBy${APPNOSPACE}Portable" "${REGKEY1}" $R0
Sleep 200
${registry::Unload}
SectionEnd
Section "MOUNT REGKEY"
!include "Registry.nsh"
!define REGKEY1 "HKEY_CURRENT_USER\Software\MyApp"
!define DATAKEY1 "$EXEDIR\Data\MyApp.reg"
${registry:😁eleteKey} "${REGKEY1}-BackupBy${APPNOSPACE}Portable" $R0
Sleep 200
${registry::MoveKey} "${REGKEY1}" "${REGKEY1}-BackupBy${APPNOSPACE}Portable" $R0
Sleep 200
${registry::RestoreKey} "${DATAKEY1}" $R0
Sleep 200
SectionEnd
Section "UNMOUNT REGKEY"
Delete "${DATAKEY1}"
${registry::SaveKey} "${REGKEY1}" "${DATAKEY1}" "/A=1" $R0
Sleep 200
${registry:😁eleteKey} "${REGKEY1}" $R0
Sleep 200
${registry::MoveKey} "${REGKEY1}-BackupBy${APPNOSPACE}Portable" "${REGKEY1}" $R0
Sleep 200
${registry::Unload}
SectionEnd
Is there something wrong?
Have you detected a possible reason?
Have you detected a possible reason?
All I can suggest is Process Monitor. Try to find the operations that correspond to your script actions and look at those that fail, and why.
Thanks.