Got it. My assumption was that I can use the UI in callback in place of customized UI in installUISequence for providing user choices to the msi. That seems to be a wrong assumption.
Thanks for all the help! :) On Thu, Sep 16, 2010 at 10:32 AM, Wilson, Phil <phil.wil...@invensys.com>wrote: > You don't collect external data during the callback - that's not what it's > for. It makes no sense to use the external callback to set the list of > features to install, as one example. I think you have some assumption about > how this is working that I'm not aware of. In my case I have a .NET program, > Windows Forms. It shows UI, a feature tree, asks the user various questions, > and all of this is before the install starts and nothing to do with the > callback. When it starts the actual MSI part of install, it does things like > MsiEnableLog, calls MsiSetExternalUIRecordallback, then calls > MsiInstallProduct, the callback supplying feedback to the progress form. I > suspect that you're thinking of external UI only in terms of the callback > function, but that's merely a monitoring scheme for the actual install > process. In fact "monitor" is the word used in the MSDN docs. It's not a > replacement for UI actions like collecting features and showing EULAs, it's > only to monitor the execute sequence of the install when you install the MSI > silently, suppressing any built-in MSI UI. > > Phil Wilson > > > > -----Original Message----- > From: Pratapa Reddy Sanaga [mailto:pratap.san...@gmail.com] > Sent: Thursday, September 16, 2010 10:16 AM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Can msi external ui write to the MSI properties? > > Phil, > > I'm not able to understand how you are able to collect user input from > external UI of an MSI and pass it as command line argument for the same > MSI. > The external UI wouldn't show up until the MSI starts executing, so once > the > MSI starts executing, the bootstrapper exe can't provide any more command > line arguments to the already running MSI right? Or, are you talking about > having 2 MSIs, one MSI whose related external UI would collect the > requirements and then the bootstrapper would collect these requirements and > launch the second product MSI with these command line arguments? > > The control flow I have is(with just one msi that will be launched by the > exe) > > 1. Exe sets my callback function as external UI by calling > MsiSetExternalUI. > 2. Exe launches the Msi with some command line args using > MsiInstallProduct. > 3. Exe waits for the MsiInstallProduct call to return. > > In a separate process, > > 1. Msi launches and calls into my callback function. > 2. I show the UI and collect all of the user requirements and return from > external UI. I don't want to fully suppress internal UI, so once I return > from external UI, internal UI will take care of progress messages, > notifications etc. > 3. The collected user requirements are in the context of the external > UI(which can't do MsiSetProperty because of the handler limitation, only > one > msi can be open at a time) and they can also be referenced in the context > of > the exe that launched the MSI. But the exe has already launched this MSI, > so > there is no way the exe can let this MSI know about the user input through > command line args. > > So in order to achieve the results you mentioned(collecting feature list > and > other input from the user and pass it on as command line args), there > should > be atleast 2 MSIs. > > 1. Exe sets your external UI callback func as external UI by calling > MsiSetExternalUI. > 2. Exe launches the MSI that would do nothing more than showing the > external > UI. > 3. Through pvContext variable, the external UI can collect the user input > and the Exe would have an idea about. > 4. Exe creates command line args after this MSI is done installing and > launches the real product MSI with these command line args. (pure guess > work > :)) > > I must have surely misunderstood a big piece as I'm not able to imagine the > external UI to be not able to communicate the user input to its host MSI. > On Thu, Sep 16, 2010 at 9:28 AM, Wilson, Phil <phil.wil...@invensys.com > >wrote: > > > Without knowing exactly why you think there are "problems with writing > back > > properties to the MSI" I can't really comment too much. What requirement > do > > you think this addresses? I have used an external UI a lot, your 2, and > it > > works fine. Typically you want to show splash screens, a dialog to accept > a > > EULA, then collect a list of features and other properties. Then you > install > > one or more MSI files "silently" as a single transaction, getting > progress > > and action messages from the callback and showing them in a progress-type > of > > dialog, handling FilesInUse in your callback by showing a dialog etc. > You > > set the feature list using ADDLOCAL on the command line when you install > the > > MSI file(s), and any other properties you have collected in the UI. Your > own > > silent install of the multiple MSI files means that you suppress all your > > UI, and collect things like a feature list and properties to be set from > a > > response file that your program reads and passes to the MSI command line. > > > > Phil Wilson > > > > > > -----Original Message----- > > From: Pratapa Reddy Sanaga [mailto:pratap.san...@gmail.com] > > Sent: Wednesday, September 15, 2010 5:48 PM > > To: General discussion for Windows Installer XML toolset. > > Subject: Re: [WiX-users] Can msi external ui write to the MSI properties? > > > > I'm just making sure I verify all possibilities to show a UI and capture > my > > design decision in the doc... > > > > 1. UI in the bootstrapper exe itself - I'm currently thinking this is the > > most feasible solution. > > 2. UI as msi external UI - As we discussed, problems with writing back > > properties to the MSI. > > 3. UI in msi embedded UI - I need to compatible with Windows Installer > 3.1, > > so this is not an option for me. > > 4. UI in UI Sequence - My UI should host a WebBrowser control, so the MSI > > dialogs are not an option for me. > > 5. UI in immediate custom action in InstallExecute sequence - This is > > probably another option available to me apart from option 1. The UI > > launches > > as logged in user, I'll be able to write back to the msi. But I'm not > sure > > if I should be doing the UI work in this place because the custom action, > > eventhough running as logged in user, is running with Integrity Level > High > > and Elevation Type Full(applicable on Vista+). Since the UI is going to > > navigate to a website, this is not secure. Once the process is elevated, > > there is no way to go back to non-elevated mode. > > 6. UI in deferred custom action - The new process that my UI launches is > > launching as LocalSystem and I'm not able to launch it as logged in user. > > So > > the security issue is pulling me back from going with this approach. > > > > So what you suggested above(collect data in your own UI and set the > > properties on command line) is my option 1. Please correct me if any of > my > > above statements are wrong. > > > > Thanks, > > Pratap. > > > > On Wed, Sep 15, 2010 at 5:08 PM, Wilson, Phil <phil.wil...@invensys.com > > >wrote: > > > > > That's correct, it will have started, but if you're following a model > > where > > > you collect data in your own UI and start the install you have an > > > opportunity to set the properties on the install command line. I don't > > see > > > why you would try to set properties from your callback - it seems > > > non-deterministic to me. Also you can't really show a UI there and > expect > > to > > > support a silent install. > > > > > > Phil Wilson > > > > > > > > > -----Original Message----- > > > From: Pratapa Reddy Sanaga [mailto:pratap.san...@gmail.com] > > > Sent: Wednesday, September 15, 2010 4:28 PM > > > To: General discussion for Windows Installer XML toolset. > > > Subject: Re: [WiX-users] Can msi external ui write to the MSI > > properties? > > > > > > The install would have already started if my external UI is being > > executed > > > right? i.e. the callback would occur only after I call the > InstallProduct > > > API from my bootstrapper exe, so I don't have any more chance of > passing > > in > > > a command line argument I guess. > > > > > > I'll try using the context to set the property and get back on this > > > thread.. > > > > > > Thanks! > > > On Wed, Sep 15, 2010 at 4:15 PM, Wilson, Phil < > phil.wil...@invensys.com > > > >wrote: > > > > > > > If you haven't started the install yet, you could pass those > > properties > > > on > > > > the command line. Alternatively, the first parameter in the UIHandler > > > > callback ("context") is (can be cast to) the MSIHANDLE for the > install. > > > The > > > > example callback in MSDN casts it to an MSIHANDLE when it calls > > > > MsiFormatRecord(). I've never tried an MsiSetProperty() on it though. > > > > > > > > > > > > Phil Wilson > > > > > > > > -----Original Message----- > > > > From: Pratapa Reddy Sanaga [mailto:pratap.san...@gmail.com] > > > > Sent: Wednesday, September 15, 2010 3:53 PM > > > > To: General discussion for Windows Installer XML toolset. > > > > Subject: [WiX-users] Can msi external ui write to the MSI properties? > > > > > > > > Hi, > > > > > > > > I'm trying to see if I can use msi external ui for my project. Will I > > be > > > > able to get an input from the user using msi external ui and then > store > > > > that, lets say string, input from the user into one of the msi > > > properties? > > > > I > > > > feel it can't be done because the external ui would probably be > running > > > in > > > > a > > > > separate process and it wouldn't have any handle to the currently > > running > > > > msi to set the property. Please assert my understanding. > > > > > > > > Thanks, > > > > Pratap. > > > > > > > > -- > > > > Vote for loksatta = vote for a better future > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Start uncovering the many advantages of virtual appliances > > > > and start using them to simplify application deployment and > > > > accelerate your shift to cloud computing. > > > > http://p.sf.net/sfu/novell-sfdev2dev > > > > _______________________________________________ > > > > WiX-users mailing list > > > > WiX-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > > > > > *** Confidentiality Notice: This e-mail, including any associated or > > > > attached files, is intended solely for the individual or entity to > > which > > > it > > > > is addressed. This e-mail is confidential and may well also be > legally > > > > privileged. If you have received it in error, you are on notice of > its > > > > status. Please notify the sender immediately by reply e-mail and then > > > delete > > > > this message from your system. Please do not copy it or use it for > any > > > > purposes, or disclose its contents to any other person. This email > > comes > > > > from a division of the Invensys Group, owned by Invensys plc, which > is > > a > > > > company registered in England and Wales with its registered office at > > 3rd > > > > Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number > 166023). > > > For > > > > a list of European legal entities within the Invensys Group, please > go > > to > > > > > > > > > > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77 > > > > . > > > > > > > > You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail > > > > recept...@invensys.com. This e-mail and any attachments thereto may > be > > > > subject to the terms of any agreements between Invensys (and/or its > > > > subsidiaries and affiliates) and the recipient (and/or its > subsidiaries > > > and > > > > affiliates). > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Start uncovering the many advantages of virtual appliances > > > > and start using them to simplify application deployment and > > > > accelerate your shift to cloud computing. > > > > http://p.sf.net/sfu/novell-sfdev2dev > > > > _______________________________________________ > > > > WiX-users mailing list > > > > WiX-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > > > > > > > > > -- > > > Vote for loksatta = vote for a better future > > > > > > > > > ------------------------------------------------------------------------------ > > > Start uncovering the many advantages of virtual appliances > > > and start using them to simplify application deployment and > > > accelerate your shift to cloud computing. > > > http://p.sf.net/sfu/novell-sfdev2dev > > > _______________________________________________ > > > WiX-users mailing list > > > WiX-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > > *** Confidentiality Notice: This e-mail, including any associated or > > > attached files, is intended solely for the individual or entity to > which > > it > > > is addressed. This e-mail is confidential and may well also be legally > > > privileged. If you have received it in error, you are on notice of its > > > status. Please notify the sender immediately by reply e-mail and then > > delete > > > this message from your system. Please do not copy it or use it for any > > > purposes, or disclose its contents to any other person. This email > comes > > > from a division of the Invensys Group, owned by Invensys plc, which is > a > > > company registered in England and Wales with its registered office at > 3rd > > > Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). > > For > > > a list of European legal entities within the Invensys Group, please go > to > > > > > > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77 > > > . > > > > > > You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail > > > recept...@invensys.com. This e-mail and any attachments thereto may be > > > subject to the terms of any agreements between Invensys (and/or its > > > subsidiaries and affiliates) and the recipient (and/or its subsidiaries > > and > > > affiliates). > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Start uncovering the many advantages of virtual appliances > > > and start using them to simplify application deployment and > > > accelerate your shift to cloud computing. > > > http://p.sf.net/sfu/novell-sfdev2dev > > > _______________________________________________ > > > WiX-users mailing list > > > WiX-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > > > > -- > > Vote for loksatta = vote for a better future > > > > > ------------------------------------------------------------------------------ > > Start uncovering the many advantages of virtual appliances > > and start using them to simplify application deployment and > > accelerate your shift to cloud computing. > > http://p.sf.net/sfu/novell-sfdev2dev > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > *** Confidentiality Notice: This e-mail, including any associated or > > attached files, is intended solely for the individual or entity to which > it > > is addressed. This e-mail is confidential and may well also be legally > > privileged. If you have received it in error, you are on notice of its > > status. Please notify the sender immediately by reply e-mail and then > delete > > this message from your system. Please do not copy it or use it for any > > purposes, or disclose its contents to any other person. This email comes > > from a division of the Invensys Group, owned by Invensys plc, which is a > > company registered in England and Wales with its registered office at 3rd > > Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). > For > > a list of European legal entities within the Invensys Group, please go to > > > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77 > > . > > > > You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail > > recept...@invensys.com. This e-mail and any attachments thereto may be > > subject to the terms of any agreements between Invensys (and/or its > > subsidiaries and affiliates) and the recipient (and/or its subsidiaries > and > > affiliates). > > > > > > > > > > > ------------------------------------------------------------------------------ > > Start uncovering the many advantages of virtual appliances > > and start using them to simplify application deployment and > > accelerate your shift to cloud computing. > > http://p.sf.net/sfu/novell-sfdev2dev > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > -- > Vote for loksatta = vote for a better future > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > *** Confidentiality Notice: This e-mail, including any associated or > attached files, is intended solely for the individual or entity to which it > is addressed. This e-mail is confidential and may well also be legally > privileged. If you have received it in error, you are on notice of its > status. Please notify the sender immediately by reply e-mail and then delete > this message from your system. Please do not copy it or use it for any > purposes, or disclose its contents to any other person. This email comes > from a division of the Invensys Group, owned by Invensys plc, which is a > company registered in England and Wales with its registered office at 3rd > Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For > a list of European legal entities within the Invensys Group, please go to > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77 > . > > You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail > recept...@invensys.com. This e-mail and any attachments thereto may be > subject to the terms of any agreements between Invensys (and/or its > subsidiaries and affiliates) and the recipient (and/or its subsidiaries and > affiliates). > > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > -- Vote for loksatta = vote for a better future ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users