Archive: Backup and restore files question


Backup and restore files question
I need some help with Backup files on install, restore on uninstall macros at http://nsis.sourceforge.net/wiki/Bac...e_on_uninstall. Is there a way to make them accept wildcard?


Nope.
You can however make another NSIS installer that generates your NSIS script for your main installer for you.

http://nsis.sourceforge.net/wiki/Inv...n_compile-time
http://nsis.sourceforge.net/wiki/Req...t%2C_FindClose

-Stu


Ok, I will try that. Thanks :)


Hummm, new question for you Afrow UK...

I am getting errors with these:

!insertmacro BackupFile "$INSTDIR\Data\SingleMissions\English\H H" "h h.mis" "$INSTDIR\Backup\SingleMissions\English\H H"

and

!insertmacro BackupFile "$INSTDIR\Data\NavalAcademy\Convoy Attack\English\Convoy Attack" "Convoy Attack.mis" "$INSTDIR\Backup\NavalAcademy\Convoy Attack\English\Convoy Attack"

Can you help me?


What are the errors?


!insertmacro: BackupFile
IfFileExists: "$INSTDIR\Backup\SingleMissions\English\H H\*.*" ? +2 :
CreateDirectory expects 1 parameters, got 2.
Usage: CreateDirectory directory_name
Error in macro BackupFile on macroline 2
Error in script "d:\Usuarios\jenneram\Meus documentos\Gamevicio\Silent Hunter 3\Silent Hunter 3 2.00.nsi" on line 120 -- aborting creation process

and

!insertmacro: BackupFile
IfFileExists: "$INSTDIR\Backup\NavalAcademy\Convoy Attack\English\Convoy Attack\*.*" ? +2 :
CreateDirectory expects 1 parameters, got 3.
Usage: CreateDirectory directory_name
Error in macro BackupFile on macroline 2
Error in script "d:\Usuarios\jenneram\Meus documentos\Gamevicio\Silent Hunter 3\Silent Hunter 3 2.00.nsi" on line 120 -- aborting creation process

Using NSIS 2.10


Copy the macro from the Wiki again, I've fixed this. The CreateDirectory command missed quotes around the directory path.


Thanks :)


Thanks also :)

-Stu