Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You don't need a custom action in this case. Use <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_directorysearch.htm" rel="nofollow">DirectorySearch</a> / <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_filesearch.htm" rel="nofollow">FileSearch</a> elements WiX provides out of the box. Besides, if that program leaves a trace in system registry, <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_registrysearch.htm" rel="nofollow">RegistrySearch</a> element is useful.</p> <p><strong>UPDATE</strong>: As far as I understand from your comments below, you have the ready-made function for detecting the path the main program was installed to, and you'd like to utilize this functionality to install extra add on there.</p> <p>You should author an immediate custom action (CA) which calls a function from a DLL and schedule it somewhere between AppSearch and LaunchConditions. This custom action should save the result into an <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa370889.aspx" rel="nofollow">MSI property</a>, for example, INSTALLLOCATION. This means if you have a function which returns a path, you might want to wrap it into another function (the actual CA) which will just save that value to INSTALLLOCATION property.</p> <p>You can then use this property in your directory structure like this:</p> <pre><code> &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt; &lt;Directory Id="INSTALLLOCATION" Name="my app"&gt; ... &lt;/Directory&gt; &lt;/Directory&gt; </code></pre> <p><strong>NOTE</strong>: Following this advice still requires some basic knowledge about Windows Installer and WiX, so I strongly recommend you to address <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/cc185688.aspx" rel="nofollow">MSDN</a> and <a href="http://wix.tramontana.co.hu/tutorial" rel="nofollow">WiX tutorial</a> for basics.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload