I have a Visual Studio 2005 (C #) project that uses MySQL as a data storage mechanism, I would like to create an MSI package that installs the application, and after installing MySQL silently. I studied it, but I could not find much information.
I installed the MySQL package silently and after setting it up using these two statuses in CMD
Installation:
msiexec /qb /i "c:\mysql.msi" /l* d:\log_mysql_test.txt INSTALLDIR=d:\mysql_test_mdps
Setup:
D:\mysql_test_mdps\bin\MySQLInstanceConfig.exe -i -q "-lD:\mysql_config_log.txt" "-pD:\mysql_test_mdps\bin" "-tD:\mysql_test_mdps\my-template.ini" "-cD:\mysql_test_mdps\my.ini" -v5.5.9 ServerType=DEVELOPMENT DatabaseType=MIXED ConnectionUsage=DSS Port=53306 ServiceName=MySQL_AGM RootPassword=root1234 SkipNetworking=no AddBinToPath=yes
But now I do not know how to say that Visual Studio does this before or after installing my application. I was googleing this, but I could not find any helpful help.
Hope you can help me :)
EDIT: I am working on a solution with custom actions, I found this article that use a custom installer class to perform custom actions. This looks fine in the first place, but I get the problem because when my MSI package tries to run the second MSI installer (MySQL), I get an error message with code 2869, which says: "Access denied."
I also looked for this problem and look when the first MSI tries to start the second MSI, it does not apply the correct rights and the installation does not work ...
Do you know what I can do? or how can I run the second MSI installer? with full privileges (or at least the same as the first installer)
This is the code that I use to create the Process object.
string arg1 = "/qb /i \"" + filepath + "\" /l* \"" + Path.Combine(installpath, logfile) + "\" INSTALLDIR=\"" + installpath + "\""; Process p = new Process(); p.StartInfo.FileName = "msiexec.exe"; p.StartInfo.Arguments = arg1; p.Start();
c # mysql setup-deployment
SubniC
source share