Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7828145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:13:28+00:00 2026-06-02T10:13:28+00:00

We are using Install4J for our current version of our software and install MySQL

  • 0

We are using Install4J for our current version of our software and install MySQL 5.1 silently during the installation.

For the next version of our software, if it is an upgrade, I want to remove MySQL 5.1 and install 5.5. Ideally, the uninstall should go silently, but not a hard requirement. I managed to get it working on 32-bit Windows XP, but not on 64-bit Windows 7. This is what I have so far:

String[] uninstallKeys = WinRegistry.getSubKeyNames(RegistryRoot.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall");
for( String uninstallKey : uninstallKeys )
{
  Object displayVersion = WinRegistry.getValue(RegistryRoot.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + uninstallKey, "DisplayVersion" );
  Object displayName = WinRegistry.getValue(RegistryRoot.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + uninstallKey, "DisplayName" );
  if( displayVersion != null && displayVersion.toString().equals(installedMysqlVersion)
                  && displayName != null && displayName.toString().startsWith("MySQL Server") )
  {
    Util.logInfo( null, "Found match, uninstall key: " + uninstallKey );
    context.setVariable( "mysqlUninstallKey", uninstallKey );
    break;
 }
}

This will put the product code of MySQL Server 5.1 in the mysqlUninstallKey variable. After this step, I have an ‘Run executable or batch file’ step with the following settings:

  • Executable: msiexec.exe
  • Working Directory: ${installer:sys.system32Dir}
  • Arguments: /I{installer:mysqlUninstallKey}

This will (on 32-bit Windows XP) run the installer of MySQL server and then the user has to select ‘remove’ manually.

On 64-bit Windows 7, it just shows a dialog showing all the command line flags and their explanation, so msiexec.exe is being started, but the argument I pass into it is not recognized.

Any idea what might be wrong ? Or maybe I am doing this totally wrong and there is a better way?

I use Install4j 4.2.8.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:13:29+00:00Added an answer on June 2, 2026 at 10:13 am

    Thanks to the comment of @marcus-adams, I figured it out. You need to use ‘/qn’, ‘/x’ and ‘{installer:mysqlUninstallKey}’ as separate arguments in the ‘Run executable or batch file’ action of install4j. If you use 1 argument with spaces, it does not work. With this it works on 32-bit and 64-bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using VS2008 native Installer to set up our product. During both installation
I am installing to Maven repository our internal files using mvn install:install command. All
I'm building an installer using InstallScript MSI project. During installation I save some information
We have been using SimplePie on our Magento install to pull our blog posts
On our current WPF project, we've been performing dependency injection using the Ninject IOC
We are currently using SQLite3 as our database and want to switch it to
I'm stuck trying to help a user install our software. Our software setup is
During capistrano deployment of a Rails3 app, I want my server to install gems,
We need to create an installer for our application. Currently we are using Install
Using the Inno installer, we distribute the VC++ redistributable with our app so we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.