I'm trying to build a WIX installer, which allows the user to specify the install path through command line arguments.
<Property Id="IISROOTPATH">
<RegistrySearch Id="FindInetPubFolder" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="PathWWWRoot" Type="directory" />
</Property>
...
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="IISROOTPATH">
<Directory Id="INSTALLPATH" Name="WebsiteFolder">
...
If the user doesn't pass in any arguments, it will look up registry for the iisroot folder, and install the files under a folder called "WebsiteFolder"
But in order for the user to change the install path, they must pass in an absolute path eg
INSTALLPATH="C:\InetPub\wwwroot\CustomWebsiteFolder"
How does this work? does it then ignore the other Directory elements TARGETDIR and IISROOTPATH?
How can I change INSTALLPATH to just WEBSITEFOLDERNAME so the user is only required to pass in the folder name rather than the absolute install path. Thus forcing the user to always install into inetpub?
You should understand the Directory table - the MSI concept behind the Directory element. The best explanation I've ever met is a set of Rob's articles (the link is to the part 1, there are 6 parts, if I remember correctly).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With