views:

646

answers:

2

I'm working on a MSI file which is able to install 2 tools. Both tools are installed from an exe file but which are able to be launched silently with arguments like /SI I can built the project without problem, without warning... Un-install works fine too. If I double click on my MSI file, both software are installed without problem.... then I can uninstall without problem ...

But If I launch my msi file using msiexec /i mymsi.msi /qn this time just the first software TOOL-A is installed... then nothing else. You can see below my configuration: Tool-A custom action

Tool-A Custom Actions:
Executable Filekey: setup.exe
Command Line: /SI
Return Processiong: Synchronous (check exit code)
In-Script Execution: Immediate Execution

Execution Scheduling: Execute only once
Install UI Sequence: After ExecuteAction
Install UI Condition: Not Installed
Install Exec Sequence: After InstallFinalize
Install Exec Condition: Not Installed
Advertise Exec Sequence: Absent from sequence
Admin UI Sequence: <Absent from sequence>
Admin Exec Sequence: <Absent from sequence>
MSI Type Number 274

And for the second tool (never installed using MSIEXEC )

Tool-B custom action
Executable Filekey: setup.exe1
Command Line: /q
Return Processiong: Synchronous (check exit code)
In-Script Execution: Immediate Execution
Execution Scheduling: Execute only once
Install UI Sequence: After tool-A
Install UI Condition: Not Installed
Install Exec Sequence: After tool-A
Install Exec Condition: Not Installed
Advertise Exec Sequence: <Absent from sequence>
Admin UI Sequence: <Absent from sequence>
Admin Exec Sequence: <Absent from sequence>
MSI Type Number 274

So if someone can help me ? To summurize: If the MSI is launched via double-click no problemo: tool-A and tool-B are installed ! If I use Msiexec /i mymsi.msi /qn just tool-A is installed !!!

Many thanks for your help. With my best regards.

A: 

Is there any indication in a verbose log file what has occurred? (msiexec /i mymsi.msi /qn /l*v verbose.log) My guess is that Tool-B uses an MSI to install, so cannot safely install from the execute sequence. Even if it indicates a failure, when you're running with /qn and scheduled after InstallFinalize, this won't roll back the outer install. Of course, if it doesn't indicate a failure, it will be hard to tell what's going on. Perhaps see if Tool-B's command line supports taking some sort of log.

Michael Urman
A: 

I agree with Michael, you'll find that Tool-B 's install uses the Windows Installer service. When your install's execute sequence is running, a transaction is taking place. Prior to Installer version 4.5, the Installer wouldn't allow two transactions to take place simultaneously, which prevents Tool-B's install from running.

Starting with version 4.5, there is some magic that makes this possible. Effectively it lets you tell the Installer "Hey, this other install transaction I want you to perform is really part of my transaction. So, merge the two and treat them as a single transaction. Thanks."

This is the doc you want to refer to:

http://msdn.microsoft.com/en-us/library/bb736322%28VS.85%29.aspx

Ed