0

I'm working on a C# Winforms client application that interacts with a MySQL database, and I'm looking for guidance on how to create an installer for it using Visual Studio. The application and the database should be install in the client´s PC. Every installation of the client requires MySQL to be installed also.

1

1 Answer 1

0

Kindly refer to https://dev.mysql.com/downloads/installer/

You will either need to include the installer into your installer (recommended) or have it being downloaded when it is being installed (not recommended, because it requires internet access as well as availability of the exact version you support online).

Either way, your user will end up having the installable. As long as you have the MSI file, you can trigger it via

System.Diagnostics.Process.Start("mysql-installer-web-community-8.0.36.0.msi") 

Requires UseShellExecute = true
(of course, you can adjust the version and the name)

see https://www.codeproject.com/Questions/648763/run-MSI-Installer-from-Csharp-coding

If you want the calling thread to wait until installation is complete, pay attention that this call returns the instance of System.Diagnostic.Process. You can use the method System.Diagnostic.Process.WaitForExit. It's better to do it in a separate thread.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.