Tuesday, October 28, 2008

Almost there... Stay on target...

Getting closer to getting the first general WiX task done.

I now have WiX creating my user, adding that user to the Administrators group (No comments from the peanut gallery, please!) and then creating a custom AppPool and creating a Web Application that is bound to that custom AppPool with a created VDir. Pretty nifty.

Here is what it looks like so far:



   1:  <Component Id="MySoftwareRequirements" Guid="{SOME-VALID-GUID}">

   2:    <CreateFolder/>

   3:    <util:User Id="MySoftwareUser" Name="MySoftwareUser" Password="supersekrit">

   4:      <util:GroupRef Id="Administrators"/>

   5:    </util:User>

   6:    <iis:WebSite Id          = "DefaultWebSite" 

   7:                 Description = "DefaultWebSite"

   8:                 Directory   = "MySoftwareSubDir">

   9:      <iis:WebAddress Id = "AllUnassigned" Port="80" />

  10:        <iis:WebDirProperties Id                    = "WebVirtualDirProperties"

  11:                              Execute               = "yes"

  12:                              Script                = "yes"

  13:                              Read                  = "yes"

  14:                              WindowsAuthentication = "no"

  15:                              AnonymousAccess       = "yes"

  16:                              AnonymousUser         = "MySoftwareUser"

  17:                              IIsControlledPassword = "no" />

  18:    </iis:WebSite>

  19:    <iis:WebAppPool Id="MySoftware" Identity="other" Name="MySoftware" User="MySoftwareUser"/> 

  20:    <iis:WebVirtualDir Id            = "MySoftwareVDir"

  21:                       Alias         = "MySoftwareVDir" 

  22:                       Directory     = "MySoftwareSubDir" 

  23:                       WebSite       = "DefaultWebSite"

  24:                       DirProperties = "WebVirtualDirProperties">

  25:      <iis:WebApplication Id         = "WebApplication"

  26:                          Name       = "MySoftware"

  27:                          WebAppPool = "MySoftware" />

  28:    </iis:WebVirtualDir>

  29:  </Component>



Of course, you can't see the reference to the Administrators group that is up at the top of the .wxs file under the Package element (see previous post). It is starting to come together.

No comments: