我尝试将Web应用程序安装到虚拟目录中,即“c:\ Inetpub \ XYZ”。但它安装到“D:\ XYZ”或Mysource目录是“D:\”。任何正文都可以帮助我安装到IIS虚拟目录(“C:\ Inetpub \ XYZ”)中的网站位置(XYZ)。
<Directory Id="INSTALLDIR" Name="XYZ">
<Component Id="VirtualDirectoryComponent" Guid="DED95D72-52AE-4258-9D50-687E65449F95">
<CreateFolder />
<iis:WebVirtualDir Id="My.VirtualDir" Alias="[WEB_APP_NAME]" Directory="INSTALLDIR" WebApplication="" WebSite="DefaultWebSite">
<iis:WebApplication Id="Application" Name="[WEB_APP_NAME]" />
<iis:WebDirProperties Id="WebSite_Properties" AnonymousAccess="yes" WindowsAuthentication="no" DefaultDocuments="Default.aspx" Script="yes"
Read="yes" />
</iis:WebVirtualDir>
</Component>
</Directory>
</Directory>
答案 0 :(得分:0)
尝试使用以下
替换目录Directory Id='TARGETDIR' Name='SourceDir'>
<!-- Install into the ISS root directory -->
<Directory Id="IISROOT" Name='WebDir'>
<!-- Here's this installers install location. -->
<Directory Id='INSTALLDIR' Name='XYZ'></Directory>
</Directory>