Reputation: 3890
I created a C# application to manage data synchronization between an ERP and a CRM. This application reads a table every 500ms, and sends data via WebService to CRM. For the moment, I have two screens for my application : a first to configure connections (ERP's DB connection informations and CRM's URL and WS Token), a second with a start button to launch the loop thread.
I know want my application to be nothing more than a windows service installer. What I want to do is to launch my application, configure ERP and CRM connections, and then click on a 'Install' button. When this button is clicked, a service is created and makes the same work that my application makes now when i click the 'start' button.
I already read those links Converting my application in a Windows Service, Making an existing exe with gui into windows service and of course http://msdn.microsoft.com/en-us/library/d56de412%28v=vs.100%29.aspx.
Here is my question :
How to make a configurable windows service ? I think the simplest way is to store configuration into files that utility and service would share. Where to store those files ? The utility must be able to find these files afterwards : registry ?
Thanks,
Upvotes: 2
Views: 3297
Reputation:
It's a common practice in .NET to store application's or service's settings in this relative path Environment.SpecialFolder.ApplicationData
Upvotes: 2