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

How to execute CA in quiet mode installation


7 replies to this topic

kmikko

kmikko
  • Members
  • 2 posts

Posted 01 November 2001 - 13:12

I'm newbie in this world of ISWI and this is something I couldn't find answer, so hopefully you can help me. :)
I have a CA that makes some changes in registry and then launches the application, this CA is placed last in execute sequence, right after InstallFinalize. If I run the installation 'normally', doubleclicking .msi file, everything goes smoothly, I have UI and CA is executed at the end and so on. But I would need to run this installation from command line and in quiet mode, so the cmdline should be something like 'msiexec.exe /i "application.msi" /q' ?
With this /q option my CA is not executed at all, what is the problem?
Some other CAs, which are run in uninstallation, are in execute sequence with condition REMOVE="ALL" and they work fine also in quiet mode...

Thanks in advance
   Mikko


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 01 November 2001 - 14:55

Firstly it should be placed before InstallFinalize.  Placing it after install finalize means the installer might try to run it even if the installation had already failed.

In my project I use CA type 1234 (18 + 192 + 1024)

18 - Run exe file installed with project
192 - Asynchronous execution. No wait for completion. Execution continues after installer terminates
1024 - Queue for execution at scheduled point within script. This flag designates that this is a deferred execution custom action.

CA Table
Type 1234
Action  StartMyProg
Source  F9999_MyFileKey

If you want the installer to wait for your program  subtract 192 from the type
.


mgama

mgama
  • Members
  • 9 posts

Posted 02 November 2001 - 00:00

Sounds like your custom action may be in the InstallUI Sequence rather than the InstallExecute Sequence.  The InstallUI sequence never gets run when using the /q switch.

sarfu

sarfu
  • Full Members
  • 44 posts

Posted 14 October 2006 - 08:42

Hi I am also having the same problem..

actually i am trying to run the .msi file in commandline msiexec /i "path\myfielname.MSI" /quiet but its not executing my custom action which i have included in execute sequence ( i havae not included that custom action in ui sequence) but if i write command for uninstallation ie msiexec /x "path\myfielname.MSI" /quiet its uninstalling the product silently

but if i directly run the .msi file by double clicking it it installs the appliction..

i i am not able to figure it out why its not installing if i write command/i ..
please some body tel me how to do it

Edited by sarfu, 14 October 2006 - 08:45.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 October 2006 - 13:30

Generate a verbose log file (www.msifaq.com/a/1022.htm). There you will see why the action doesn't run (e.g. condition is false)

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 15 October 2006 - 01:45

I would guess that you have inserted the custom action as an immediate mode custom action after InstallFinalize in the InstallExecuteSequence. I suggest you do as follows:

1: Move the custom action to be executed right before InstallFinalize.
2: Change the type for the custom action to be deferred run in system context (I assume you want to update HKLM).
3: Read up on the CustomActionData property in the MSI SDK. You will need to use this feature to pass any values to the deferred mode custom action.
4: This should solve the problem I believe.

I am not 100% sure why MSI works like this, but it seems as if running the setup quietly will skip any actions inserted after InstallFinalize (same for self-repair). I guess if I were to come up with a theory I would think the rationale is that since there is no UI sequence the installation process stops dead in the water after InstallFinalize in the InstallExecute sequence (this is after all supposed to be the end of the transacted install). When you do show a GUI, the execution will continue taking each new action in sequence until control is passed back to the UI sequence. Again: just speculation from my point of view.

 

See this post for more details on why immediate mode custom actions after InstallFinalize is always wrong. And why immediate mode custom actions must make no changes to the system: http://forum.install...5649#entry44093


Edited by Glytzhkof, 20 December 2017 - 10:44.
Linking.

Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 15 October 2006 - 02:27

A tutorial style document concerned with the CustomActionData feature: https://web.archive....ctionData.shtml (resurrected from wayback-machine).


Edited by Glytzhkof, 19 December 2017 - 23:51.
resurrected link from wayback-machine

Regards
-Stein Åsmul

sarfu

sarfu
  • Full Members
  • 44 posts

Posted 16 October 2006 - 05:32

Thanxs Stefan and Glytz(sorry i dono proper name)...
that would help me a lot..... so kind of you