Component conditions are evaluated in CostFinalize. Is your property being
set before CostFinalize ?

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com] 
Sent: 24 January 2013 07:30
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] conditional serviceinstall / msi property question

I think the problem is the quotes around the 1 and 0, I would just do
SKIPSERVICEINSTALL=1 and SKIPSERVICEINSTALL=0.

Neil

-----Original Message-----
From: Joe Damato [mailto:j...@boundary.com]
Sent: 24 January 2013 01:09
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] conditional serviceinstall / msi property question

Hi -

I started with a working MSI that installs some DLLs, an EXE, and did a
ServiceInstall. Everything worked great.

Now, I want to conditionally do a ServiceInstall depending on an MSI Property
that gets set during a custom action.

I have two components:

<Component Id="someBlah_noservice" Guid="SOMEGUIDHERE">
  <Condition>SKIPSERVICEINSTALL = "1"</Condition>
  <File Id="someblah_noservice" Name="blah.exe" DiskId="1" Source="..."
KeyPath="yes"/>
</Component>

and

<Component Id="someBlah" Guid="SOME_OTHER_GUID_HERE">
  <Condition>SKIPSERVICEINSTALL = "0"</Condition>
  <File Id="someblah" Name="blah.exe" DiskId="1" Source="..."
KeyPath="yes"/>
  <ServiceInstall Id="ServiceInstaller" ....... />
  <ServiceControl Id=".." .... />
</Component>

and then:

<Feature Id="someBlah" Title="..." Level="1">
  ...
  <ComponentRef Id="someBlah"/>
  <ComponentRef Id="someBlah_noservice"/> </Feature>

The MSI log shows that the property value of SKIPSERVICEINSTALL is set to "1"
(or "0" depending on what I'm trying to do) correctly, HOWEVER, _neither_
component is installed. In other words, the install "completes successfully"
but there is no blah.exe written to the filesystem regardless of whether I
attempt to skip the service install or not.

So, I believe something about the way I'm trying to do this is wrong and the
MSI isn't "seeing" or checking the SKIPSERVICEINSTALL property value and thus
neither component ends up getting installed.

Any hints are greatly appreciated,
Joe
-----------------------------------------------------------------------------
-
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC,
Windows 8 Apps, JavaScript and much more. Keep your skills current with
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and
experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-----------------------------------------------------------------------------
-
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC,
Windows 8 Apps, JavaScript and much more. Keep your skills current with
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and
experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to