Hi John, Many thanks for your response, that has clarified things for me. I like the approach you have taken, I was keen to look at the Session object in between actions partly because I already have a class that wrappers up Session property access, converting them to the correct types etc and partly because I am still on a bit of a learning curve with Windows Installer in general and wanted a more complete understanding.
But I am now clear on how this approach will work so I will focus on handling the handling the installer messages... etc Thanks again for taking the time to write your message. Regards Lewis John Nannenga wrote: > > 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 > > -- View this message in context: http://n2.nabble.com/Re%3A-Accessing-session-object-BETWEEN-custom-Actions-tp2870267p2906550.html Sent from the wix-devs mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ WiX-devs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-devs
