Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Moving CA from User Interfance to Execute Immediat


3 replies to this topic

Francois Gravel

Francois Gravel
  • Members
  • 2 posts

Posted 02 November 2006 - 21:38

Hi,
I have a .MSI package made with InstallShield that installs other MSI and EXE (a total of 4 with the 4 with the original MSI). It works fine when I install it with user interface, but in silent mode, it doesn't work.

In fact it works with the /qr switch, but here we deployed via GPO so we cannot change de default switch (/qn).

I found all the CA in user interface that are responsible of those installations so I tried to move it under Execute immediate first, and also to execute deferred, but it doesn't work. I don't receive any error when I save the msi, neither when I install it, but the other "applications" or not installed.

I really don't understand why it doesn't work. In the past, I've done this few times with success. Here is an example of the CA that is under user interface (the others uses the same patern):

If Not Installed then
Call DLL from Installation
Enf if

The custom action is located after "migrate feature state" and before execute action. Here are the properties of the CA:
Custom action name: InstallExtensionsManager
DLL file: ISScriptBridge.dll
Function name: f4

Any idea why it doesn't work when I copy those custom actions under Execute Immediate or deferred?

Thanks a lot,
Frank


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 03 November 2006 - 09:48

MSI does not allow concurrent InstallExecuteSequences. This means that nested MSI installs can not be run in this sequence. It works from the UI sequence because the UI sequence is run before and after the InstallExecuteSequence has run.

There is no reliable way to run several MSI from within another MSI. The best way is to deploy them one by one in sequence. The "run MSI custom action" has been deprecated due to all the problems it causes. See here: http://support.microsoft.com/kb/306439 (end of article list the ridiculous amount of problems you can encounter).
Regards
-Stein Åsmul

Francois Gravel

Francois Gravel
  • Members
  • 2 posts

Posted 03 November 2006 - 14:56

QUOTE (Glytzhkof @ 2006-11-03 09:48)
MSI does not allow concurrent InstallExecuteSequences. This means that nested MSI installs can not be run in this sequence. It works from the UI sequence because the UI sequence is run before and after the InstallExecuteSequence has run.

There is no reliable way to run several MSI from within another MSI. The best way is to deploy them one by one in sequence. The "run MSI custom action" has been deprecated due to all the problems it causes. See here: http://support.microsoft.com/kb/306439 (end of article list the ridiculous amount of problems you can encounter).

Hi,
Thanks for your reply.

Not sure to understand what you mean because I was able to run nested MSI under Execute Immediate in the past, and I've also seen vendor packages that were installing nested MSI or exe from Execute Immediate.

Or maybe you wanted to say that we can install MSI (not nested) in the UI sequence, but in the Execute Immediate we absolutely need to put the MSI as nested, which is not recommanded?

Thanks,
Frank

Edited by Francois Gravel, 03 November 2006 - 15:03.


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 04 November 2006 - 13:06

Nested MSI installs are indeed possible, but the feature is deprecated. Don't use it! There is a whole array of problems associated with it.

I haven't tested this, but what you have seen before are probably MSI files launched either before InstallInitialize or after InstallFinalize in the InstallExecuteSequence. This might indeed work without using a nested MSI custom action, but is terribly unreliable and definitely not recommended. The reason this might work is because the actual MSI transaction is run between InstallInitialize and InstallFinalize. As far as I know there can only be one transaction active on the system at a time, and the transaction for each MSI consists of the actions run between InstallInitialize and InstallFinalize.

Obviously if you schedule the install from the UI sequence it will work, but if your setup is run in silent mode the install will not be run (since the UI sequence is skipped completely).
Regards
-Stein Åsmul