Sign in to follow this  
Followers 0
Ruigerock

Pausing the script during installation MS Office

5 posts in this topic

#1 ·  Posted (edited)

Hi people,

I automated almost every software we have in the office but MS Office and other msiexec products are giving me problems.

I'm installing Office this way:

$PID = Run('".\Microsoft Office 2003\Microsoft Office 2003 Dknco.exe"')
TrayTip("Installing:", "Microsoft Office 2003 Dknco Style",60, 1)
ProcessWaitClose($PID)
TrayTip("", "",0)
$PID = Run('".\Microsoft Proofing Tools 2003\Microsoft Proofing Tools.exe"')
TrayTip("Installing:", "Microsoft Proofing Tools 2003",60, 1)
ProcessWaitClose($PID)
TrayTip("", "",0)

The problem begins when $PID nr 1 thinks that Microsoft Office 2003 Dknco.exe has finished and starts $PID nr 2 Microsoft Proofing Tools.exe

An MsiExec error pops up because MS Office 2003 was still using msiexec in the background. Hereby stopping the installation of Microsoft Proofing Tools.exe

I have tried ProcessWaitClose("msiexec.exe") what does not work (msiexec is always open in the background :D)

In the past i used a MsgBox that lasted 300 seconds which worked, but isn't a nice looking solution

Do you guys/girls know a solution that checks if MS Office 2003 has stopped installing and then continues the rest of installation of other programs?

Thanks in advance

Edited by Ruigerock

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I would try this.

$PID = Run('msiexec /i "' & @ScriptDir & '\Microsoft Office 2003\Microsoft Office 2003 setup.exe" "TRANSFORMS=' & @ScriptDir & '\dknco.MST" /qb')
TrayTip("Installing:", "Microsoft Office 2003 Dknco Style",60, 1)
ProcessWaitClose($PID)
TrayTip("", "",0)
Sleep(100)
$PID = Run('msiexec /i "' & @ScriptDir & '\Microsoft Proofing Tools 2003\Microsoft Proofing Tools.exe"')
TrayTip("Installing:", "Microsoft Proofing Tools 2003",60, 1)
ProcessWaitClose($PID)
TrayTip("", "",0)

Notice that I make Dknco.exe as obsolete as your script looks like it would return control immediately with using Run() and Dknco.exe.

:D

Edited by MHz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

@Larry

I haven't tried RunWait but i think it would fail because the setup.exe stops and continues as msiexec.

In the past i tried ProcessWaitClose("setup.exe") but no succes.

Or are you implying that RunWait recognizes the change to msiexec and still waits for it to end.

@Mhz

Your version would be to ignore Dknco.exe but in the dknco.exe there are more scripts involved, like copying templates, add signature, registry settings (the irrelevant part).

But your idea could be combined in the dknco.exe itself.

Instead of:

Run('setup.exe TRANSFORMS=dknco.MST /qb')oÝ÷ Ø(ºWn±ë§²êÞjëh×6$PID = Run('msiexec /i setup.exe TRANSFORMS=\dknco.MST" /qb')
ProcessWaitClose($PID)

Do you think this way it would figure out which of the 2 msiexec.exe in the background processes belongs to MS Office and continues afterwards?

Edited by Ruigerock

Share this post


Link to post
Share on other sites

Indeed try RunWait as Larry has suggested or using the later Run/ProcessWaitClose code you show as either of those 2 options may do it. I do not have a copy of Office 2003 to say that setup.exe will indeed wait while msiexec does the installation.

Looking at some documentation shows that you may have a Pro11.msi which maybe able to use directly without using the setup.exe bootstrap. That may give you a process to wait on.

:D

Share this post


Link to post
Share on other sites

I got to listen more often to Larry :D

The RunWait was a good suggestion and it worked, the real problem what happened in my script was a Java installation before Ms Office 2003. It made msiexec unavailable during the setup of Ms Office 2003.

I also tried Mhz his tip by installing without setup.exe and it should work also (for those who want to ignore setup.exe).

Thanks people

Share this post


Link to post
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
Sign in to follow this  
Followers 0