I write a windows service and a installer project using C# with Visual Studio 2010.
This service will get some data from database.
There're more than one database with different windows domain login account.
I want the installer pass the connection string as a parameters to each service instance, each instance has different service name.
I look into MSDN and see OnStart(string[] args)
. It needs to write register keys to make a service run with parameters automatically. Is there any other easy ways to do that?
Beside, I set username and password value to null in my installer project. A dialog will be promoted during the installation. But it's only once. I want to set different credentials for each service instance. So it needs to be promotes many times.
Thank you.