MySQL ODBC connector automatic installation in windows

Source: Internet
Author: User

MySQL ODBC connector is automatically installed in windows. In some operating systems, uninstalling and installing MySQL ODBC connector multiple times will find that the driver is abnormal and cannot be used. You must manually reinstall and fix the problem. However, if your driver is installed in an application, how can this problem be solved? You can install it in two steps, one installation, and one repair. (It's a bit cool, but it's feasible ). For example, in InstallShield, call MySQL ODBC connector to automatically (silent) install the MySQL client Driver (use the msi installation package to copy it to the mysqlconnector folder in the target directory ): // install the mysql odbc connector if Is (FILE_EXISTS, WINSYSDIR ^ "msiexec.exe") = FALSE then MessageBox ("Can't find msi installer", WARNING ); else szCmd = "\" "+ WINSYSDIR ^" msiexec.exe \ "/I \" "+ TARGETDIR ^" mysqlconnector \ mysql-connector-odbc-3.51.27-win32.msi \ "/q"; LaunchAppAndWait (szCmd ,"", WAIT); // when the odbc driver is not completely installed (previously installed and uninstalled), The/I parameter may not ensure that the installation is completed successfully, use the/f parameter to fix szCmd = "\" "+ WINSYSDIR ^" msiexec.exe \ "/f \" "+ TARGETDIR ^" mysqlconnector \ mysql-connector-odbc-3.51.27-win32.msi \ "/q "; launchAppAndWait (szCmd, "", WAIT); endif;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.