When the UI handler receives a message, the installation awaits the return from the UI handler before continuing. If you're using the UI handler to test CAs, in this sense the MSI itself is 'paused' at whatever point you wish to 'pause' it, while your unit test does its deed.
The approach I tried to explain was to attempt to use the UI handler to 'spy' on the actual, running MSI via parsing the records passed through to the UI handler. Using the UI handler, I believe you can programmatically determine when a given CA is going to execute, when it has finished executing, and even process the messages the CA itself might send to windows installer, etc... While there's no usable session handle typically available within the external UI handler, I believe you can still receive the messages that set properties and also messages that represent the custom action data passed into a deferred custom action, etc... etc..., etc... The intent was to let the actual MSI do its work while the unit test UI handler "listened in" and performed [machine state] verification, hence no manual invocation of various custom actions from the unit test UI handler itself. Testing rollback is just as possible as you can return failure or user cancelled through the UI handler after your deferred action has finished. -----Original Message----- From: Lewis99 [mailto:[email protected]] Sent: Tuesday, May 12, 2009 6:27 AM To: [email protected] Subject: [WiX-devs] Accessing session object BETWEEN custom Actions Hi all, I am creating an installer test application which uses SetExternalUI to run the installer silently, processing all the messages it fires in the background. I am starting the install using Session.DoAction("INSTALL"); what I would like to be able to do is examine the Session properties before and after each custom action fires. Is this approach a valid one? Is it even possible to look at the session properties between each action? How do other people approach testing their Custom Actions and installers in general? Basically I started looking into this area after seeing this post: http://n2.nabble.com/How-do-I-execute-deferred-CAs-(for-unit-testing-custom-actions)--td692162.html http://n2.nabble.com/How-do-I-execute-deferred-CAs-(for-unit-testing-custom-actions)--td692162.html I decided to follow John Nannenga's approach. However, I am a little unclear by what he means by 'pausing the installation to perform unit tests'.. Obviously the installation will pause if you put a break point in using MmsiBreak on a certain action, but how do you actually 'get into' that part of the process and examine it in an automated way? I am still relatively inexperienced with .NET in general, so if anyone can point me in the right direction I'd be very appreciative! Thanks Lewis -- View this message in context: http://n2.nabble.com/Accessing-session-object-BETWEEN-custom-Actions-tp2868591p2868591.html Sent from the wix-devs mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ WiX-devs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-devs ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ WiX-devs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-devs
