Usually ANT scripts are used for automated build processes. Also, an ANT script requires specific circumstances to be able to run correctly. Can you please give me more details about why you need this?
I'm afraid that this is not supported by Windows Installer or by Advanced Installer. Perhaps it could be done through a custom action, but I'm not sure how this custom action would look like.