1. I ended up calling aspnet_regiis from a custom action (if there is a 
better way, someone speak up):

    <PropertyRef Id="NETFRAMEWORK20INSTALLROOTDIR"/>

    <!-- Ideally we would use -r with a metabase path, but we would need 
some way of getting that information; maybe add that step as an addition 
to the IIS extension -->
    <CustomAction Id="SetAspNet20_Cmd" Property="SetAspNet20" 
Value="&quot;[NETFRAMEWORK20INSTALLROOTDIR]aspnet_regiis.exe&quot; -ir 
-enable"/>

    <CustomAction Id="SetAspNet20" BinaryKey="WixCA" 
DllEntry="CAQuietExec" Execute="deferred" Return="check"/>

    <InstallExecuteSequence>
      <Custom Action="SetAspNet20_Cmd" Before="CostFinalize">NOT 
(SKIPCONFIGUREIIS OR Installed) AND VersionNT > 400</Custom>
      <Custom Action="SetAspNet20" Before="ConfigureIIs">NOT 
(SKIPCONFIGUREIIS OR Installed) AND VersionNT > 400</Custom>
    </InstallExecuteSequence>

Note that I set the script maps by hand using WiX akin to the following:

              <iis:WebApplicationExtension Extension="aspx" 
Executable="[NETFRAMEWORK20INSTALLROOTDIR]aspnet_isapi.dll" 
Verbs="GET,HEAD,POST" CheckPath="no" Script="yes"/>

Note that the NETFRAMEWORK20INSTALLROOTDIR property requires the Wix 
NetFx Extension; you can search for it yourself, but why?  :-)

2.  I used util:PermissionEx elements as a child of a CreateFolder 
element associated with the target of the virtual directory:

            <util:PermissionEx User="ASPNET" Domain="[ComputerName]" 
Type="allow" ApplyToSelf="yes" ApplyToSubfolders="yes" ApplyToFiles="no" 
Read="yes" ReadAttributes="yes" ReadExtendedAttributes="yes" 
ReadPermission="yes" Synchronize="yes" Traverse="yes"/>
            <util:PermissionEx User="ASPNET" Domain="[ComputerName]" 
Type="allow" ApplyToSelf="yes" ApplyToSubfolders="yes" 
ApplyToFiles="yes" Read="yes" ReadAttributes="yes" 
ReadExtendedAttributes="yes" ReadPermission="yes" Synchronize="yes"/>

That snippet gives ".\ASPNET" Read and Traverse Folder privileges.  At 
some point, I may add an improvement to handle that with a single 
element (and thus differentiate Traverse and Execute depending upon 
ApplyToFiles).

Note that it is much safer to use [ComputerName] instead of leaving out 
the Domain attribute entirely (except for well known accounts) or "."; 
things may work on XP / 2K, but then fail on Vista / 2K3.

3.  Use iis:WebDirProperties:

            <iis:WebDirProperties Id="<Id>" 
DefaultDocuments="myproductsname.aspx"/>

Unfortunately, I couldn't find any reference to MD_DIRECTORY_BROWSING 
(which is a set of flags that controls the "Enable Default Document" 
setting, along with various aspects of directory browsing); you should 
look for a feature request in the issue tracker and add it if it is not 
there.  Hopefully, someone else or I will get to it in the near future.

I noticed that a setting of "-" will clear the default documents 
(undocumented); it also looks like the default documents will get set 
(the code does not append them to any existing default documents), so 
you should have full control over the ordering.

Thanks,

Thomas S. Trias
Senior Developer
Artizan Internet Services
http://www.artizan.com/



-------- Original Message  --------
Subject: [WiX-users] IIS virtual web directory modification/settings
From: John Trump <john_tr...@symantec.com>
To: <wix-users@lists.sourceforge.net>
Date: 4/14/2009 2:28 PM
> I need to accomplish the following install tasks using WiX:
>
>  
>
> 1. Set ASP.NET version to 2.0.50727
>
>  
>
> 2. Set security for virtual web directory
>
>       a. Add the following users:
>
>             i. <MachineName>\ASPNET  (for example MyServer\ASPNET)
>
>             ii. <MachineName>\IIS_WPG  (for example MyServer\IIS_WPG)
>
>  
>
> 3. Set default content page
>
>       a. "Enable default content page"
>
>       b. set to <myproductsname>.aspx
>
> c. In the list of pages, it needs to be the top entry.
>
>  
>
> Any ideas would be appreciated.
>
>  
>
> Thanks,
>
>  
>
> John Trump
>
>  
>
>
>   


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to