Jump to content

Advice Needed..running Processes


Recommended Posts

Hi,

I am trying to do a instal of NERO and BURN RIGHTS remotely on multiple workstations. I have written the following script which does the install until NERO OEM. When it goes to install Burn rights, there is a conflict, as the software reports that "instance of installation process is already running". I checked task manager and found that NERO setup.exe is still running. So I added the process close function. But somehow it does not work...Both these installs have a common name (setup.exe)..as you can see..How do I run one install, finish it and then run the other one...The softies are stored on network server.

$p=Run("\\networkpath\Nero 6 OEM\Nero OEM\Setup.exe")

WinWaitActive("Nero OEM Installation Wizard")

Send("{Enter}")

Send("{TAB}")

Send("{UP}")

Send("{TAB}")

Send("{TAB}")

Send("{SPACE}")

Send("{ENTER}")

Send("{ENTER}")

Send("{ENTER}")

If $p Then ProcessClose($p)

MsgBox(8192, "Please wait...", "Burn Rights will install in 15 seconds", 15)

Run("\\network path\Nero 6 OEM\Nero BurnRights\setup.exe")

Send("{ENTER}")

Send("{ENTER}")

Send("{DOWN}")

Send("{TAB}")

Send("{ENTER}")

Exit

Any help is much appreciated.

Cheers,

RnJ

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Link to comment
Share on other sites

Edit: Welcome to the forums....

If the Nero setup process exits when you run it manually, then it should do so when the script runs it.

Run("\\networkpath\Nero 6 OEM\Nero OEM\Setup.exe")

WinWaitActive("Nero OEM Installation Wizard")

Send("{Enter}")

Send("{TAB}")

Send("{UP}")

Send("{TAB}")

Send("{TAB}")

Send("{SPACE}")

Send("{ENTER}")

Send("{ENTER}")

Send("{ENTER}")

Do

Sleep(99)

Until Not ProcessExits("Setup.exe")

MsgBox(8192, "Please wait...", "Burn Rights will install in 15 seconds", 15)

Run("\\network path\Nero 6 OEM\Nero BurnRights\setup.exe")

Send("{ENTER}")

Send("{ENTER}")

Send("{DOWN}")

Send("{TAB}")

Send("{ENTER}")

Exit

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

use autoits window info to get control IDs :think: so you can do a controlclick

I do not quite get it..what is control click??? I have opened the auto it window...It just shows whatever activity I do on the comp..

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Link to comment
Share on other sites

I do not quite get it..what is control click??? I have opened the auto it window...It just shows whatever activity I do on the comp..

Every button that you click is a "control". Using the AutoIt Window Info tool, you can get the names of the controls but putting your mouse over them. Then, by doing a ControlClick, AutoIt can tell the window to click that particular button which can happen regardless of whether anything else is going on.(Your Send commands could get thrown off if someone clicks on another window for instance.)

It's also a good idea to put checks in your script so you're making sure that you get to the next window before you continue on. What if your script was run on a slightly slower computer so it took it a little longer to get to the next window and the number of times you Send ( "Enter" ) was thrown off?

This is usually a good methodology to follow:

WinWait ("WinName")
WinActivate ("WinName")
WinWaitActive ("WinName")
ControlClick ("WinName", "", "Control" )
Edited by exodius
Link to comment
Share on other sites

I have pasted part of my script. The control clicks work fine, until the last step. The finish screen the control click do not work. What is going wrong?

If FileExists("C:\Program Files\Ahead") Then

MsgBox(0, "", "Previous version of NERO found, Deleting previous version...", 5)

DirRemove("C:\Program Files\Ahead", 1)

Sleep(5000)

MsgBox(0,"", "Installing NERO OEM...",3)

$pid=Run("\\Network path\CD Burn Software\Nero 6 OEM\Nero OEM\Setup.exe")

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1042)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1047)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1042)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","Customer information.",1042)

WinWait("Nero OEM Installation Wizard","Nero OEM installation in progress")

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","Please click "Finish" to exit the Installation Wizard.",1040)

ProcessWaitClose($pid)

Cheers,

RnJ

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Link to comment
Share on other sites

MsgBox(0, "", "Previous version of NERO found, Deleting previous version...", 5)

DirRemove("C:\Program Files\Ahead", 1)

Sleep(5000)

MsgBox(0,"", "Installing NERO OEM...",3)

$pid=Run("\\netowork path\CD Burn Software\Nero 6 OEM\Nero OEM\Setup.exe")

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1042)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1047)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1042)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","Customer information.",1042)

WinWaitActive("Nero OEM Installation Wizard","Nero OEM installation in progress")

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","Finish" & "The Wizard has completed the installation successfully." & "Please click" & '"' & "Finish" & '"' & "to exit the Installation Wizard.",1040)

ProcessWaitClose($pid)

Kinda crazy, but after it passes the Nero OEM installation in progress screen, the screen just stops at the Finish screen. Nothing happens...Must be something in the script or winwait functions...

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Link to comment
Share on other sites

WinWaitActive("Nero OEM Installation Wizard","Nero OEM installation in progress")

...

...

...

ControlClick("Nero OEM Installation Wizard","Finish" & "The Wizard has completed the installation successfully." & "Please click" & '"' & "Finish" & '"' & "to exit the Installation Wizard.",1040)

ProcessWaitClose($pid)

The WinWaitActive looks unrequired. Looks like the ControlClick has multilines in the text parameter?

Use either:

Finish

or

The Wizard has completed the installation successfully

or

Please click

Link to comment
Share on other sites

None of the above suggested methods work...This is really confusing..I am pretty sure it is a simple mistake ..but where...???

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Link to comment
Share on other sites

When I use the following timeout, it works fine...But using the timeout defeats the whole purpose of control click

$pid=Run("\\network path\CD Images\CD Burn Software\Nero 6 OEM\Nero OEM\Setup.exe")

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1042)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1047)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","",1042)

WinWait("Nero OEM Installation Wizard")

ControlClick("Nero OEM Installation Wizard","Customer information.",1042)

WinWait("Nero OEM Installation Wizard","Nero OEM installation in progress")

WinWait("Nero OEM Installation Wizard","The Wizard has completed the installation successfully",180)

ControlClick("Nero OEM Installation Wizard","",1040)

ProcessWaitClose($pid)

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
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...