Hello.
I've found this:
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
Backup files on install, restore on uninstall
4 posts
I see this line is missing a closing quote:
It should be this:!instermacro BackupFile "$INSTDIR" "example.exe" "$INSTDIR\backup
!instermacro BackupFile "$INSTDIR" "example.exe" "$INSTDIR\backup"
It should be "insertmacro" not "instermacro" 🙂
Sorry, I'm so silly^^
Sorry, I'm so silly^^
HA! Looks like we both missed that one! 😁