Archive: Backup files on install, restore on uninstall


Backup files on install, restore on uninstall
Hello.
I've found this:
http://nsis.sourceforge.net/Backup_f...e_on_uninstall

I made two nsh-files with the macro inside and saved them in the include-folder.

My nsi-file:
...
!include "MUI2.nsh"
!include "BackupFile.nsh"
!include "RestoreFile.nsh"
...
SetOutPath "$INSTDIR"
!instermacro BackupFile "$INSTDIR" "example.exe" "$INSTDIR\backup
...
Section "Uninstall"
Delete $INSTDIR\example.exe
!insertmacro RestoreFile "$INSTDIR\backup" "example.exe" "$INSTDIR"
Delete "$INSTDIR\Uninstall.exe"

I get the error:

Error: unterminated string parsing line at C:\Programme\NSIS\Examples\Modern UI\WelcomeFinish.nsi:60 Error in script "C:\Programme\NSIS\Examples\Modern UI\WelcomeFinish.nsi" on line 60 -- aborting creation process

What's wrong?
Thanks


I see this line is missing a closing quote:

!instermacro BackupFile "$INSTDIR" "example.exe" "$INSTDIR\backup

It should be this:
!instermacro BackupFile "$INSTDIR" "example.exe" "$INSTDIR\backup"

It should be "insertmacro" not "instermacro" :)
Sorry, I'm so silly^^


HA! Looks like we both missed that one! :D