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] 
Sent: 17 January 2013 17:16
To: wix-users@lists.sourceforge.net
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 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/learnmore_122712
_______________________________________________
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 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

Reply via email to