I'm having this exact issue and it's now 2010!  I found that I can get the
root of the web tree into a property like this:
        
<Property Id="WWWROOT">
    <RegistrySearch Id='REG_WWWROOT' Type='directory' Root='HKLM'
Key='SOFTWARE\Microsoft\InetStp' Name='PathWWWRoot' />
</Property>

but (and there's always a but): on Vista, Microsoft apparently screwed up
this registry entry.  It now contains

%SystemDrive%\inetpub\wwwroot

but the environment variable is still type REG_SZ instead of REG_EXPAND_SZ. 
This caused the IIS configuration custom action provided with InstallShield
11 (and maybe later) to croak, so at that time, I had to write a custom
action to "fix" this registry entry, perform the install, and put it back
afterwards.  Yuk.  

This annoyance, along with a complete lack of responsiveness from
InstallShield regarding this problem (their custom action DLL is opaque and
can't be fixed by their customers) is one reason we are switching to WiX.

Anyway, the registry type problem (REG_SZ vs REG_EXPAND_SZ) seems to be
fixed in Windows 7 and Win2008R2 (don't know about Win2008), but there's
another issue -- a Win2003R2 server that a colleague is testing has this
PathWWWRoot value:

\inetpub\wwwroot

This prevents the WiX install from succeeding on that machine.  I'm not sure
of the entire scenario -- why this doesn't resolve to C:, but it may be that
it fails if the install is launched from CD or a network volume.

So... any suggestions for how I might:

1) Cause the installer to expand environment variables in a property to
handle the Vista case (is there some clever indirection)?

2) Inspect the resulting PathWWWRoot property to see if it's a real path and
default to something like C:\INETPUB\WWWROOT if it's not?

At this point, I think I should have given up and written a custom action to
solve this problem, but if anyone has any suggestions or a WiX incantation
to test a property to see if it contains a valid file or directory and
expand environment string therein, that would be greatly appreciated.




-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Creating-Virtual-Directories-in-c-inetpub-wwwroot-in-WiX-tp688976p5886887.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to