Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add condition in component?
    primarykey
    data
    text
    <p>My requirement is to add below mentioned scenarios in same installer.</p> <ol> <li>Create a virtual directory under default web site if IIS version is 5.1</li> <li>Create a new web site if IIS version is equal to or greater than 6.</li> </ol> <p>I added code as given below but it is not working.</p> <pre><code> &lt;DirectoryRef Id="ServDir"&gt; &lt;Directory Id="ServerWebDIR" Name="$(var.Manufacturer_WWW_LONG_DIRNAME)"&gt; &lt;Component Id="$(var.ServerWeb_Id)" Guid="$(var.ServerWeb_Component_GUID)"&gt; &lt;File Id="FLSW_admin.html" DiskId="1" Name="admin.html" Source="$(var.SERVER_wwwDir)admin.html" /&gt; &lt;RemoveFolder Id="FLSW_admin.html On="uninstall" /&gt; &lt;/Component&gt; &lt;/Directory&gt; &lt;Component Id="TestWebVirtualDirComponent" Guid="{F509D5DC-3F13-4AAF-974E-0D7EF82EE4B2}"&gt; &lt;Condition&gt;IISMAJORVERSION = "#5"&lt;/Condition&gt; &lt;CreateFolder/&gt; &lt;iis:WebVirtualDir Id="WebDir" Alias="$(var.VirtualDirAlias)" Directory="ServerWebDIR" WebSite="DefaultWebSite" DirProperties="WebDirProperty"&gt; &lt;iis:WebApplication Id="TestWebApplication" Name="$(var.VirtualDirAlias)"/&gt; &lt;/iis:WebVirtualDir&gt; &lt;/Component&gt; &lt;Component Id="WebSite" Guid="{F509D5DC-3F13-4AAF-974E-0D7EF82EE4B3}"&gt; &lt;Condition&gt;IISMAJORVERSION &gt;= "#6"&lt;/Condition&gt; &lt;CreateFolder /&gt; &lt;iis:WebSite Id="WebSiteFolder" Description="$(var.EnterpriseWebSiteDescription)" Directory='ServerWebDIR'&gt; &lt;iis:WebAddress Id="AllUnassigned" Port="80" /&gt; &lt;/iis:WebSite&gt; &lt;/Component&gt; &lt;/DirectoryRef&gt; &lt;iis:WebDirProperties Id="WebDirProperty" Execute="yes" Script="yes" Read="yes" /&gt; &lt;iis:WebDirProperties Id="WebDirPropertyForbidExecution" Execute="no" Script="yes" Read="yes" /&gt; &lt;iis:WebSite Id="DefaultWebSite" Description="Default Web Site" &gt; &lt;iis:WebAddress Id="AllUnassigned1" Port="80" /&gt; &lt;/iis:WebSite&gt; </code></pre> <p>What is the problem with my code. Please anyone suggests that how to achieve my requirement in same installer?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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