Generally speaking you should use properties to set these values silently either using the command line interface for msiexec.exe or in a transform applied via the command line:
Command line:
msiexec /i "MySetup.msi" USER="OneUser" /PASS="PassWord" /qn
Transform:
msiexec /i "MySetup.msi" TRANSFORMS="MyTransform.mst" /qn
You can generate a transform via Orca, and it can override almost any value in the associated MSI file. Transforms are heavily used for application repackaging in large companies for silent deployment via systems such as Altiris, SCCM, and similar desktop management systems.
You simply define the properties in the property table, set some default value and allow them to be overridden by command line or transform and then use these values inside a custom action to set up the connection you require, or set the properties to the appropriate fields in the service installation tables.
ServiceInstall Element in Wix. And the MSI table ServiceInstall. It looks like this post may help you, I haven't studied it in detail though: WiX ServiceInstall - setting the service to run as the current windows user