Can ClickOnce or InstallShield setup or configure SQL Server or SQL Server Express specifically adding an sa
password, enabling named pipes, granting permission to read from folders, adding primary database (.mdf
files) needed for my client application.
Or do I need to hard-code those functions from my client app?
Can ClickOnce do it?
Yes, but...... ClickOnce can install dependencies like this, but due to the nature of the SQL Server install I personally would avoid doing it that way. It's not a task for those in a hurry or who don't like dealing with weird problems when things go wrong. To show how non-trivial this can be you can check the posts How to deploy SQL Server 2008 Express as a prerequisite with ClickOnce and ClickOnce Prerequisites: where is SQL Server Express 2014 LocalDB?.
Can InstallShield do it?
Yes, but there can and probably will be curveballs. You could do it as:
Personally wouldn't approach it either of these ways - instead I would write a custom action that invokes the SQL installer and passes in the parameters gathered (i.e. install location for SQL, passwords for initial logins, etc.). The SQL install is also not strictly transactional - it can fail during the install and some changes will not be reversed.
Should you manage to put this together as an installer bootstrapper, be aware of issues like Can't install SQL Server by using InstallShield or bootstrapping application.
I would also advise you to offer the user the option of installing SQL Server as they may already have an instance available - try not to install it always.
What about database creation and configuration?
This can be done in a variety of ways, but doing it all within the MSI installer is starting to get horribly complex - it can be far simpler and quicker to write a simple configuration utility for the end user, or to build the functionality into your application.
How you go about creating the database and configuring the SQL instance is heavily dependent on your requirements, which you haven't specified in your question.