>Kevin Burton wrote:
>So what does it mean to have "DesktopFolder" underneath the TARGETDIR. That is 
>certainly not the hierarchy that is on my computer.

Kevin,

Let me try to explain this one.  Think of it as "default" directory hierarchy 
with possibility to override default entirely or partially.  Windows installer 
demands directory hierarchy to have one root and in Wix it is represented as 
<Directory> element with Id attribute set to "TARGETDIR" and Name attribute to 
"SourceDir".  Casing has to be exactly same as typed.  All other folders have 
to be child elements of the root <Directory> element with any level of nesting.

Now, it is very important to understand and remember that all Id attributes of 
<Directory> elements refer to properties in the Property table. There are two 
types of properties: defined by Windows Installer and defined by user.  If Id 
attribute contains property defined by Windows Installer, it will be always 
resolved to a proper value this property represents.  In our example, 
DesktopFolder is a property defined by Windows Installer and it will always 
have a value which is the path to user's Desktop folder on target computer 
regardless of where in <Directory> hierarchy it will be placed.  This is one 
way to "override" "default" directory hierarchy.

Second way is to use public user (or Windows Installer) defined property (all 
uppercase) as the value of Id attribute (TARGETDIR can also be used that way) 
and set its value in the command line.  In this case, during CostFinalize 
action the value constructed from the <Directory> hierarchy will be updated 
with the value passed in the command line.  We can also use Custom Action Type 
51 before CostFinalize or Custom Action Type 35 after CostFinalize to set the 
path to some other value.  There are also few options to achieve the same in 
the UI.  Bottom line is that directory structure in Windows Installer is not 
necessarily "what you see is what you get", so to speak.

Obviously, there are lot more other things need to be considered in regard to 
directory structure, but this should be enough to answer your question.

Hope that helps,

Alex Shevchuk


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to