Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 351459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:38:44+00:00 2026-05-12T11:38:44+00:00

What I would like to do is show the installer user a list of

  • 0

What I would like to do is show the installer user a list of the websites on their server and allow them to choose one (using the method described here: http://www.cmcrossroads.com/content/view/13160/120/, which now seems broken see here for the core code). The installer would then create a virtual directory in the chosen website.

However, my searching seems to have revealed that the only way to specify a website in WiX is by IP, Port, and Header. Asking for these is not very user friendly, so I’m left with the idea of writing a second custom action to get those details from a website name.

Is there a better way?

BTW This needs to work in both IIS6 and IIS7 in case that affects the answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:38:45+00:00Added an answer on May 12, 2026 at 11:38 am

    OK it is possible (in IIS6 or IIS7 with Metabase compatibility), thanks to this post to the mailing list explaining the slightly bizarre way the iis:Website element works. The useful part is:

    Using a fragment like this and test with v3.0.5120.0:*
    
      <iis:WebSite Id="WebSite" Description="Default Web Site" SiteId="*">
        <iis:WebAddress Id="TestWebSite" Port="1" />
      </iis:WebSite>
    
    The following work:
    
    1. If WebSite/@SiteId="*" then a case sensitive match on WebSite/@Description happens.
    2. If WebSite/@SiteId matches the site id than WebSite/@Description is ignored and a match on site id happens.
    3. If WebSite/@SiteId has any value WebAddress/@Port is ignored (although the syntax requires it and it can't be 0).
    4. If WebSite/@SiteId is missing WebAddress/@Port is used and WebSite/@Description is ignored.
    5. Once a website is created and gets site id, you can rename it (therefore its site id is not the hash of its name), the WebSite/@SiteId="*" syntax will match on the WebSite/@Description.
    

    So my WiX code ends up looking like:

    <DirectoryRef Id="TARGETDIR">
      <Component Id="IisSetup" Guid="YOUR-GUID-HERE">
        <iis:WebVirtualDir Id="IisVirtualDir" Alias="[IIS_VIRTUALDIRNAME]" Directory="INSTALLLOCATION" WebSite="IisWebsite">
          <iis:WebApplication Id="IisWebApplication" Name="[IIS_VIRTUALDIRNAME]" WebAppPool="IisAppPool" Isolation="high"/>
        </iis:WebVirtualDir>
        <iis:WebAppPool Id="IisAppPool" Name="[IIS_APPPOOLNAME]" Identity="networkService"/>
      </Component>
    </DirectoryRef>
    
    <!-- Note that this entry should not be put under a component. If it is WiX
         will update the website on install and remove it on uninstall -->
    <iis:WebSite Id="IisWebsite" Description="[IIS_WEBSITENAME]" SiteId="*">
      <iis:WebAddress Id="IisWebAddress" Port="80" />
    </iis:WebSite>
    

    The iis:WebAddress element should never be used but is necessary for the project to compile.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 237k
  • Answers 237k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For brakepoints to work you need to make your workflow… May 13, 2026 at 6:32 am
  • Editorial Team
    Editorial Team added an answer Thanks to Bart's answer and all of your comments. Inspired… May 13, 2026 at 6:32 am
  • Editorial Team
    Editorial Team added an answer I managed to solve this problem by overriding the standard… May 13, 2026 at 6:32 am

Related Questions

I have a form which users must fill out and submit. The controller action
I would like to deploy a .inf based USB driver with my installer. I
I want another developer to run a Perl script I have written. The script
I have an In-house windows form app that I would like to use Spell

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.