Your description reads vague.
CJMK said:
when compiled into .exe by innosetup
1. You build an EXE with VFP
2. You create a setup with innosetup.
I'm not sure what operations you do with the table and therefore its index. If you embed a table into an EXE ,it's automatically a read-only table, whenever you'd change the table contents neither the DBF embedded in the EXE nor the accompanying FPT or CDX files can update, because an EXE is executable, but readonly.
If you want to use data keep it excluded from the exe and have data files in the setup with an installation target folder that must be writable to the end user and not only for the setup during installation.
Also be sure what files you need to install. Installing tables with indexes is no problem. You can save setup size if you just let indexes be created during or after the setup, but then you might have made a beginner mistake to only provide DBF files in the setup, indexes are in sperate files, some field types like memo or also. A table can consist of a bunch of files, most often dbf,fpt,and cdx, but you can have more idxes, secondary cdxes. As developer you should keep all these in a data directory and add that to a setup to be installed into a single users or all users appdata, as one example, or a share for a networked multi user database.
Not sure, since installing only the DBF of a table with a CDX would trigger missing cdx file or a similar message and not index doesn't match table). You seem to do something the finally has the wrong file combination of dbf and cdx.
Chriss