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 9277303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:04:32+00:00 2026-06-18T17:04:32+00:00

I am trying to install Java using the silent mode and also specify an

  • 0

I am trying to install Java using the silent mode and also specify an installation directory that contains spaces. When I do this it pops up the “Windows Installer” dialog box indicating one of the parameters is incorrect. If I use the short path name it works correctly, but I really would prefer not to use the short directory name because that is the value that gets stored in the Registry.

The command I want to use…

jre-6u39-windows-i586.exe /s INSTALLDIR="C:\Program Files (x86)\Java"

This pops up the Windows Installer dialog box.

When I use…

jre-6u39-windows-i586.exe /s INSTALLDIR=C:\Progra~2\Java

This works.

NOTE: “Program Files (x86)” is just an example. This is installed at client sites and they choose the install directory, therefore we have to be able to support any directory they may specify.

Any idea how I can do a silent install but still use the long path name?

UPDATE:

I thought I would share the final solution. One cool thing I found that I wanted to share is that you can suppress the auto-reboot of install and it returns an exit code of 3010. Therefore you can defer the reboot to another time. Here is the code (rewritten a bit to eliminate a bunch of our own abstraction)

public bool InstallJava(string installPath, string logFile)
{
    bool rebootRequired = false;

    string fullLogFileName = Path.Combine(logFile, "JavaInstall.log");
    string arguments = string.Format("/s /v\"/qn REBOOT=Suppress INSTALLDIR=\\\"{0}\\\" STATIC=1 /L \\\"{1}\\\"\"", installPath, fullLogFileName);

    ProcessStartInfo startInfo = new ProcessStartInfo { RedirectStandardError = true, RedirectStandardOutput = true, RedirectStandardInput = true, UseShellExecute = false, CreateNoWindow = true, 
    FileName = "jre-7u25-windows-x64.exe",  Arguments = arguments };

    var process = Process.Start(startInfo);
    process.WaitForExit();

    if (process.ExitCode == 3010)
        rebootRequired = true;

    else if (process.ExitCode != 0)
    {
        // This just looks through the list of error codes and returns the appropriate message
        string expandedMessage = ExpandExitCode(StringResources.JAVA_INSTALL_ERROR, process.ExitCode, fullLogFileName);
        throw new Exception(expandedMessage);
    }

    return rebootRequired;
}
  • 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-18T17:04:33+00:00Added an answer on June 18, 2026 at 5:04 pm

    i recall encountering this issue before….

    You need to use quotes when passing paths to the installer if the
    paths have spaces. Because the path arg is already in quotes, you
    need to escape each quote with a ” so it gets passed through. So
    the command would be

           j2re.exe /s /v"/qn INSTALLDIR=\"C:\Program Files\JRE\""
    

    reference :

    http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/silent.html

    https://bugs.java.com/bugdatabase/view_bug?bug_id=4966488

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

Sidebar

Related Questions

Trying to install Scrapy on Mac OSX 10.6 using this guide : When running
i'm trying to install hadoop on a CentOS server. I'm using that tutorial .
I am trying to install a simple java application as a windows service using
I'm trying to install Jboss 7.1.0-Final as a service using the Java service wrapper
Using Grails 2.0.4, I'm trying to install rest-client-builder:1.0.2 using this... grails install-plugin rest-client-builder ...but
I'm trying to install openCSV for java and downloaded the files from sourceForge. Unfortunately
Trying to install pear package and keep getting this strange error. Can you shed
I Am Trying to create a program using c# that needs to connect to
We are trying to install a Java program to run as a windows service.
I'm trying to install EclipseFP, using the usual Eclipse Install new software approach. However,

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.