Are you passing your port number in at uninstall? Does your port in your 
properties have a default value? Because your Virtual Directory and website are 
in the same component, and your GUID for both are the same, I think it is 
uninstalling the second component with the site creation. Look at using 
separate GUIDs ( so if just the VDir is installed, it is the one removed) or 
storing the Port number in the registry (or passing it in on uninstall).

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j-mauger
Sent: Monday, August 18, 2008 10:09 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Default website gets removed on Uninstall


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


-------------------------------------------------------------------------
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