Install SQL database with all the objects though another program

Im creating an installation package using the Setup And Deployment that comes with visual studio.
But i need to create a database if it is not there and install it. Ive got all the scripts to do this in a .sql file that i created using SQL server express.

My question is how can i execute this after installation of my application?
I though of creating another exe file and execute it automatically after the installation. This exe program would, then, execute the sql script.

but im not sure about that. Any ideas on this?
Who is Participating?
DhaestConnect With a Mentor Commented:
Walkthrough: Using a Custom Action to Create a Database at Installation
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.