Okay, I was missing a conditional invocation of the custom action to set the
variable and the variable must be enclosed in [ ] in the setting custom
action. This final code works:

  <Fragment>
    <Property Id="VS12_ROOT_FOLDER_EXISTS" Secure="yes">
      <RegistrySearch Id="SearchForVS12RootPath" Root="HKLM"
Key="Software\Microsoft\VisualStudio\SxS\VS7" Name="12.0" Type="raw" />
    </Property>
    <CustomAction Id="SetVS12_ROOT_FOLDER" Directory="VS12_ROOT_FOLDER"
Value="[VS12_ROOT_FOLDER_EXISTS]" />
    <InstallExecuteSequence>
      <Custom Action="SetVS12_ROOT_FOLDER" Before="InstallFiles"
Overridable="yes">VS12_ROOT_FOLDER_EXISTS</Custom>
    </InstallExecuteSequence>
  </Fragment>



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/problem-with-conditional-component-tp7588732p7588818.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to