coolcurrent4u Posted April 30, 2011 Posted April 30, 2011 Hello, i need to package and deploy sql server express r2 with visual studio installer 2010, and execute a database create script at the end of the installation. I am deploying a client and server version of my application, i will present a dialog "choose which app to install, client or server".if the use choose server, then install sql server, if client then skip sql server installation. the first issue is, i have been able to create a bootstrap for sql server r2 and create the installer dll that will execute the database create file, but i get an error shown in the image. the second issue is that how do i let the user choose weather to install sql server or not in the deployment process. thanks Quote
PrOpHeT Posted October 14, 2011 Posted October 14, 2011 I do this by way of an ConfigurationFile.ini, and use a script to run the install, make sure the server is started, then execute the script via SQLCMD. Essentially you can run through a setup and create all of the configuration parameters in a single ini file creating a user interaction-less install. http://msdn.microsoft.com/en-us/library/dd239405.aspx Then launch setup from a script like "SETUP /CONFIGURATIONFILE=ConfigurationFile.ini /IAcceptSQLServerLicenseTerms" Then pass the script via the command line as detailed here http://msdn.microsoft.com/en-us/library/ms162773.aspx like SQLCMD -e -i .\MyScript.sql Package the whole thing as a separate installer, and include the Installer package in the main installer. There are likely better methods, but this one has worked for me for quite a while and never had an issue. Quote Life is a comedy to those who think; a tragedy to those who feel.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.