views:

164

answers:

2

Hi,

I am working on a .NET 3.5 project which consists of a web application and a Windows service. Both need to be deployed on the server machine.

I have created an msi package using Wix 3 which installs the application files, creates shortcuts and registers the service.

My next task is to implement the following:

  • Post-install step that allows configuration of the Windows service through a wizard-style GUI
  • Pre-install step that allows installation settings to be loaded from a file
  • Pre-uninstall step that allow configuration to be backed up to a file

I see two options before me:

  • Tweak msi to do what I want through custom actions
  • Create a wrapper for the msi (Setup.exe) that will handle all the custom tasks and run the msi package silently in the background using msiexec

Ideally. I would like to go with option 2. What are your thoughts?

Any recommendations would be greatly appreciated.

Thanks,

Arnie

+1  A: 

A wrapper around the msi will not be able to handle task #3 if they remove via Add/Remove programs, or msiexec using the product ID. I would go with a custom action, or a side utility that could be spawned by the msi.

It depends on the amount of configuration the service needs. For some of our small config files that just need the server name updated in the connection string we use a util:XmlFile element to update the file during install.

We also have a configuration utility that is more involved that we conditionally launch at the end of install using

For loading settings from a file, you could either do this with a custom action, then using those settings update config files on install with XmlFile or custom actions. Or make "load settings from file" an option of the wizard gui and launch that post install.

Rob McCready
Thanks for your feedback. I have taken it into consideration.
Arnold Zokas
A: 

I the end I've decided to create an MSI with a post-install configuration utility.

Not quite as elegant as I would like, but will ensure that install and uninstall clean-up is done correctly and in a transactional manner.

Arnold Zokas