Jump to content
Sign in to follow this  
Sebastian82

Script for Java installation

Recommended Posts

Hi, I tried to install Java full automatically but my Script didnt work correct. It starts the installation but it didnt simulate the click. Do you know where the mistake is?

; <AUT2EXE VERSION: 3.1.0.4>

BlockInput(1)

RunAsSet("Administrator", @Computername, "password") ; Use local administrator rights in order to install the software

Run("\\server\freigebe\Setup\Sun\j2sdk-1_4_2_04-windows-i586-p.exe") ; start installation

WinWaitActive("Java 2 SDK, SE v1.4.2_04 - License", "&Weiter")

Send("!n")

sleep(1000)

Send("!a")

sleep(1000)

Send("!n")

sleep(1000)

Send("!n")

sleep(1000)

Send("!i")

sleep(1000)

WinWaitActive("Java 2 SDK, SE v1.4.2_04-License", "&Finish")

Send("!f")

RunAsSet()

MsgBox(0, "", "Java erfolgreich installiert")

BlockInput(0)

Exit

Share this post


Link to post
Share on other sites

Hi,

Did u try to install with the /s parameter ? Should work as an silent installation :lmao:

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

Which "click" is not working? the first send()?

If you are running under Win9x there may be limitations with BlockInput(). Look in the help file for that.

Some annotations:

Why don't you take Java 1.5.0?

The RunAsSet() at the end isn't required since you don't execute anything after it.

I didn't test, but can you click "ok" on your MessageBox, if BlockInput wasn't disabled before?

But in general i agree with Andre. If possible you should avoid the menu and install silently.

Greetings,

ZeD

Share this post


Link to post
Share on other sites

Hi, the /s flag is an interessant option. I will try it in one of my working Scripts. Thanks for the hind. How would you install java with auto-it? My problem is that i do not know how a professional install code has to look like for java.

Edited by Sebastian82

Share this post


Link to post
Share on other sites

RunAsSet("Administrator", @Computername, "password") ; Use local administrator rights in order to install the software

Run("\\server\freigebe\Setup\Sun\j2sdk-1_4_2_04-windows-i586-p.exe /s") ; start installation

u mean this ? :lmao:


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

Sorry, what u mean now ?

U can install the java JRE, what more u want to do ?

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

Hi, sorry but my english is not so well. Once again lets start from the beginning: I tried to install java. The Script starts the java installation. The first action is a click in the install menu to continue, but the click wont execute. I think the mistake is the code line

WinWaitActive("Java 2 SDK, SE v1.4.2_04 - License", "&Weiter")

The script should wait until the temp files were loaded on the client machine. Then it should do a click on the Next active window. There is a Next button on it, but it wouldnt execute the click. I dont know why. Is there a mistake in the code?

Edited by Sebastian82

Share this post


Link to post
Share on other sites

As Andre said before, these two lines should be enough:

RunAsSet("Administrator", @Computername, "password") ; Use local administrator rights in order to install the software

Run("\\server\freigebe\Setup\Sun\j2sdk-1_4_2_04-windows-i586-p.exe /s") ; start installation

u mean this ? :lmao:

<{POST_SNAPBACK}>

If u still want to go through the Setup "manually" you should check the window title of the setup and be sure that there is no such named window before the one with the next button on it.

I would give it a try and do the install here, but i have and use only Java 1.5.0

Share this post


Link to post
Share on other sites

I suggest you use ControlClick for buttons.

Use the AutoIt3 "Winfo" (Windows Info) tool to get the required information about the button(s).

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...