1

I need to create an install for my app that executes the following actions:

  1. Copies files
  2. Writes registry settings
  3. Registers a windows service
  4. Writes an XML app.config file (based on user supplied info during install--a connection string)
  5. Executes SQL scripts against a remote database (connection info obtained in #4)
  6. Installs and registers a COM dll
  7. Adds entry to Control Panel>Add/Remove programs for uninstall

I don't need any fancy logic to allow the user to customize these steps--I can hard-code them with user-supplied info injected where appropriate.

I looked at Wix but found the documentation and examples don't line up well with recent releases.

I also looked at NSIS but found support for writing XML to be too limited (the plugin for this can only handle strings up to 64 bytes).

I initially brushed off the VS2005 built in Setup project as incapable of handling these tasks but I'm ready to reconsider after stumbling with what I thought were better options.

Any suggestions?

Michael Haren
  • 105,752
  • 40
  • 168
  • 205

4 Answers4

2

I would still recommend looking into WiX a bit more. We use it to do everything but #6 on that list and while there is a small learning curve. We've been using WiX v3 for almost 3 years, and I haven't found too many places where the docs/tutorial is that far out of place. And usually where it is its because they cleaned up the syntax and made it better.

Also, as of the next release of Visual Studio (2010/Rosario) WiX is being build directly into Visual Studio, I'm not sure if in parallel with the current Setup Projects or replacing them completely.

Rob McCready
  • 1,909
  • 1
  • 19
  • 20
1

A Visual Studio Installer project can do whatever custom code you want; wouldn't see why any of your requirements would be a problem.

Brandon
  • 13,956
  • 16
  • 72
  • 114
0

You can use just Visual Studio and Windows without commercial tools to achieve what you need.

First, check out the answer to create a single installer file.

Then, you can research how to create a Custom Action class that can perform registry, read/write files and register COM dll's separately.

0

I have used Visual Studio (2005) and Wise and can recommend both. You didn't mention if the tool had to be free, and if so that rules out Wise. Nevertheless Wise has a dead easy learning curve and is very powerful and well documented. I have had a few weird things happen to me with Visual Studio. One time I had to delete my project and start over (possibly due to stupidity on my part - never figured it out), but overall I have been using it for a couple years at my current job and it works for me.

Andrew Cowenhoven
  • 2,778
  • 22
  • 27