Windows Service : installer

Number of Views : 3546

I have not coded a windows service for a long time. The last time I touched a service I used the “installutil” from the framework to install it. I decided to make an IISreporter Service that would push your IIS stats out to a twitter site.

In the process I figured it would work best as a service. Since I am planning on pushing this to www.iisreporter.com and have it available for download it needed an installer. I got everything the way I wanted it and realized that I needed to set some custom app.config settings. Between the app.config settings and the installer for a service I did a bit of searching.

To touch the app.config settings during install you need to create a dialog form during the install to capture the input. Once you have the input you need to save that to the app.config during the install process. This is done with an installer class on the main project which saves the values. The last step is to call the installer class with a custom action during the install process.

Here is a great post about this process (MSI Install app.config settings)

Leave a Reply

Your email address will not be published. Required fields are marked *