Thanks for that, it now writes to the correct place if SQL is installed. It now seems that the condition is not being applied correctly if SQL is not installed and it is installing in c:\ISSQLSERVERSERVICEINSTALLED
<Feature Id="SSISMSSQL" Title="SSIS Components" Display='expand' Level='1' ConfigurableDirectory='ISSQLSERVERSERVICEINSTALLED'> <ComponentRef Id='SSISComponents' /> <Condition Level='1'>ISSQLSERVERSERVICEINSTALLED</Condition> </Feature> Apologies for the numpty questions, but this is the first time I've had to make my install very clever. Martin ---------------------------------------- Subject: RE: [WiX-users] Installing files for MS SQL folder only if SQL ispresent Use ISSQLSERVERSERVICEINSTALLED as the directory ID rather than the name. Set the Name as the default directory name It's the same way as you'd use INSTALLDIR (if you're familiar with the convention) but setting the value from a registry search instead of on the command line. If it doesn't work, check the registry value contains a full path. If it doesn't, try adding directory entries surrounding the ISSQLSERVERSERVICEINSTALLED element to provide the reset of the path. -----Original Message----- From: Martin Johnson [mailto:mjohn...@mpjconsultancy.com] Subject: [WiX-users] Installing files for MS SQL folder only if SQL ispresent I am attempting to set a property to a registry entry, I have looked at the install log and it is set. I am then attempting to write files to a subfolder of that property, what I actually achieve is to write it to a subfolder of a folder name ISSQLSERVERSERVICEINSTALLED, i.e. the property id rather than its value. I am only expecting this to be done if the registry entry exists i.e. SQL is installed, it is writing the files whether or not SQL is installed. Hopefully the following snippets give enough information, any hints tips or suggestions welcomed. <Property Id="ISSQLSERVERSERVICEINSTALLED"> <RegistrySearch Id="SQLInstalledInstances" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\100" Name="VerSpecificRootDir" Type="raw" /> </Property> <Directory Id="MSSQL_SSIS" Name="ISSQLSERVERSERVICEINSTALLED"> <Directory Id="DTS" Name="DTS"> <Directory Id="PIPELINECOMPONENTS" Name="PipelineComponents"> <Component Id="SSISComponents" Guid="ef1c1033-f78a-4505-a042-d10cd8395053"> <File Id="ID1" Name="1.dll" DiskId="1" KeyPath="yes" Source="..\..\API\DotNet\Assemblies\v3.5\1.dll" /> <File Id="ID2" Name="2.dll" DiskId="1" KeyPath="no" Source="..\..\API\DotNet\Assemblies\v3.5\2.dll" /> </Component> </Directory> </Directory> </Directory> <Feature Id="SSISMSSQL" Title="SSIS Components" Display='expand' Level='1' ConfigurableDirectory='MSSQL_SSIS'> <ComponentRef Id='SSISComponents' /> <Condition Level='1'>ISSQLSERVERSERVICEINSTALLED</Condition> </Feature> Thanks Martin ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users