Jump to content

unattended installation won't work as planned


Guest Frustrated_Worker
 Share

Recommended Posts

Guest Frustrated_Worker

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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