Am I doing this correctly???
Alright, I've been experimenting with the IfFileExists instruction, and I'm hoping this is right:
;called when the install was successful
Function .onInstSuccess
CreateDirectory "$INSTDIR\baldurdashbackup"
IfFileExists "$INSTDIR\baldurdash\abazigal\abazigal.tp2" 0 abaz
ExecWait "$INSTDIR\baldurdash.exe --yes baldurdash/abazigal/abazigal.tp2"
abaz:
IfFileExists "$INSTDIR\baldurdash\balthazar\balthazar.tp2" 0 balth
ExecWait "$INSTDIR\baldurdash.exe baldurdash/balthazar/balthazar.tp2"
balth:
IfFileExists "$INSTDIR\baldurdash\bhaalspawn\bhaalspawn.tp2" 0 bhaal
ExecWait "$INSTDIR\baldurdash.exe baldurdash/bhaalspawn/bhaalspawn.tp2"
bhaal:
IfFileExists "$INSTDIR\baldurdash\romance\romance.tp2" 0 romance
ExecWait "$INSTDIR\baldurdash.exe baldurdash/romance/romance.tp2"
romance:
MessageBox MB_OK "Installation complete."
FunctionEnd
Am I using those labels correctly? So, the 0 tells it to proceed to the next instruction if the file exsits, and the internal label tells it to goto that label if it doesn't exist correct?
I looked at some examples, and some people were using it like this:
IfFileExists "$INSTDIR\blah.tmp" 0 3
What exactly does that 0 3 mean? I tried compiling my script with just numbers as labels, and it spat out some stuff about not being able to use 0-9 or - as labels. However, if I put 0 and an internal label it has no problems.
Oh yeah, it's also not executing that exe correctly for some reason. It runs it, however, the exe doesn't compile the script correctly like it's supposed to. I've tested the exe outside of the installer with the exact same command line instruction, in the exact same directory and it works fine.
Thanks for any help in advance ;)