views:

45

answers:

2

hi all,

I have developed a small desktop application in c#(using windows forms). For this project I need mysql, MySql.Data.dll and some property files...
I am ready with my project but I need to burn it on a disk(with Autorun express). when I run that cd

  1. It should ask me to check whether the system has mysql installed in it or not,if not installed already then it should install now in the specified location
  2. run some database scripts to generate database and relationships and constraints
  3. and finally it should copy my .exe file on to the hard disk (specified location).

Thanks, srini.

+2  A: 

It sounds like you're trying to use autorun to kick off an installer. Take a look at the built-in Installer project in Visual Studio, or take a look at WiX.

  1. "Check whether the system has mysql"
    • To validate whether the machine you has MySql, you'll need to define what you're looking for. As for most products, you can find them in the registry. I'm not sure where MySql puts that info.
  2. "Run some database scripts"
    • You can kick off a custom action that will properly install the database.
  3. "Copy my .exe file"
    • Specify where you want the installer to put your executable and other binaries (MySql.Data.dll).
thomasnguyencom
+1  A: 

NSIS is another good choice for an installer. I used that one pretty extensively, and am using WiX on my current project mostly just to try a different approach. The one included with Vistual Studio 2005 is very buggy, but I have not tried the included ones for Visual Studio 2008 and later.

NSIS and WiX follow very different approaches for creating the installer file. You may find one or the other easier for you to understand. Both seem to have pretty active communities that will help if you get stuck (or ask here of course).

Eric J.