Change dynamically during installation files binaries .txt, .sql

87 views Asked by At

I have an WiX bootsrapper with WPF installer and according to the user selections from the Bootsrapper UI, I want to update a sql script which is included in the msi. I know how to read files in a Binnary element, but how I can edit one of them, to use it in a SqlScript? I Know also about the possibility of using SqlString. What would be the most appropriate solution?

1

There are 1 answers

0
LeoN On

You have to do it through a custom action. First let the msi copy the sql script. After that you have to execute a custom action to edit the copied file. Once it is edited, you can execute the sql script.

There is no way you can edit files inside a msi. Only thing you can do is pass parameters to the msi as you want and use the necessary values in the places where they should be edited.