Re: [WiX-users] XmlFile being executed when feature condition should fail
Thanks everyone for all your help, it's now working. I found one bug in my code where was referenced in multiple features (one conditioned on upgrade and one not), and once that was cleaned up, I found I could place the NOT UPGRADEFOUND condition back on each component as per Bob's suggestion, and this time it worked! I didn't have to worry about conditioning the SchedXmlFile in the execute sequence, which means upgrades should be able to make web.config changes also. Just in case someone else runs into this issue, the approach was to: - Add component to feature which is always executed (Absent=disallow) - Add condition to component containing XmlFile to only execute on new installs (NOT UPGRADEFOUND or whatever property you create). On Thu, Sep 24, 2009 at 1:26 AM, Blair wrote: > The Request is the expected-intended state (based on conditions and parent > features). Null means it shouldn't be touched. I'm interested in knowing why > it says Installed: Absent on the upgrade. I just checked and all my components say "Installed: Absent" in first the InstallValidate, and then "Installed: Local" in the second InstallValidate. Guess I need to grep the logging output more, but what is interesting is now in the first InstallValidate, it reports "Request: Local" instead of the "Request: Null" it was reporting before. Regards Si -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
The Request is the expected-intended state (based on conditions and parent features). Null means it shouldn't be touched. I'm interested in knowing why it says Installed: Absent on the upgrade. The SchedXmlFile action has access to just two of the three values (Installed and Action?) and has to "determine" what it should do based on that. There is supposed to be a formula between all three that works like this: Installed: Absent; Action: Local = install Installed: Local; Action: Absent = remove Installed: Local; Action: Local = upgrade or repair (install again) Installed: Local; Action: Null = leave alone (it was already installed, and wasn't changed in this upgrade) Installed: Absent; Action: Absent = don't install I would assume that the following would also mean leave alone: Installed: Absent; Action: Null See the MsiGetComponentState() api for the view available to SchedXmlFile. I wonder if adding LOGVERBOSE=1 to your commandline and looking in the log around SchedXmlFile will give more information (http://www.joyofsetup.com/2008/07/15/verbose-logging-from-wcautil) about why it is executing for that component. -Original Message- From: si [mailto:sshnug...@gmail.com] Sent: Wednesday, September 23, 2009 1:01 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] XmlFile being executed when feature condition should fail > What does the log say about the WebConfigSqlDbSqlAuthComponent component while running CostFinalize? > > Also, is your upgrade Major or Minor/Small? Hi Blair, All our upgrades are Major. As for the component, the only reference in the log is: New Install: Action ended 16:58:44: CostFinalize. Return value 1. MSI (s) (FC:08) [16:58:44:731]: Doing action: InstallValidate Action 16:58:44: InstallValidate. Validating install Action start 16:58:44: InstallValidate. [snip] MSI (s) (FC:08) [16:58:44:734]: Component: WebConfigSqlDbWinAuthComponent; Installed: Absent; Request: Local; Action: Local MSI (s) (FC:08) [16:58:44:734]: Component: WebConfigSqlDbSqlAuthComponent; Installed: Absent; Request: Local; Action: Null Upgrade: Action ended 17:12:57: CostFinalize. Return value 1. MSI (s) (D8:20) [17:12:57:359]: Doing action: InstallValidate Action 17:12:57: InstallValidate. Validating install Action start 17:12:57: InstallValidate. [snip] MSI (s) (D8:20) [17:12:57:363]: Component: WebConfigSqlDbWinAuthComponent; Installed: Absent; Request: Null; Action: Null MSI (s) (D8:20) [17:12:57:363]: Component: WebConfigSqlDbSqlAuthComponent; Installed: Absent; Request: Null; Action: Null So the Action value in the upgrade looks correct, but I'm wondering why the Request value is null, is this a clue? Thanks, Simon -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
> What does the log say about the WebConfigSqlDbSqlAuthComponent component > while running CostFinalize? > > Also, is your upgrade Major or Minor/Small? Hi Blair, All our upgrades are Major. As for the component, the only reference in the log is: New Install: Action ended 16:58:44: CostFinalize. Return value 1. MSI (s) (FC:08) [16:58:44:731]: Doing action: InstallValidate Action 16:58:44: InstallValidate. Validating install Action start 16:58:44: InstallValidate. [snip] MSI (s) (FC:08) [16:58:44:734]: Component: WebConfigSqlDbWinAuthComponent; Installed: Absent; Request: Local; Action: Local MSI (s) (FC:08) [16:58:44:734]: Component: WebConfigSqlDbSqlAuthComponent; Installed: Absent; Request: Local; Action: Null Upgrade: Action ended 17:12:57: CostFinalize. Return value 1. MSI (s) (D8:20) [17:12:57:359]: Doing action: InstallValidate Action 17:12:57: InstallValidate. Validating install Action start 17:12:57: InstallValidate. [snip] MSI (s) (D8:20) [17:12:57:363]: Component: WebConfigSqlDbWinAuthComponent; Installed: Absent; Request: Null; Action: Null MSI (s) (D8:20) [17:12:57:363]: Component: WebConfigSqlDbSqlAuthComponent; Installed: Absent; Request: Null; Action: Null So the Action value in the upgrade looks correct, but I'm wondering why the Request value is null, is this a clue? Thanks, Simon -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
> As far as I can tell, what you have there is a component declaration with a > condition about whether it should be installed or not. > > However the issue seems to be that the custom action ' SchedXmlFile' is being > called, so what matters is the condition you have on that custom action call, > in the UI/Execute/event tables, wherever it's called from. > > (You may have previously posted that info, but it's been deleted from this > response.) > > Phil Wilson Thanks for the reply Phil, that makes sense. Here's our defined sequences: NEWPRODUCTFOUND OLDPRODUCTFOUND &ConfigureIIS6WebSiteFeature=3 NOT UPGRADEFOUND AND NOT USEINTEGRATEDSECURITY NOT UPGRADEFOUND AND USEINTEGRATEDSECURITY UPGRADEFOUND (&DatabaseSetupFeature=3 OR &DatabaseUpgradeFeature=3) AND NOT REMOVE NEWPRODUCTFOUND OLDPRODUCTFOUND So there is no condition associated with SchedXmlFile. Of course I then tried setting the SchedXmlFile condition to NOT UPGRADEFOUND or &DatabaseSetupFeature=3 AND NOT REMOVE, alas, still no luck. What's interesting is that now when doing an upgrade the log reports: Action ended 16:59:58: DuplicateFiles. Return value 1. MSI (s) (FC:00) [16:59:58:331]: Skipping action: SchedXmlFile (condition is false) which is good, but then later in the same log: Action ended 17:00:21: DuplicateFiles. Return value 1. MSI (s) (FC:1C) [17:00:21:310]: Doing action: SchedXmlFile Action 17:00:21: SchedXmlFile. Action start 17:00:21: SchedXmlFile. MSI (s) (FC:D8) [17:00:21:316]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIDFB4.tmp, Entrypoint: SchedXmlFile MSI (s) (FC!98) [17:00:21:351]: PROPERTY CHANGE: Adding ExecXmlFileRollback property. Its value is '0C:\Program Files (x86)\... MSI (s) (FC!98) [17:00:21:352]: Doing action: ExecXmlFileRollback Action 17:00:21: ExecXmlFileRollback. Action start 17:00:21: ExecXmlFileRollback. ExecXmlFileRollback: Action ended 17:00:21: ExecXmlFileRollback. Return value 1. MSI (s) (FC!98) [17:00:21:356]: PROPERTY CHANGE: Adding ExecXmlFile property. Its value is '10C:\Program Files (x86)\... MSI (s) (FC!98) [17:00:21:357]: Doing action: ExecXmlFile Action 17:00:21: ExecXmlFile. Action start 17:00:21: ExecXmlFile. ExecXmlFile: Action ended 17:00:21: ExecXmlFile. Return value 1. Action ended 17:00:21: SchedXmlFile. Return value 1. I'm not sure what's going on here, do I need the SchedXmlFile custom action conditions defined in the other sequences too? Also, our next upgrade also has to include changes to web.config, so I will have to call XmlFile for this (major) upgrade. Thanks, Simon -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
What does the log say about the WebConfigSqlDbSqlAuthComponent component while running CostFinalize? Also, is your upgrade Major or Minor/Small? -Original Message- From: si [mailto:sshnug...@gmail.com] Sent: Monday, September 21, 2009 11:54 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] XmlFile being executed when feature condition should fail >> Long story short: XmlFile is being executed during upgrades when I >> only want it executed on new installations. >> > > The owning component controls whether XmlFile is run; conditionalize it > so it doesn't run during upgrade. Thanks for the reply Bob, unfortunately I already tried this with no luck: NOT Installed AND USEINTEGRATEDSECURITY = 1 NOT Installed AND NOT USEINTEGRATEDSECURITY = 1> I tried both "NOT Installed" and "NOT UPGRADEFOUND" for the component condition, neither worked. I was wondering if it may be because the custom UI we show for collecting sql credentials wasn't being shown on upgrades, so the property values would be null, but I don't understand why the connectionString attribue is empty, rather than "Database=;Server=;uid=;pwd;" which is what I would've expected if the properties were empty. Looking, through the upgrade log file, it appears that ExecXmlFileRollback action is being called: MSI (s) (28:A8) [16:09:22:671]: Doing action: SchedXmlFile Action 16:09:22: SchedXmlFile. Action start 16:09:22: SchedXmlFile. MSI (s) (28:14) [16:09:22:677]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8A93.tmp, Entrypoint: SchedXmlFile MSI (s) (28!1C) [16:09:22:719]: PROPERTY CHANGE: Adding ExecXmlFileRollback property. Its value is '0€C:\Program Files (x86)\blah\\web.config�...@xx[snip] MSI (s) (28!1C) [16:09:22:720]: Doing action: ExecXmlFileRollback Action 16:09:22: ExecXmlFileRollback. Action start 16:09:22: ExecXmlFileRollback. ExecXmlFileRollback: Action ended 16:09:22: ExecXmlFileRollback. Return value 1. MSI (s) (28!1C) [16:09:22:726]: PROPERTY CHANGE: Adding ExecXmlFile property. Its value is '1€0€C:\Program Files (x86)\Blah\\Web.config€4€0€/configuration/connectionStrings/a...@name='Database']/@connectionString€€Database=Blah;Server=(local);Integrated Security=SSPI;'. MSI (s) (28!1C) [16:09:22:727]: Doing action: ExecXmlFile Action 16:09:22: ExecXmlFile. Action start 16:09:22: ExecXmlFile. ExecXmlFile: Action ended 16:09:22: ExecXmlFile. Return value 1. Action ended 16:09:22: SchedXmlFile. Return value 1. Another potential issue is that we create the web.config on install using CopyFile, and run SchedXmlFile after DuplicateFiles. I don't think this would cause a problem, but figured it was worth a mention. Thanks again. -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
As far as I can tell, what you have there is a component declaration with a condition about whether it should be installed or not. However the issue seems to be that the custom action ' SchedXmlFile' is being called, so what matters is the condition you have on that custom action call, in the UI/Execute/event tables, wherever it's called from. (You may have previously posted that info, but it's been deleted from this response.) Phil Wilson -Original Message- From: si [mailto:sshnug...@gmail.com] Sent: Monday, September 21, 2009 11:54 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] XmlFile being executed when feature condition should fail >> Long story short: XmlFile is being executed during upgrades when I >> only want it executed on new installations. >> > > The owning component controls whether XmlFile is run; conditionalize it > so it doesn't run during upgrade. Thanks for the reply Bob, unfortunately I already tried this with no luck: NOT Installed AND USEINTEGRATEDSECURITY = 1 NOT Installed AND NOT USEINTEGRATEDSECURITY = 1> I tried both "NOT Installed" and "NOT UPGRADEFOUND" for the component condition, neither worked. I was wondering if it may be because the custom UI we show for collecting sql credentials wasn't being shown on upgrades, so the property values would be null, but I don't understand why the connectionString attribue is empty, rather than "Database=;Server=;uid=;pwd;" which is what I would've expected if the properties were empty. Looking, through the upgrade log file, it appears that ExecXmlFileRollback action is being called: MSI (s) (28:A8) [16:09:22:671]: Doing action: SchedXmlFile Action 16:09:22: SchedXmlFile. Action start 16:09:22: SchedXmlFile. MSI (s) (28:14) [16:09:22:677]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8A93.tmp, Entrypoint: SchedXmlFile MSI (s) (28!1C) [16:09:22:719]: PROPERTY CHANGE: Adding ExecXmlFileRollback property. Its value is '0€C:\Program Files (x86)\blah\\web.config�...@xx[snip] MSI (s) (28!1C) [16:09:22:720]: Doing action: ExecXmlFileRollback Action 16:09:22: ExecXmlFileRollback. Action start 16:09:22: ExecXmlFileRollback. ExecXmlFileRollback: Action ended 16:09:22: ExecXmlFileRollback. Return value 1. MSI (s) (28!1C) [16:09:22:726]: PROPERTY CHANGE: Adding ExecXmlFile property. Its value is '1€0€C:\Program Files (x86)\Blah\\Web.config€4€0€/configuration/connectionStrings/a...@name='Database']/@connectionString€€Database=Blah;Server=(local);Integrated Security=SSPI;'. MSI (s) (28!1C) [16:09:22:727]: Doing action: ExecXmlFile Action 16:09:22: ExecXmlFile. Action start 16:09:22: ExecXmlFile. ExecXmlFile: Action ended 16:09:22: ExecXmlFile. Return value 1. Action ended 16:09:22: SchedXmlFile. Return value 1. Another potential issue is that we create the web.config on install using CopyFile, and run SchedXmlFile after DuplicateFiles. I don't think this would cause a problem, but figured it was worth a mention. Thanks again. -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
>> Long story short: XmlFile is being executed during upgrades when I >> only want it executed on new installations. >> > > The owning component controls whether XmlFile is run; conditionalize it > so it doesn't run during upgrade. Thanks for the reply Bob, unfortunately I already tried this with no luck: NOT Installed AND USEINTEGRATEDSECURITY = 1 NOT Installed AND NOT USEINTEGRATEDSECURITY = 1> I tried both "NOT Installed" and "NOT UPGRADEFOUND" for the component condition, neither worked. I was wondering if it may be because the custom UI we show for collecting sql credentials wasn't being shown on upgrades, so the property values would be null, but I don't understand why the connectionString attribue is empty, rather than "Database=;Server=;uid=;pwd;" which is what I would've expected if the properties were empty. Looking, through the upgrade log file, it appears that ExecXmlFileRollback action is being called: MSI (s) (28:A8) [16:09:22:671]: Doing action: SchedXmlFile Action 16:09:22: SchedXmlFile. Action start 16:09:22: SchedXmlFile. MSI (s) (28:14) [16:09:22:677]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8A93.tmp, Entrypoint: SchedXmlFile MSI (s) (28!1C) [16:09:22:719]: PROPERTY CHANGE: Adding ExecXmlFileRollback property. Its value is '0C:\Program Files (x86)\blah\\web.config...@xx[snip] MSI (s) (28!1C) [16:09:22:720]: Doing action: ExecXmlFileRollback Action 16:09:22: ExecXmlFileRollback. Action start 16:09:22: ExecXmlFileRollback. ExecXmlFileRollback: Action ended 16:09:22: ExecXmlFileRollback. Return value 1. MSI (s) (28!1C) [16:09:22:726]: PROPERTY CHANGE: Adding ExecXmlFile property. Its value is '10C:\Program Files (x86)\Blah\\Web.config40/configuration/connectionStrings/a...@name='Database']/@connectionStringDatabase=Blah;Server=(local);Integrated Security=SSPI;'. MSI (s) (28!1C) [16:09:22:727]: Doing action: ExecXmlFile Action 16:09:22: ExecXmlFile. Action start 16:09:22: ExecXmlFile. ExecXmlFile: Action ended 16:09:22: ExecXmlFile. Return value 1. Action ended 16:09:22: SchedXmlFile. Return value 1. Another potential issue is that we create the web.config on install using CopyFile, and run SchedXmlFile after DuplicateFiles. I don't think this would cause a problem, but figured it was worth a mention. Thanks again. -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] XmlFile being executed when feature condition should fail
si wrote: > Long story short: XmlFile is being executed during upgrades when I > only want it executed on new installations. > The owning component controls whether XmlFile is run; conditionalize it so it doesn't run during upgrade. -- sig://boB http://joyofsetup.com/ -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] XmlFile being executed when feature condition should fail
Greetings, Long story short: XmlFile is being executed during upgrades when I only want it executed on new installations. 2 features are used to determine whether database install or upgrade (both executed by DTF external tool) takes place: UPGRADEFOUND NOT UPGRADEFOUND WebConfigSetupComponents is used to update a web.config file after a custom dialog gets db connection string details for new installations, and because of the different authentication methods (SQL Authentication or Windows Integrated Security), there are 2 components which are conditioned based on user selected property USEINTEGRATEDSECURITY: USEINTEGRATEDSECURITY = 1 Everything is working *except* during upgrades, where XmlFile still gets called, and it empties out the connectionString attribute in web.config. Any help appreciated, thanks. -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users