how to automate Java Installer

11 posts in this topic


I have Java 8 installer 

I want to automate it's installation process. 

I have found silent installation method but I want to install it using controls clicking like as normal user do 

But I don't find any control using  AutoIt v3 Window Info 

How I can find it's control buttons ?

Thank you :blink:

Share this post

Link to post
Share on other sites

#2 ·  Posted (edited)

Maybe with

from @junkew

Edited by AutoBert
1 person likes this

Share this post

Link to post
Share on other sites

Look for unatentded instalation switches

1 person likes this

>>>> Directory Enquiries Challenge <<<<
NEW:     ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:


Last update: 2016-08-11
Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components * TeamViewer API -UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) *

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, The Art of Computer Programming
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."


Share this post

Link to post
Share on other sites

Search for jabsimplespy or java accessibility bridge

Share this post

Link to post
Share on other sites

@junkew  i have followed instructions i have JDk Installed 

also run 

jabswitch.exe" /enable

i am not getting other steps 
and when i executed simply spy and pressed ctrl + w it stop working 
i think i have to do something else before it working ?


Share this post

Link to post
Share on other sites

Which windows version and which jdk.

Search for javaferret or java screenreader. 

Share this post

Link to post
Share on other sites

windows 10 and jdk 1.8
okay i will search for java screenreader ty :D 

Share this post

Link to post
Share on other sites

you can run the java installer from the windows command line,

jre-8u101-windows-i586.exe /s


Share this post

Link to post
Share on other sites

Thank you dear
although i have found this solution 
like this 
first i have to record it's state 

jdk-8u101-nb-8_1-windows-x64.exe --record state.xml

then i can use like this 

jdk-8u101-nb-8_1-windows-x64.exe --silent --state state.xml


<?xml version="1.0" encoding="UTF-8"?><!--

  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.

  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  Other names may be trademarks of their respective owners.

  The contents of this file are subject to the terms of either the GNU General Public
  License Version 2 only ("GPL") or the Common Development and Distribution
  License("CDDL") (collectively, the "License"). You may not use this file except in
  compliance with the License. You can obtain a copy of the License at or nbbuild/licenses/CDDL-GPL-2-CP. See the
  License for the specific language governing permissions and limitations under the
  License.  When distributing the software, include this License Header Notice in
  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
  designates this particular file as subject to the "Classpath" exception as provided
  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
  If applicable, add the following below the License Header, with the fields enclosed
  by brackets [] replaced by your own identifying information:
  "Portions Copyrighted [year] [name of copyright owner]"
  The Original Software is NetBeans. The Initial Developer of the Original Software
  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
  Rights Reserved.
  If you wish your version of this file to be governed by only the CDDL or only the
  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
  this software in this distribution under the [CDDL or GPL Version 2] license." If
  you do not indicate a single choice of license, a recipient has the option to
  distribute your version of this file under either the CDDL, the GPL Version 2 or
  to extend the choice of license to its licensees as provided above. However, if you
  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
  option applies only if the new code is made subject to such option by the copyright
--><state xmlns:xsi="" xsi:noNamespaceSchemaLocation="state-file.xsd">
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" status="to-be-installed" uid="nb-base" version="">
                <property name="">C:\Program Files\NetBeans 8.1</property>
                <property name="minimum.jdk.version">1.7.0</property>
                <property name="jdk.location">C:\Program Files\Java\jdk1.8.0_101</property>
                <property name="installation.timestamp">1476539814627</property>
                <property name="">all.users</property>
                <property name="installation.location.macosx">$N{install}/NetBeans/NetBeans</property>
                <property name="installation.location">$N{install}/netbeans-8.1</property>
                <property name="desktop.shortcut.location">all.users</property>
                <property name="netbeans.summary.message.text"/>
        <product platform="windows-x64" status="to-be-installed" uid="jdk" version="">
                <property name="">true</property>
                <property name="">true</property>
                <property name="installation.location">$N{install}/jdk1.8.0_101</property>
                <property name="">true</property>
                <property name="">C:\Program Files\Java\jdk1.8.0_101</property>
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" status="to-be-installed" uid="nb-extide" version="">
                <property name="show-in-wizard">false</property>
                <property name="installation.location">C:\Program Files\NetBeans 8.1</property>
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" status="to-be-installed" uid="nb-javase" version="">
                <property name="jre.allowed">false</property>
                <property name="installation.location">C:\Program Files\NetBeans 8.1</property>

But as you know the packege that i have downloaded has JDK/JRE netbeans so it can take too much time for installation.
And a user who don't know much about these things he would be thinking what is going on :P 
so that is way i was thinking to make installer like a normal user install like autoit help contain a example winzip installation :D 
but thank you for reply :D :)

Share this post

Link to post
Share on other sites

I extract the .MSI from the .EXE and then run it with standard MSIEXEC silent flags.  

You can use a transform file to make changes to your install, or parameters, or what I do is just modify the MSI with InstaEdit

1 person likes this

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • ralph_ng
      How to append data (random) in Excel?
      By ralph_ng
      Hi everybody, I'm newbie to learn AutoIt, need some help... The process/ work that I'd like to automate is just for testing purpose for my job.
      Searching high and low, I found no script example for writing any random data into excel file. 
    • rm4453
      Moving Combo To Next Option Automatically In AutoIt Gui
      By rm4453
      I need to find a way to after x amount of seconds set the Autoit gui's ComboBox to next option available, and if it reaches the end of the list start back at beginning. This way I can cycle through checking if users are connected to a network. The combo is populated via a recursive file search that contains folders with each connected user's username. The ComboBox will contain something like " username\config " for every connected user. So I need to make so it cycles through constantly every X seconds I have the gui functioning, and all that I just can't get this one part to work.

      TL:DR - How do I make so an AutoIt GUI ComboBox will cycle through all of its options every X seconds, and when it reaches bottom of options cycle back to top and continue the process again.

      Thanks! I can't post any code due to NDA sorry...
    • 232showtime
      C# Installer
      By 232showtime
      Hi All,
      just wondering if there is a free installer for C# , like autoit has.
    • DCAlliances
      PDF Save Dialog Box Stop working
      By DCAlliances
      Hi there
      We have a legacy app that utilising this AutoIt/Selenium for automating the web app that have. It's been running well since 2010 late 2014. We stoped a bit on this. Then start again this year.
      We have an issue on one of the step which is relating on PDF Save Dialog Box Stop working - basically it won't click to Save button for some reason. We pin point this and we believe it stop at lib.AU3_Send("!S",0); ... line 7 below.
      Any ideas?
      public void SaveDialogueBox(String filePath, String firstName, String lastName) { lib.AU3_WinWaitActive("File Download", "", 10); lib.AU3_WinActivate("File Download", ""); // Debug: VV - swap // lib.AU3_ControlClick("File Download", "", "[CLASS:Button; INSTANCE:2]","",1, 1, 1); lib.AU3_Send("!S", 0); lib.AU3_WinWaitActive("Save As", "", 10); lib.AU3_Sleep(500); lib.AU3_Send(filePath + firstName + " " + lastName, 1); lib.AU3_Sleep(2000); if (reader.getWindowVersion().equals("Windows Vista or Windows 7")) { //lib.AU3_ControlClick("Save As", "", "[CLASS:Button; INSTANCE:1]","",1, 1, 1); lib.AU3_Send("!S", 0); } else { lib.AU3_ControlClick("Save As", "", "[CLASS:Button; INSTANCE:2]","",1, 1, 1); } lib.AU3_WinWaitActive("Download complete", "", 10); lib.AU3_Sleep(2000); lib.AU3_ControlClick("Download complete", "", "[CLASS:Button; INSTANCE:4]","",1, 1, 1); lib.AU3_WinActivate("[REGEXPTITLE:.*EUC .*]", ""); }  
    • Duck
      Detecting the Newest version of Java currently installed
      By Duck
      I am having some issue coming up with the logic to detect the latest version of Java installed on a PC via the JRE in C:\Program Files\Java\*
      I need to detect the latest version of Java (JRE) to dynamically create a batch file that points to the correct Java version. 
      I have already put all the subfolders name's in an array but now i need to find the latest version for my $version variable