1

I have a VB Windows forms application that uses a mysql database to keep track of everything within the application.. The problem that I know will occur is that most of the applications users will not have MYSQL let alone know how to install it properly... To install the application on the users systems I am using the Visual Studio Setup Installer to handle creation of the msi files.. What needs to happen first is the installer needs to check to see if MYSQL is installed on the host system and verify server name.. If true then import database, if not then install followed by import database... The importing is not the issue here... How do I make the installer install mysql with controlled parameters such as server name, etc, etc. Any ideas on this??? I have hammered google for the past 3 hours looking for bread crumbs on this but to no avail...

Skindeep2366
  • 1,549
  • 3
  • 41
  • 68

2 Answers2

2

Usually existing packages (like the MySQL installer) are added as prerequisites. Visual Studio setup projects do not support custom prerequisite creation. However, this can be done by manually generating the required manifests.

You can find the manifests structure here: http://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx

These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.

After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\

You can then select the prerequisite in your setup project properties page.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
1

Well... that's a good question. The first thing that pops up in my mind:

You could build the check in your application instead of the installer and warn the user about it. If needed, you could provide another installer to make sure everything is available (MySQL and the database itself).

I hope it helps you further. Yours sincerely, Roland

Roland
  • 11
  • 1
  • 3
  • Doing the check inside the application and warning the user about not having mysql installed is not a viable option since literally everything about the application hinges on MYSQL being installed from configurations settings of the application itself to On Load events.. – Skindeep2366 Apr 10 '12 at 20:25
  • Hmmm... Others suggest using Microsoft SQL instead: http://stackoverflow.com/questions/1706205/c-sharp-and-mysql-integration – Roland Apr 10 '12 at 20:38
  • I actually have already figured out how to check the registry for MYSQL. Then if it is not found install using Launch Conditions.. I am having a problem with the msiexec command but its only in my syntax.. – Skindeep2366 Apr 10 '12 at 21:30