I am trying to create a virtual directory on a Website which has a port
specified by a property called PORT. If PORT is 80, I create the directory
on the existing DefaultWebSite.  If PORT is not 80, I create a website with
that port, then create the virtual directory.  Installation and
uninstallation work fine if PORT is not 80 (the newly created website gets
deleted upon uninstall).  However, when the PORT is 80, the Default Web Site
gets deleted on uninstall.  Here's my code:

<Directory Id='TARGETDIR' Name='SourceDir'>
      <Component Id='CreateVirtualDirectory'
Guid='220FE049-2781-4A99-93DA-68B97E999E81'>
        <Condition><![CDATA[ THINCTRAX_PORT = 80 ]]></Condition>
        <WebVirtualDir Id='VirtualDirectory' Alias='[THINCTRAX_ALIAS]'
Directory='THINCTRAXDIR' WebSite='DefaultWebSite'>
          <WebApplication Id='WebApplication' Name='thincTrax'>
          </WebApplication>
        </WebVirtualDir>
      </Component>

      <Component Id='CreateVirtualDirectoryOnNewWebsite'
Guid='220FE049-2781-4A99-93DA-68B97E999E81'>
        <Condition><![CDATA[ THINCTRAX_PORT <> 80 ]]></Condition>
        <WebSite Id='thincTraxOnNewWebsite' Description='thincTrax'
Directory='THINCTRAXDIR' ConfigureIfExists='no' AutoStart='yes'
StartOnInstall='yes'   >
          <WebAddress Id='thincTraxAddress' Port='[THINCTRAX_PORT]'/>
        </WebSite>
        <WebVirtualDir Id='VirtualDirectoryOnNewWebsite'
Alias='[THINCTRAX_ALIAS]' Directory='THINCTRAXDIR'
WebSite='thincTraxOnNewWebsite'>
          <WebApplication Id='WebApplicationOnNewWebsite' Name='thincTrax'>
          </WebApplication>
        </WebVirtualDir>
      </Component>
</Directory>

    <WebSite Id='DefaultWebSite' Description='Default Web Site'>
      <WebAddress Id='DefaultWebSite' Port='80'/>
    </WebSite>

Is this the expected behaviour?  Thanks in advance.

Justin

-- 
View this message in context: 
http://n2.nabble.com/Default-website-gets-removed-on-Uninstall-tp731259p731259.html
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to