开发者

How do you get the default IIS Directory in a Wix install package?

I Would like to set my default install location in Wix to go the default IIS directory

usually C:\inetpub\wwwroot\

in the XML i have

<Directory Id="TARG开发者_StackOverflow社区ETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLLOCATION" Name="myProduct">

I Assume i can change either the ProgramFilesFolder directory the the TARGETDIR to one that matches with an IIS property. (in case the default location is moved on a machine)

What would that be?


You can use a registry search to find the location:

<Property Id="INSTALLLOCATION"> 
    <RegistrySearch Id="FindInetPubFolder" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="PathWWWRoot" Type="directory" /> 
</Property>

But I would caution you that I don't typically do this. I tend to either create new websites or new virtual directories and use use ProgramFiles\Company\Product\WebSites\WebSite as where I put my files. This allows safer integration with whatever other web sites that might also exist on the box.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜