A couple of things: 1. You should be able to do this in WiX using the control condition stuff, although I'm not an expert on how that works. There are always UI elements that are shown or not depending on the value of a property. That's common for things like the Next button, which won't be shown unless a property has a certain value. The same is true of bitmaps. So I think you should be able to have both bitmaps, and show the required one based on the value of a property. The implementation in Windows Installer is in the ControlCondition table.
2. There are a couple of things in your SQL flow that look a little odd. A) It's generally easier to have two SQL statements, one for each case, and then just use the appropriate one. Then you're not playing with records. B) You're doing a view.Execute on something that is not a SQL statement. That rc is still only a record you did a setstring on, nothing more. Your methodology would require you to do a select first, then a view.Fetch to get the record, then change it, then an update of the new record, something like that anyway. Anyway, as Blair points out, you'd need to delete and add a row. Phil -----Original Message----- From: Enrique Domínguez [mailto:edoming...@goalsystems.com] Sent: Tuesday, July 23, 2013 6:41 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Updating msi database (install time) [P] Hi, I'm doing that because I need on the fly change (wix variables don't allow me that because resolved at compile time) Thanks for your reply. -----Mensaje original----- De: Steven Ogilvie [mailto:steven.ogil...@titus.com] Enviado el: martes, 23 de julio de 2013 15:06 Para: General discussion for Windows Installer XML toolset. Asunto: Re: [WiX-users] Updating msi database (install time) [P] Classification: Public Enrique, Why are you using a custom action to change the banner of the MSI? There is a WIX element to do that: <WixVariable Overridable="yes" Id='WixUIBannerBmp' Value="$(var.resourcePath)\TFSTopBanner.bmp"/> <WixVariable Overridable="yes" Id='WixUIDialogBmp' Value="$(var.resourcePath)\TFSSide.bmp"/> Regards, Steve -----Original Message----- From: Enrique Domínguez [mailto:edoming...@goalsystems.com] Sent: July-23-13 7:04 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Updating msi database (install time) Hi, I'm working with wix-3.6 over VS2005 and I'm trying to make an update in a custom action at install time, for changing installer's banners. It's C# code and looks like: Microsoft.Deployment.WindowsInstaller.Database db = session.Database; string stSQL = @"UPDATE `Control` SET `Text`=? WHERE `Type`='Bitmap' AND `Control`='BannerBitmap'"; Microsoft.Deployment.WindowsInstaller.Record rc = db.CreateRecord(1); Microsoft.Deployment.WindowsInstaller.View vw=db.OpenView(stSQL); rc.SetString(1, MyBannerBmp); vw.Execute(rc); rc.SetString(1, MyDialogBmp); vw.Execute(rc); But UPDATE always fails with: 'Database Table(s) Update Failed' at vw.Execute line. I have tested a couple of different ways, always failing. Please, could somebody pointing me in right direction? I suppose as I was able to update PROPERTIES, I could update Control table fields. Thanks a lot. Best regards, Enrique Dominguez ---------------------------------------------------------------------------- -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users This message has been marked as Public by Steven Ogilvie on July-23-13 9:05:51 AM. The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.com. ---------------------------------------------------------------------------- -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users