Jump to content

Recommended Posts

Posted

Howdy all,

Maybe a lot op people asked this question already before me but I couldn't find any topic about this on the forum.

I have to make a script to automate the installation of some program, denpending on the user other options should be selected during the installation.

Now I would like to create a GUI where users can select some options en then click a button to start the installation with their preferences.

Can someone help me on this?

thx

Posted (edited)

can u provide more info?

do u know how to automate your installation?

Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted

For my work I'm making a script to automate the installation of Mathlab. During the installation of mathlab users can choose wich components they want to install or not. I need to make an GUI where users can select (just checkboxes) the components en then start the installation.

I know how to automate the installation

Posted

For my work I'm making a script to automate the installation of Mathlab. During the installation of mathlab users can choose wich components they want to install or not. I need to make an GUI where users can select (just checkboxes) the components en then start the installation.

I know how to automate the installation

Hi,

But are you trying to do a silent installation or use the gui with send keys?

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Posted (edited)

Hi,

But are you trying to do a silent installation or use the gui with send keys?

Cheers

I'm using AutoIt for only two weeks so I'm using send keys because I don't know how to make a silent install. This is also something you can tell me more about :)

thx

Edited by floker
Posted

I know how to automate the installation

so u know how to use Autoit Window info

just store ur events in vars and write your conditions according to each installation option

try using [ Control ID ClassNameNN ] to make your option effect the specified Control

maby u can post the setup file so everybody can give u ideas

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted

I'm using AutoIt for only two weeks so I'm using send keys because I don't know how to make a silent install. This is also something you can tell me more about :)

thx

silent installation is not the same with automated installation

for silent installation u need to use switches with the setup file name

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted

I'm using AutoIt for only two weeks so I'm using send keys because I don't know how to make a silent install. This is also something you can tell me more about :)

thx

Hi again.

Some apps have silent instalation buildin... normaly with /s or -s switch.

In your case you have to grab a pen a a paper and count how many strokes you have do give in each keys until the end of installation and script it in AutoIT.

i think you'll have a lot of send and sleeps! Or even better some WinActive, WinExists, etc...

Just take a look in AutoIT help file... i'll see that is going to help a lot :D

But we always give you a hand :D

Cheers!

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Posted

maby u can post the setup file so everybody can give u ideas

Here is my code for the installation of mathlab, the code in red is the part where I select the components for a default installation. That part should be replaced with the components slected from the GUI

CODE
$result = MsgBox(1, "Mathlab install", "Press OK to proceed with the installatie of Mathlab R2007a")

if ($result == 1) then

Run("path to setup file")

WinWaitActive("Welcome to the MathWorks Installer")

sleep(500)

Send("{ENTER}")

WinWaitActive("License Information")

sleep(500)

Send("organisation")

sleep(300)

Send("{TAB}")

sleep(300)

Send("organisation")

sleep(300)

Send("{TAB}")

sleep(300)

Send("serial number")

sleep(500)

Send("{ENTER}")

WinWaitActive("MathWorks Account")

sleep(500)

Send("{TAB}{TAB}")

sleep(300)

Send("{SPACE}")

sleep(300)

Send("{ENTER}")

WinWaitActive("License File")

sleep(500)

Send("path to license")

sleep(300)

Send("{ENTER}")

WinWaitActive("License Agreement")

sleep(500)

Send("{SPACE}")

sleep(300)

Send("{ENTER}")

WinWaitActive("Installation Type")

sleep(500)

Send("{TAB}")

sleep(300)

Send("{SPACE}")

sleep(300)

Send("{ENTER}")

WinWaitActive("Folder Selection")

sleep(500)

Send("{ENTER}")

sleep(200)

Send("{ENTER}")

WinWaitActive("Product Selection")

sleep(500)

Send("{TAB}{TAB}{TAB}")

sleep(300)

Send("{down}{down}")

sleep(300)

For $i = 1 to 11

Send("{SPACE}{down}")

sleep(300)

Next

Send("{down}")

For $i = 1 to 5

Send("{SPACE}{down}")

sleep(300)

Next

Send("{ENTER}")

sleep(300)

WinWaitActive("Custom Installation")

sleep(500)

Send("{ENTER}")

WinWaitActive("Confirmation")

sleep(500)

Send("{ENTER}")

WinWaitActive("Product Configuration Notes")

sleep(500)

Send("{ENTER}")

EndIf

Posted

Hi again.

Some apps have silent instalation buildin... normaly with /s or -s switch.

In your case you have to grab a pen a a paper and count how many strokes you have do give in each keys until the end of installation and script it in AutoIT.

i think you'll have a lot of send and sleeps! Or even better some WinActive, WinExists, etc...

Just take a look in AutoIT help file... i'll see that is going to help a lot :D

But we always give you a hand :D

Cheers!

thx for your help. I already have the code with a lot of WinActive and sleep :)

Now the rest...

Posted

so u know how to use Autoit Window info

just store ur events in vars and write your conditions according to each installation option

try using [ Control ID ClassNameNN ] to make your option effect the specified Control

Can you show me some example with code?
Posted (edited)

So...

For $i = 1 to 11;Select 11 subscriptions
  Send("{SPACE}{down}")
   sleep(300)
Next 
Send("{down}");Skip one
For $i = 1 to 5;Choose 5 more subscriptions
   Send("{SPACE}{down}")
   sleep(300)
Next

Is that right?

I beliave it looks ok then!

Edited by november

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Posted

as I said befor u need to make your Conditions according to your Controls

other wise it will be hard just to use a script with only sleep and [enter] or [space] commands

cause the condition will be apply to the specifide control ID

use [ if + else]

maby u can post the install setup file not the code

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted

Hi,

The best way to do it is to make up a gui that asks all the questions of the user that get asked in the installation. Display the gui at the very start and get all the information and store it either in alot of variables or in the registry or wherever you can get it out of later. After this create a few switch statements that outline all the different paths that can be taken by the program depending on what gets selected by the user. Once this is done you can run each path depending on what the user enters. Using this method you should be able to automate the installation from start to finish.

Dave

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

Posted

I don't know if this ex will help you

$check_1 = GUICtrlCreateCheckbox ("test",10,10)
WinWaitActive("setup title")
$checkbox_1 GUICtrlRead ($check_1)
if $checkbox_1 = 1 Then Send("[your control send]")
    endIf

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted

In addition to my post above, you can use functions such as ControlCommand() for selecting checkboxes and radio buttons, also ControlSetText(). If you find yourself needing to use the mouse for anything, the best way to avoid resolution problems is to move the installation windows to a predefined position on your screen such as (0,0) that way you will always know where the window appears.

Dave

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

Posted

So...

For $i = 1 to 11;Select 11 subscriptions
  Send("{SPACE}{down}")
   sleep(300)
Next 
Send("{down}");Skip one
For $i = 1 to 5;Choose 5 more subscriptions
   Send("{SPACE}{down}")
   sleep(300)
Next

Is that right?

I beliave it looks ok then!

That's right, this code should be changed based on the selected components in a GUI

Hier is the code I have for the moment for the GUI

CODE
#include <GUIConstants.au3>

$mainwindow = GUICreate("Mathlab Compnents", 500, 500)

; text on top of screen

GUICtrlCreateLabel("Select the components you want to install with Matlab", 20,10)

; checkboxes for components

$compo01 = GUICtrlCreateCheckbox("MATLAB 7.4", 20, 40)

$compp02 = GUICtrlCreateCheckbox("Simulink 6.6", 20, 60)

$compo03 = GUICtrlCreateCheckbox("Communications Blockset 3.5", 20, 80)

$compo04 = GUICtrlCreateCheckbox("Communications Toolbox 3.5", 20, 100)

$compo05 = GUICtrlCreateCheckbox("Control System Toolbox 8.0", 20, 120)

$compo06 = GUICtrlCreateCheckbox("Extended Symbolic Math Toolbox 3.2", 20, 140)

$compo07 = GUICtrlCreateCheckbox("Image Processing Toolbox 5.4", 20, 160)

$compo08 = GUICtrlCreateCheckbox("MATLAB Compiler 4.6", 20, 180)

$compo09 = GUICtrlCreateCheckbox("Neural Network Toolbox 5.0.2", 20, 200)

$compo10 = GUICtrlCreateCheckbox("Optimization Toolbox 3.1.1", 20, 220)

$compo11 = GUICtrlCreateCheckbox("Robust Control Toolbox 3.2", 20, 240)

$compo12 = GUICtrlCreateCheckbox("Signal Processing Blockset 6.5", 20, 260)

$compo13 = GUICtrlCreateCheckbox("Signal Processing Toolbox 6.7", 20, 280)

$compo14 = GUICtrlCreateCheckbox("Simulink Control Design 2.1", 20, 300)

$compo15 = GUICtrlCreateCheckbox("Statistics Toolbox 6.0", 20, 320)

$compo16 = GUICtrlCreateCheckbox("Symbolic Math Toolbox 3.2", 20, 340)

$compo17 = GUICtrlCreateCheckbox("System Identification Toolbox 7.0", 20, 360)

$compo18 = GUICtrlCreateCheckbox("Wavelet Toolbox 4.0", 20, 380)

$compo19 = GUICtrlCreateCheckbox("Test1", 20, 400)

; button to start the installation

$installbutton = GUICtrlCreateButton("Start Installation", 20, 440)

Guisetstate(@SW_SHOW)

sleep(10000)

I'm just a newbie, I sill need to learn a lot :)
Posted

In addition to my post above, you can use functions such as ControlCommand() for selecting checkboxes and radio buttons, also ControlSetText(). If you find yourself needing to use the mouse for anything, the best way to avoid resolution problems is to move the installation windows to a predefined position on your screen such as (0,0) that way you will always know where the window appears.

Dave

as I told u befor u need to have the Control ID so u can use the ControlCommand() witch's very helpfull

thanks to Davo for the great info

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted

as I told u befor u need to have the Control ID so u can use the ControlCommand() witch's very helpfull

thanks to Davo for the great info

I would like to do it that way but I have no experience with it, any example may help :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...