Re: [WiX-users] XmlFile being executed when feature condition should fail

2009-09-24 Thread si
Thanks everyone for all your help, it's now working.

I found one bug in my code where ComponentGroupRef
Id=WebConfigSetupComponents / 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 os...@live.com 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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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

2009-09-23 Thread Blair
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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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

2009-09-22 Thread Wilson, Phil
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:

Component Id=WebConfigSqlDbWinAuthComponent KeyPath=yes Guid=Blah
  ConditionNOT Installed AND USEINTEGRATEDSECURITY = 1/Condition
  util:XmlFile Id=UpdateWebConfigSqlDbWinAuth
File=[INSTALLLOCATION]\Web.config

ElementPath=/configuration/connectionStrings/add[...@name='Database'[\]]/@connectionString

Value=Database=[TARGETDBNAME];Server=[TARGETDBSERVER];Integrated
Security=SSPI;
Action=setValue /
/Component

Component Id=WebConfigSqlDbSqlAuthComponent KeyPath=yes Guid=Blah
  ConditionNOT Installed AND NOT USEINTEGRATEDSECURITY = 1/Condition
  util:XmlFile Id=UpdateWebConfigSqlDbSqlAuth
File=[INSTALLLOCATION]\Web.config

ElementPath=/configuration/connectionStrings/add[...@name='Database'[\]]/@connectionString

Value=Database=[TARGETDBNAME];Server=[TARGETDBSERVER];uid=[TARGETDBUSERNAME];pwd=[TARGETDBUSERPASSWORD];
Action=setValue /
/Component

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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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

2009-09-22 Thread Blair
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:

Component Id=WebConfigSqlDbWinAuthComponent KeyPath=yes Guid=Blah
  ConditionNOT Installed AND USEINTEGRATEDSECURITY = 1/Condition
  util:XmlFile Id=UpdateWebConfigSqlDbWinAuth
File=[INSTALLLOCATION]\Web.config

ElementPath=/configuration/connectionStrings/add[...@name='Database'[\]]/@connectionString

Value=Database=[TARGETDBNAME];Server=[TARGETDBSERVER];Integrated
Security=SSPI;
Action=setValue /
/Component

Component Id=WebConfigSqlDbSqlAuthComponent KeyPath=yes Guid=Blah
  ConditionNOT Installed AND NOT USEINTEGRATEDSECURITY = 1/Condition
  util:XmlFile Id=UpdateWebConfigSqlDbSqlAuth
File=[INSTALLLOCATION]\Web.config

ElementPath=/configuration/connectionStrings/add[...@name='Database'[\]]/@connectionString

Value=Database=[TARGETDBNAME];Server=[TARGETDBSERVER];uid=[TARGETDBUSERNAME];pwd=[TARGETDBUSERPASSWORD];
Action=setValue /
/Component

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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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 BlackBerryreg; 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#45;12, 2009. Register now#33;
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

2009-09-17 Thread Bob Arnson
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 BlackBerryreg; 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#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users