Thanks for all the replies.
I'd solved it by removing the Feature entirely & using a Condition for
the Component after adding the Component to the main Feature.
 
<Component Id="RibbitLink" Guid="myguid" >
  <Condition><![CDATA[LINKTORIBBIT = "True"]]></Condition>
  <IniFile Id="RibbitIniMod" Action="addLine" Key="IESVEInstallPath"
Name="ribbit.ini" Section="Directories" Directory="RIBBITINILOCATION"
Value="[appsFolder]" LongName="ribbit.ini" />
</Component>
 
Nothing else was changed in the XML & it now works as expected.
 
After much testing I do believe that the Level attribute for a Condition
tag under a Feature tag is bugged in the v2.0.4820.0 (stable) binaries.
 
Cheers,
 

 <http://www.iesve.com/> 

Palbinder Sandher 
Software Deployment and
IT Administrator 

T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 
http://www.iesve.com <http://www.iesve.com/> 

**Design, Simulate + Innovate with the <Virtual Environment>**

Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP

Email Disclaimer <http://www.iesve.com/disclaimer.html> 












 


________________________________

From: Don Tasanasanta [mailto:[EMAIL PROTECTED] 
Sent: 24 May 2007 02:19
To: Pally Sandher
Subject: reply to WiX question about feature selection



For some reason I can't reply to your original WiX e-mail.

 

Have you tried using the commands:

 

<Publish Event="Remove" Value="<feature name>">Property="<true>"
</Publish>

<Publish Event="AddLocal" Value="<feature name>">Property="<false>"
</Publish>

 

The remove will disable a feature and the addlocal will enable a feature
when used with a control.

________________________________

  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pally
Sandher
Sent: 23 May 2007 12:55
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Problems setting the Level of a Feature using
Condition


Hi,
I've been struggling for over a week trying to get this to work. I am
about ready to quit on the whole thing all together & just write a small
application to do this & use a CustomAction for it at the end of the
install process but I figure one last throw of the dice won't hurt &
hopefully someone on this list knows what I'm doing wrong.
 
For the record I'm using the v2 (stable) binaries. I will be upgrading
to v3 (dev) binaries after the impending software release is done.
 
What I want to achieve is that if the user has a different product
installed on their machine which ships with an earlier version of our
software, I want to prompt them to ask if they'd like to associate the
newer version of our software with that product. The method this employs
is simply an entry in an .ini file with the path to the binaries.
 
I can have my installer change the .ini file fine using a seperate
feature for it, I've tested it & it definitely works. The problem is
that I want to ask the user if they want this to be changed. If they
select yes then it should enable the feature, if they select no the
feature should stay disabled (it must be disabled for people who do not
have the product installed as they have nothing to change). What
actually happens is it never gets installed regardless of the feature
condition state.
 
The relevant parts of the code should be as follows:
 
<Component Id="RibbitLink" Guid="myguid">
  <IniFile Id="RibbitIniMod" Action="addLine" Key="IESVEInstallPath"
Name="ribbit.ini" Section="Directories" Directory="RIBBITINILOCATION"
Value="[TARGETDIR]apps\" LongName="ribbit.ini" />
</Component>
 
<Feature Id="RibbitLink" Level="1" Absent="allow" AllowAdvertise="no"
Description="Ribbit Link (user should not see this!)" Display="hidden"
Title="Ribbit Link">
  <Condition Level="0"><![CDATA[LINKTORIBBIT = "False"]]></Condition>
  <ComponentRef Id="RibbitLink" Primary="yes" />
</Feature>
 
<Property Id="RIBBITLOCATION">
  <RegistrySearch Id="RibbitLocationSearch" Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{theirguid}"
Type="raw" Name="InstallLocation" />
</Property>
<Property Id="RIBBITINILOCATION">
  <DirectorySearch Path="[RIBBITLOCATION]" Depth="0"
Id="RibbitDirSearch">
    <DirectorySearch Path="Program" Id="ProgramDirSearch" />
  </DirectorySearch>
</Property>
<Property Id="RIBBITINSTALLED">
  <RegistrySearch Id="RibbitInstallSearch" Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{theirguid}"
Type="raw" Name="DisplayVersion" />
</Property>
<Property Id="LINKTORIBBIT" Secure="yes"><![CDATA[False]]></Property>
 
<Control Id="Buttons" Type="RadioButtonGroup" X="20" Y="145" Width="330"
Height="40" Property="LINKTORIBBIT" />
 
<RadioButtonGroup Property="LINKTORIBBIT">
  <RadioButton Text="{\DlgFont8}Yes I want to use [ProductName] with
Ribbit." Value="True" X="5" Y="0" Width="320" Height="15" />
  <RadioButton Text="{\DlgFont8}No do not change my settings."
Value="False" X="5" Y="20" Width="320" Height="15" />
</RadioButtonGroup>
 
And from the install log (created using msiexec /lvx). The log was
created on my XP64 machine (hence the "Program Files (x86)" references)
but the behaviour is the same on XP32, Vista32 & Vista64 regardless.
 
Action start 11:18:03: AppSearch.
MSI (c) (18:D8) [11:18:03:340]: Note: 1: 2262 2: Signature 3:
-2147287038 
MSI (c) (18:D8) [11:18:03:340]: PROPERTY CHANGE: Adding RIBBITINSTALLED
property. Its value is '2008.0'.
MSI (c) (18:D8) [11:18:03:340]: Note: 1: 2262 2: Signature 3:
-2147287038 
MSI (c) (18:D8) [11:18:03:340]: PROPERTY CHANGE: Adding RIBBITLOCATION
property. Its value is 'C:\Program Files (x86)\Ribbit\'.
MSI (c) (18:D8) [11:18:03:340]: Note: 1: 2262 2: Signature 3:
-2147287038 
MSI (c) (18:D8) [11:18:03:340]: PROPERTY CHANGE: Adding
RIBBITINILOCATION property. Its value is 'C:\Program Files
(x86)\Ribbit\Program\'.
Action ended 11:18:03: AppSearch. Return value 1.
 
MSI (c) (18:2C) [11:18:16:439]: PROPERTY CHANGE: Modifying LINKTORIBBIT
property. Its current value is 'False'. Its new value: 'True'.
 
MSI (c) (18:D8) [11:18:18:185]: Switching to server: LINKTORIBBIT="True"
TARGETDIR="C:\Program Files (x86)\IES\VE 58\" RIBBITINSTALLED="2008.0"
COMPANYNAME="Integrated Environmental Solutions Limited" USERNAME="IT
Department" RIBBITLOCATION="C:\Program Files (x86)\Ribbit\"
RIBBITINILOCATION="C:\Program Files (x86)\Ribbit\Program\"
CURRENTDIRECTORY="D:\TEMP" CLIENTUILEVEL="0" CLIENTPROCESSID="2584"
SOURCEDIR="D:\TEMP\" ACTION="INSTALL" EXECUTEACTION="INSTALL"
ROOTDRIVE="D:\" SECONDSEQUENCE="1"
ADDLOCAL=apps,Apcalc4,L1_Example,NatVent1,Part_J_Dwelling,pipeviewexampl
e,manuals,Simulex,examples,ductview  
 
MSI (s) (60:60) [11:18:18:263]: Command Line: LINKTORIBBIT=True
TARGETDIR=C:\Program Files (x86)\IES\VE 58\ RIBBITINSTALLED=2008.0
COMPANYNAME=Integrated Environmental Solutions Limited USERNAME=IT
Department RIBBITLOCATION=C:\Program Files (x86)\Ribbit\
RIBBITINILOCATION=C:\Program Files (x86)\Ribbit\Program\
CURRENTDIRECTORY=D:\TEMP CLIENTUILEVEL=0 CLIENTPROCESSID=2584
SOURCEDIR=D:\TEMP\ ACTION=INSTALL EXECUTEACTION=INSTALL ROOTDRIVE=D:\
SECONDSEQUENCE=1
ADDLOCAL=apps,Apcalc4,L1_Example,NatVent1,Part_J_Dwelling,pipeviewexampl
e,manuals,Simulex,examples,ductview ACTION=INSTALL 
 
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Modifying LINKTORIBBIT
property. Its current value is 'False'. Its new value: 'True'.
 
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding TARGETDIR
property. Its value is 'C:\Program Files (x86)\IES\VE 58\'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding RIBBITINSTALLED
property. Its value is '2008.0'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding COMPANYNAME
property. Its value is 'Integrated Environmental Solutions Limited'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding USERNAME
property. Its value is 'IT Department'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding RIBBITLOCATION
property. Its value is 'C:\Program Files (x86)\Ribbit\'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding
RIBBITINILOCATION property. Its value is 'C:\Program Files
(x86)\Ribbit\Program\'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding CURRENTDIRECTORY
property. Its value is 'D:\TEMP'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding CLIENTUILEVEL
property. Its value is '0'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding CLIENTPROCESSID
property. Its value is '2584'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding SOURCEDIR
property. Its value is 'D:\TEMP\'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding ACTION property.
Its value is 'INSTALL'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding EXECUTEACTION
property. Its value is 'INSTALL'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding ROOTDRIVE
property. Its value is 'D:\'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding SECONDSEQUENCE
property. Its value is '1'.
MSI (s) (60:60) [11:18:18:263]: PROPERTY CHANGE: Adding ADDLOCAL
property. Its value is
'apps,Apcalc4,L1_Example,NatVent1,Part_J_Dwelling,pipeviewexample,manual
s,Simulex,examples,ductview'.
 
MSI (s) (60:60) [11:18:18:373]: Feature: RibbitLink; Installed: Absent;
Request: Null;   Action: Null

MSI (s) (60:60) [11:18:18:388]: Component: RibbitLink; Installed:
Absent;   Request: Null;   Action: Null
 
 
I have changed some identifiers to protect the innocent but the changes
should be consistent across all identifiers in both xml code & install
log.
 
I have no idea why this doesn't work as I expect it to. Any & all help
will be greatly appreciated.
 
In a related note I had to use a nested DirectorySearch to get the
directory in which the .ini file resides rather than a FileSearch as
FileSearch does not behave like it should. If I used FileSearch to
search for "ribbit.ini" it would set the property to "C:\Program Files
(x86)\Ribbit\Program\ribbit.ini\" which is clearly wrong (note the
trailing slash). That is when I leave the ID off as I want the Property
to be set to the parent directory as it states in the schema reference
so it shouldn't have the ribbit.ini on it either in that case. A bug
report exists for this on SourceForge as it appears to have been raised
in January by another user as this behaviour is also exhibited in the v3
code.
 
If any other parts of the xml or install log are required, let me know &
I shall do my best to provide them.
 
Thanks in advance,

 <http://www.iesve.com/> 

Palbinder Sandher 
Software Deployment and
IT Administrator 

T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 
http://www.iesve.com <http://www.iesve.com/> 

**Design, Simulate + Innovate with the <Virtual Environment>**

Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP

Email Disclaimer <http://www.iesve.com/disclaimer.html> 












 
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to