tried this and it says Else without IF After the Endif statement

If Exist("c:\MMClientSP2.exe")
Endif
Else
If Instr(@PRODUCTTYPE,"Windows XP Professional")
If instr(@CSD, "Service Pack 2")
COPY "\\tahoe\packages\mmclientsp2.exe" "c:\"
IF EXIST("c:\Program Files\Avaya Modular Messaging\Client\vr.exe")
SHELL '%comspec% /c "CPAU -u sssnt\Install -p Install1 -profile -ex "msiexec /i \\tahoe\packages\mmclientsp2.msi MASIP=192.168.5.40 /qn"'
Endif