Archive: Goto help


Goto help
hello,

im a newbie, trying to make an installer that checks $APPDATA folder for a certain version of a program that is already installed on system. if it finds this version, say 4.01 it will install into that folder.. if not it will search for an earlier version and install there.. i know to use ifFileExists to test if directory is there but i dont understand how to use the Goto function...
if i write

IfFileExists "$APPDATA\prog 4.01\*.*" 0 noprog

CopyFiles "$EXEDIR\*.dat" $APPDATA\prog 4.01\

noprog:
CopyFiles "$EXEDIR\*.dat" $APPDATA\prog 4.0\

will this check for version 4.01, if it exists, install to that directory, if not, then copy the files to \prog4.0..

i cant find anywhere that explains in detail the use and syntax of ifFileExists and Goto.. any help would be greatly appreciated

mike


A label doesn't mean "stop execution here". It means "I might want to jump here sometime, remember this spot". Therefore, if you put a command, a label and then another command, it will execute both commands if you don't jump to that label.


thanks for your response kichik, does this mean i should put a goto command here to jump to the end if the newer version of the prog exists?

would it be some thing like this:

IfFileExists "$APPDATA\prog 4.01\*.*" 0 noprog

CopyFiles "$EXEDIR\*.dat" $APPDATA\prog 4.01\
Goto end:

noprog:
CopyFiles "$EXEDIR\*.dat" $APPDATA\prog 4.0\
end:


also does anyone know of a good source to learn this scriping language, the manual that comes with the program is not too detailed..

thanks
mike


Exactly.


thanks...