I am writing a wix installer and I have used it to create a sql database.
We have a custom command line tool that we need to run to populate the database with its schema and data, the tool requires sql scripts to be included, we have quite a few and they are organised into various directories.
Is it possible to include these files in the installer and then run the command line tool against these files without having to copy these files to the install target dir.
I’m thinking perhaps I will have to copy these files to temp and then after install is finished clean them up, is there a better way?
You can create an msi custom action and embed sql scripts as resources within the dll itself.
Then schedule your custom action to run the exe on those sql scripts.
The msi engine will automatically extract and cleanup your custom action binaries.