Jump to content
Sign in to follow this  
sutefan

Scripting Auto Install of Java RE

Recommended Posts

sutefan

I need to rollout JRE. AppsDeploy suggest the following switch /S /V/qb!, this for whatever reason does not work with version 1.4.1.03.

So AutoIt steps in to the rescue, the install process is only two steps:

Press y on License screen.

Press n on Setup type screen.

; Java Runtime Environment
; Version: 1.4.1.03
;

;Execute the Setup File
RunWait ( "\\server1\vol1\software\java\j2re-1_4_1_03-windows-i586-i.exe" , "C:\Windows", @SW_SHOW)

;License Agreement Screen - press n for Yes
WinWaitActive ("InstallShield Wizard", "&Yes","")
Send("y")

;Setup Type Screen - Press n for Next
WinWaitActive ("InstallShield Wizard", "&Next","")
Send("n")

#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Question
;MsgBox(32,"Finished - Java 1.4.1.03","" & @CRLF & "Please restart your computer to complete the installation.")
#EndRegion --- CodeWizard generated code End ---

Problems with my script is that the .exe launches fine but nothing happens. However, if I delete (; not work) everything from ;Setup Type Screen and below the script will actual perform the first step (press y).

Is there some switch or command that should come after Send("y")? I have tried the y in upper and lower case.

Sutefan


これは私の署名であり, 私の名前はsutefan である !

Share this post


Link to post
Share on other sites
Andre

Hi,

Strange that the silent switches are not working.

Perhaps send the support from Java an Email ?

About your script, try using ControlSend/ControlClick instead of using Send.

Use the Spy tool to find which button u need.

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
sutefan

What's the correct way to complete a ControlSend?

AutoIt Window Info shows:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: InstallShield Wizard

Class: #32770

Size: X: 143 Y: 209 W: 504 H: 379

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 323 Y: 319 W: 75 H: 23

Control ID: 6

ClassNameNN: Button1

Text: &Yes

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

&Yes

&No

I coded this as :

;License Agreement Screen - press y for Yes
WinWaitActive ("InstallShield Wizard", "&Yes", "")
ControlSend("InstallShield Wizard", "&Yes", "", "y")

What am I doing wrong?

Edit:

hehe no longer a newbie :)

Edited by sutefan

これは私の署名であり, 私の名前はsutefan である !

Share this post


Link to post
Share on other sites
Andre

Read the manual about ControlSend......

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
sutefan

Read the manual about ControlSend......

Andre

<{POST_SNAPBACK}>

I did.

[Edit]

ControlSend ( "title", "text", controlID, "string" [, flag] )

title=InstallShield Wizard

text=&Yes

controlID=n/a

string=n

flag=n/a

Now unless my help is missing something....I can't see what is wrong. Is there a more useful help guide around ?

Edited by sutefan

これは私の署名であり, 私の名前はsutefan である !

Share this post


Link to post
Share on other sites
SumTingWong

What's the correct way to complete a ControlSend?

AutoIt Window Info shows:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: InstallShield Wizard

Class: #32770

Size: X: 143    Y: 209    W: 504    H: 379

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:  X: 323    Y: 319    W: 75    H: 23

Control ID: 6

ClassNameNN: Button1

Text:  &Yes

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

&Yes

&No

I coded this as :

;License Agreement Screen - press y for Yes
WinWaitActive ("InstallShield Wizard", "&Yes", "")
ControlSend("InstallShield Wizard", "&Yes", "", "y")

What am I doing wrong?

Edit:

hehe no longer a newbie  :)

<{POST_SNAPBACK}>

Try:

;License Agreement Screen - press y for Yes
WinWaitActive ("InstallShield Wizard", "&Yes", "")
ControlSend("InstallShield Wizard", "", 6, "y")

or:

;License Agreement Screen - press y for Yes
WinWaitActive ("InstallShield Wizard", "&Yes", "")
ControlSend("InstallShield Wizard", "", "Button1", "y")

P.S. you have to use Run and not RunWait:

;Execute the Setup File
Run ( "\\server1\vol1\software\java\j2re-1_4_1_03-windows-i586-i.exe" , "C:\Windows", @SW_SHOW)
Edited by pacman

Share this post


Link to post
Share on other sites
sutefan

Thanks PacMac I can now see what I did wrong!


これは私の署名であり, 私の名前はsutefan である !

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  

×