Jump to content

dead end with Off2007 installer


neebo
 Share

Recommended Posts

Hiya

As a AutoIt-n00b i'd like to axe a question, so bear with me:

Im currently working with a script which updates a) MS Off2000 > MS Off2007 ;) installs servicepack1 c) installs servicepack2

I've managed to start the Office-installer, set in the necessary options etc.

However I cant seem to make the script click the CLOSE-button on Off2007 -installer-window while the installation is complete. I tried to:

> send a keystroke !c

> control-click buttons coordinates

> added a While-loop which sleeps until the pixel color in Close-buttons coordinates changes from backround-color to something else ie. the button exists

No success. The script dont hit the close-button for me. After I click the button manually, the script continues to run ok.

What am I doing wrong here? Any feedback would be greatly appreciated.

Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

$officetitle = "Microsoft Office Professional Plus 2007"

_WinWaitActivate( $officetitle,"NUIDocumentWindow" )
Send("<serial here>")
Send("!c")
Sleep(1000)
_WinWaitActivate( $officetitle,"NUIDocumentWindow" )
Send("!c")
_WinWaitActivate( $officetitle,"NUIDocumentWindow" )
Send("!s") 
Send("!e") 
Send(@ComputerName & "\" & @IPAddress1)
Send("!o")
Send("<company name here>)
Sleep(1000)
Send("!i") ; runs the installer, takes a while

;_WinWaitActivate( $officetitle,"NUIDocumentWindow" )
$vari = PixelGetColor(332, 358)
While Hex($vari) = "0xE7EFFF"
    Sleep(3000)
WEnd
Sleep(1000)
ControlClick( $officetitle, "", "", "left", 1, 329, 336 ) ;click close-button

WinWaitClose( $officetitle,"NUIDocumentWindow" )

_tooltip("Office2007 Installed", "installing SP1")

Enclosing a capture from the "installing..." and "done" -windows with AutoIt Window Info

http://img301.imageshack.us/img301/5481/off200701.jpg

http://img510.imageshack.us/img510/5228/off200702.jpg

Link to comment
Share on other sites

Tvern,

Thanks for the tip. Seems... interesting ;)

Im certainly going to have a look on this.

However - setting the command line switches up seems a lot of work, since the problem is caused by a single-missing-mouse-click - and the rest of the script is working perfectly.

If anyone has a easier workaround on this, pls share.

Thanks and have a good one!

Link to comment
Share on other sites

Hi

Its actually very easy to set up using command line switches. If you put copy your 2007 office cd to a folder on the c: for example called office2007. then start a command console and navigate to that folder.

type setup.exe /admin - this will start the wizard up which look s a little like the install.

Run throught the wizard and then save yor final msp file (i called mine unattended) to the same directory as the office setup file.

create your program and add the line

Run(@ScriptDir & '\office2007\setup.exe /adminfile unattended.MSP')

This will then do all that you require.

Drunken Frat-Boy Monkey Garbage

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