[wix-users] IIS configuration issue

Laique Abbas laiqueabbas_is at yahoo.com
Mon Oct 3 03:05:34 PDT 2016

This is my registry configuration file.
<Property Id="REG_WEBSITE_NAME" Value="Default Web Site" >    <RegistrySearch Id="WEB_WEBSITE_NAME_Remembered" Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WEBSITE_NAME" Type="raw" />  </Property>  <Property Id="REG_VIRTUAL_DIR_VAL" Value="AfinitiPortal" >    <RegistrySearch Id="VIRTUAL_DIR_VAL_Remembered" Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="VIRTUAL_DIR_VAL" Type="raw" />  </Property>  <Property Id="REG_WEB_APP_NAME" Value="AfinitiPortalAppPool" >    <RegistrySearch Id="WEB_APP_NAME_Remembered" Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WEB_APP_NAME" Type="raw" />  </Property>  <Property Id="REG_WEB_APP_POOL_IDENTITY_DOMAIN">    <RegistrySearch Id="WEB_APP_POOL_IDENTITY_DOMAIN_Remembered" Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WebApp_PoolIdentityDomain" Type="raw" />  </Property>  <Property Id="REG_WEB_APP_POOL_IDENTITY_NAME" Value="Administrator" >    <RegistrySearch Id="WEB_APP_POOL_IDENTITY_NAME_Remembered" Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WebApp_PoolIdentityUsername" Type="raw" />  </Property>
  <!-- This is the compnent that actually writes the values to the registry on install -->  <Component Id="C_RegistryEntries" Directory="SATMAPPORTAL"> <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WEBSITE_NAME"             Type="string" Value="Default Web Site"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="VIRTUAL_DIR_VAL"                  Type="string" Value="[VIRTUAL_DIR_VAL]"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WEB_APP_NAME"               Type="string" Value="[WEB_APP_NAME]"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WebApp_PoolIdentityDomain"     Type="string" Value="[WEB_APP_POOL_IDENTITY_DOMAIN]"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="WebApp_PoolIdentityUsername"   Type="string" Value="[WEB_APP_POOL_IDENTITY_NAME]"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal" Name="Port"   Type="string" Value="80"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal"  Type="string" Name="InstallationDirectory" Value="[INSTALLFOLDER]"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal"  Type="string" Name="Name" Value="Satmap Portal - $(var.Version)"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal"  Type="string" Name="Version" Value="$(var.Version)"/>    <RegistryValue Root="HKCU" Key="SOFTWARE\Afiniti\Afiniti Portal\RegistryPortal"  Type="string" Name="FullPath" Value="[SATMAPPORTAL]"/>  </Component>
  <!-- These CustomActions set the property that are used for the install from the registry values (These actions are only run under the conditions in the sequences below) -->  <CustomAction Id='SetWebAppName'                    Property='WEBSITE_NAME'                     Value='[REG_WEBSITE_NAME]'/>  <CustomAction Id='SetVirtualDirectory'              Property='VIRTUAL_DIR_VAL'                  Value='[REG_VIRTUAL_DIR_VAL]'/>  <CustomAction Id='SetWebAppPoolName'                Property='WEB_APP_NAME'                Value='[REG_WEB_APP_NAME]'/>  <CustomAction Id='SetWebAppPoolIdentityDomain'      Property='WEB_APP_POOL_IDENTITY_DOMAIN'     Value='[REG_WEB_APP_POOL_IDENTITY_DOMAIN]'/>  <CustomAction Id='SetWebAppPoolIdentityUsername'    Property='WEB_APP_POOL_IDENTITY_USERNAME'   Value='[REG_WEB_APP_POOL_IDENTITY_NAME]'/>
  <!-- The CustomActions above that set the variables used in the installation are only run if they were not supplied by the command line -->  <InstallUISequence>  <Custom Action='SetWebAppName'                  After='AppSearch'>REG_WEBSITE_NAME                      AND (NOT WEBSITE_NAME)</Custom>    <Custom Action='SetVirtualDirectory'            After='AppSearch'>REG_VIRTUAL_DIR_VAL                   AND (NOT VIRTUAL_DIR_VAL)</Custom>    <Custom Action='SetWebAppPoolName'              After='AppSearch'>REG_WEB_APP_NAME                 AND (NOT WEB_APP_NAME)</Custom>    <Custom Action='SetWebAppPoolIdentityDomain'    After='AppSearch'>REG_WEB_APP_POOL_IDENTITY_DOMAIN      AND (NOT WEB_APP_POOL_IDENTITY_DOMAIN)</Custom>    <Custom Action='SetWebAppPoolIdentityUsername'  After='AppSearch'>REG_WEB_APP_POOL_IDENTITY_USERNAME    AND (NOT WEB_APP_POOL_IDENTITY_USERNAME)</Custom>  </InstallUISequence>  <InstallExecuteSequence>    <!-- After='RemoveExistingProducts' is used under this sequence because of the use of MajorUpgrades -->    <Custom Action='SetWebAppName'                  After='RemoveExistingProducts'>REG_WEBSITE_NAME                     AND (NOT WEBSITE_NAME)</Custom>    <Custom Action='SetVirtualDirectory'            After='RemoveExistingProducts'>REG_VIRTUAL_DIR_VAL                  AND (NOT VIRTUAL_DIR_VAL)</Custom>    <Custom Action='SetWebAppPoolName'              After='RemoveExistingProducts'>REG_WEB_APP_NAME                AND (NOT WEB_APP_NAME)</Custom>    <Custom Action='SetWebAppPoolIdentityDomain'    After='RemoveExistingProducts'>REG_WEB_APP_POOL_IDENTITY_DOMAIN     AND (NOT WEB_APP_POOL_IDENTITY_DOMAIN)</Custom>    <Custom Action='SetWebAppPoolIdentityUsername'  After='RemoveExistingProducts'>REG_WEB_APP_POOL_IDENTITY_USERNAME   AND (NOT WEB_APP_POOL_IDENTITY_USERNAME)</Custom>  </InstallExecuteSequence> 

    On Monday, October 3, 2016 2:58 PM, Laique Abbas <laiqueabbas_is at yahoo.com> wrote:

 Issue still exists. I think something is wrong while uninstalling. any help?  

    On Friday, September 30, 2016 6:23 PM, Phill Hogland <phill.hogland at rimage.com> wrote:

 #yiv6364937853 -- .yiv6364937853EmailQuote {margin-left:1pt;padding-left:4pt;border-left:#800000 2px solid;}#yiv6364937853 #yiv6364937853 --p {margin-top:0;margin-bottom:0;}#yiv6364937853 I have not done what you are asking, but I suspect from the documentation for iis:WebSite (notice the Remarks in the CHM) that the issue is related to the keypath of component in which that code snippet is in.  It sounds to me like you need to put the code that finds the existing WebSite under Product, Fragment, or Module and the elements related to the VirtualDirectory under a different Component.
While this is the correct place to ask user questions for the WixToolset and there are probably others here who may volunteer to help you, there are of course other options so this is not the last option.  One option is to search the old wix-users forum on nabble.com (but I would not post to those discontinued forums)  But they are a great research resource.  A quick search found the following link which seems to address the question you raised (and you may find other posts in that forum).  And there are other sources of assistance like those available at Firegiant.com.
| wix-users - Default website gets removed on Uninstallwindows-installer-xml-wix-toolset.687559.n2.nabble.comDefault 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 ... |

From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Laique Abbas <laiqueabbas_is at yahoo.com>
Sent: Friday, September 30, 2016 6:15:51 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] IIS configuration issue 
This forum is my last hope. Kindly help me out. IIS settings aren't working for my installer when uninstalling the product . I have made a installer that searches for default web site and then make an app pool and virtual directory. I have saved the app pool and virtual directory values in registry too. Everything is working fine except that when i uninstall it completes the uninstallation and then when i go to the IIS manager, my Default web site have a red cross icon on it and the virtual directory is also listed in it though it should have been deleted. while clicking the Default Web Site it shoes an error as "The application / does not exist". I am pasting some relevant snippets here. Kindly point out that where i am wrong.
    <iis:WebSite Id="DefaultWebSite" Description="Default Web Site" SiteId="*">      <iis:WebAddress Id="AllUnassigned" Port="80"/>    </iis:WebSite>
    <DirectoryRef Id="INSTALLFOLDER">      <!-- Configuring app pool -->      <Component Id="WebAppCmp"                 Guid="{79D1CA2C-8D20-4F0B-9AE5-BD6AECBF35E4}"                 KeyPath="yes">         <util:User Id="WebAppPoolUser" CreateUser="no" Name="[WEB_APP_POOL_IDENTITY_NAME]"                          Password="[WEB_APP_POOL_IDENTITY_PWD]" Domain="[WEB_APP_POOL_IDENTITY_DOMAIN]"/>
        <iis:WebAppPool Id="WebAppPool"                        Name="[WEB_APP_NAME]"                        Identity="other"                        User="WebAppPoolUser"                         ManagedRuntimeVersion="v4.0"                        ManagedPipelineMode="integrated"/>
          <iis:WebVirtualDir Id="My.VirtualDir" Alias="[VIRTUAL_DIR_VAL]" Directory="INSTALLFOLDER" WebSite="DefaultWebSite">
          <iis:WebDirProperties Id="VirtDirProperties"                                AnonymousAccess="yes"                                BasicAuthentication="no"                                WindowsAuthentication="yes" />
          <iis:WebApplication Id="Application" Name="[VIRTUAL_DIR_VAL]" WebAppPool="WebAppPool"/>
        </iis:WebVirtualDir>        </Component>    </DirectoryRef>  </Fragment>

Above is the code placed in IISConfiguration file.Below i added the component in a feature.
    <Feature Id="IISWebsite" Title="IIS Website" Description="The IIS website and application pool" Level="1">      <ComponentRef Id="WebAppCmp" />    </Feature>
While it works great when i put the below lines inside the mentioned component in IISConfiguration file. But by this it deletes the Default website too which I dont want too. Hide original message
    <iis:WebSite Id="DefaultWebSite" Description="Default Web Site" SiteId="*">      <iis:WebAddress Id="AllUnassigned" Port="80"/>    </iis:WebSite>

WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list