Is they any wix command I can use to create database and to also add a user to the database? If yes, is there any example on how to do this?
I would recommend you try the following:
Create your sql database using techniques mentioned here: Wix: create a sql server database at a specified location
Create a user via SQL: http://msdn.microsoft.com/en-us/library/ms173463.aspx
Check out the SQL extension here.
You'll need to add a reference to it in your installer project, an example of this can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With