Jump to content

unattended installation won't work as planned


Recommended Posts

Guest Frustrated_Worker
Posted

Hi everybody,

I'm trying to automate the installation of a program.

I'm using Run and WinWaitActive to go through the installation windows.

It's working as it should be, showing the installation windows in "fast forward" .

Now I''m having the idea of using a progress bar and hiding the installation window.

But this will not work. The installation windows are still visible.

Where's my mistake?

Code excerpt:

--> snip:

GUICtrlSetState($pro1,$GUI_SHOW)

GUICtrlSetData ($pro1,0)

FileChangeDir(@ScriptDir & $spath)

If $os = "WIN_XP" Then

Run($program, "", @SW_HIDE)

WinWaitActive("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup")

Send("{ENTER}")

GUICtrlSetData ($pro1,15)

WinWaitActive("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup")

Send("!a")

GUICtrlSetData ($pro1,30)

WinWaitActive("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup","Choose Components")

Send("!n")

GUICtrlSetData ($pro1,45)

WinWaitActive("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup","Choose Install Location")

Send(@ProgramFilesDir & $tpath)

Send("{ENTER}")

GUICtrlSetData ($pro1,60)

WinWaitActive("Hardwareinstallation")

Send("!f")

GUICtrlSetData ($pro1,75)

WinWaitActive("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup","Installation Complete")

Send("!n")

GUICtrlSetData ($pro1,90)

WinWaitActive("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup","Click Finish to close this wizard.")

Send("{ENTER}")

GUICtrlSetData ($pro1,100)

Endif

--> snip

For better understanding:

$pro1 is the progressbar.

$spath is the path where the installation file lies.

$prog :) ram is the name of the installation file.

Help is greatly appreciated.

Thanks in advance,

Nick

Posted

Could try WinSetState("OpenVPN 2.0_rc16-gui-1.0-rc4 Setup","",@SW_MINIMIZE)

Or try

Run($Program,"",@SW_MINIMIZE)

Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Posted

I noticed you are using "Send".

Program will have to be "Visible" And "Active" in order to receive these "Send" commands.

What type of install is it, Inno, Installsheild ?

Might want to try a silent switch if possible.

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...