Jack,

I mentioned that this could use some improvement. [Smile]

Anyway, I am getting -
quote:

ERROR : invalid method/function call: missing ')'!
Script: C:\!Kix\newpkg\install.KIX
Line : 31

code:
 CLS
BREAK ON
DIM $max
$tmp=ExpandEnvironmentVars('%tmp%\')
$srcdir=@CURDIR+'\'
$destdir=Substr('%WINDIR%',1,3)+'Scripts\'
$msg=JOIN(split(@KIX,'.'),'')
IF Exist($destdir)=0
MD $destdir
ENDIF
IF Len($destdir)=0
$destdir=@lanroot
ENDIF
IF @inwin=1
$max=2
REDIM $kixfl[$max+1]
$kixfl[0]='kix'+$msg+'.ok'
$kixfl[1]='kix32.exe'
$kixfl[2]='wkix32.exe'
ELSE
$max=5
REDIM $kixfl[$max+1]
$kixfl[0]='kix'+$msg+'.ok'
$kixfl[1]='kix32.exe'
$kixfl[2]='wkix32.exe'
$kixfl[3]='kx16.dll'
$kixfl[4]='kx32.dll'
$kixfl[5]='kx95.dll'
ENDIF
$firstinst='yes'
IF Exist($destdir+$kixfl[0])
$firstinst='no'
ELSE
DEL $destdir+'kix*.ok'
ENDIF
$dfl=$destdir+$kixfl[0]
IF SUBSTR($kixfl[0],4,3)=LEFT(JOIN(split(GETFILEVERSION('KIX32.EXE'),', '),''),3)
EXIT 0
ELSE
$rc=WriteProfileString($dfl,'KiX','KiX release',@PRODUCTTYPE+' -> kix '+@KIX)
$updinfo=''
$i=1
WHILE $i<=$max
$srcfl=$srcdir+$kixfl[$i]
$destfil=$destdir+$kixfl[$i]
IF Exist($destfil)
$rc=SetFileAttr($destfil,128)<>0
ENDIF
IF Exist($srcfl)
IF GetFileSize($srcfl) <> GetFileSize($destfil) OR
GetFileTime($srcfl) <> GetFileTime($destfil) OR
GetFileVersion($srcfl,'filedescription') <> GetFileVersion($destfil,'filedescription') OR
GetFileVersion($srcfl,'fileversion') <> GetFileVersion($destfil,'fileversion') OR
GetFileVersion($srcfl,'internalname') <> GetFileVersion($destfil,'internalname') OR
GetFileVersion($srcfl,'language') <> GetFileVersion($destfil,'language') OR
GetFileVersion($srcfl,'originalfilename') <> GetFileVersion($destfil,'originalfilename') OR
GetFileVersion($srcfl,'productname') <> GetFileVersion($destfil,'productname')
COPY $srcfl $destfil /h
IF @error=0
$upok='yes'
$state='install complete at '
$info=$state+@date+' '+@time+' '+$updinfo
ELSE
$upok='no'
$state='install incomplete at '
$info='update kix'+$message
ENDIF
$updinfo=$updinfo+' +'+$kixfl[$i]
ELSE
$updinfo=$updinfo+' ='+$kixfl[$i]
ENDIF
ENDIF
$i=$i+1
$rc=WriteProfileString($dfl,'KiX','KiX',$info)
LOOP
IF Exist($destdir+'kix'+$msg+'.ok')
EXIT 1
ELSE
EXIT 2
ENDIF
ENDIF

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's