OK it seems like you're tripping over the way that some attributes are
of the Formatted type, while others aren't (see
http://msdn.microsoft.com/en-us/library/aa368609.aspx )
If you want a Property to expand into the text it is set to during
install of your package, the type of the string you're putting the
Property into must be of the Formatted type. This is why the Name
attribute in your Shortcut Element isn't substituting the value in
ProductVersion where as the Key attribute in your RegistryValue Element
is. The Shortcut table (see
http://msdn.microsoft.com/library/aa371847.aspx) shows that the Name
value is of type "Filename" which is a simple string (see
http://msdn.microsoft.com/en-gb/library/aa368590.aspx) where as the
Registry table (see http://msdn.microsoft.com/library/aa371168.aspx)
shows that the Key value is of type "RegPath" which is Formatted (see
http://msdn.microsoft.com/en-gb/library/aa371173.aspx). If you look up
Shortcut & RegistryValue in the WiX documentation they contain the links
I pasted above to the relevant tables so if in doubt always check the
documentation & follow the links through to the MSDN pages.

All File, Component & Directory Id's can be used as Properties with the
correct formatting (nothing special for Directories, prepend with # or !
For Files, $ for Components, see the Formatted page above for more).
Hence why you can use "ProgramMenuDir" for the Directory attribute in
your Shortcut Element as it's an entry in the Directory table.
ProgramMenuFolder is a standard Windows Installer property which points
to a certain location on the target system. The list of standard
Properties set by Windows Installer is at
http://msdn.microsoft.com/en-us/library/aa370905.aspx

Properties are very much case sensitive. An all uppercase Property is a
public Property. VersionNT, versionnt & VERSIONNT are not the same
thing, the former resolves to an integer representing the version of the
operating system while the latter 2 will always be empty unless you set
them to something. 

This isn't a WiX learning curve. This is basic Windows Installer
concepts. If you feel you need more help over & above what the WiX
documentation/tutorials & MSDN/blog pages can provide I would recommend
Phil Wilson's book "The definitive guide to Windows Installer" (not sure
if that's the same Phil Wilson who replies on this list but it's quite
likely) as it covers all this type of stuff & more. You do however need
to learn that WiX is a tool to create Windows Installer packages,
nothing more & until you start thinking about it in that way you're
going to keep bouncing off the Windows Installer learning curve &
getting frustrated with WiX when it really isn't WiX which is the
problem. Believe me when I say WiX makes this stuff a hell of a lot
easier than it would be without it (like orders of magnitude easier).

However don't be afraid to ask questions like those below on the list
if/when you get stuck on stuff, we all had to learn this stuff at one
point (well with the exception of people like Rob M, Bob A et al). These
are what I call good questions, you're trying to learn how to do things
properly & more importantly you're showing us you're trying to learn &
what you've done to try & understand the things you're stuck on so
answering stuff like this is a pleasure rather than a chore. If you'd
sent 2 lines saying something like "I don't understand how properties
work. Can someone please tell me, pretty please because I have a product
to release in 3 days & I can't get it working!" I'd ignore you or send
you a 1 line reply with an MSDN link as I you may have seen me do for
questions of that ilk.

Good luck.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: michaelrepucci [mailto:mich...@repucci.org] 
Sent: 03 August 2010 20:44
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] difference between INSTALLDIR and
INSTALLLOCATION


I've read more about properties, so now I understand that there are
private and public properties, but I'm still confused on how to use them
successfully in my WXS file. (FYI, so far, I've just been playing around
with the examples from the  http://www.tramontana.co.hu/wix/ WiX
tutorial , so if you're curious where certain constructs came from, you
can refer to those examples.) For instance,

<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]"
Type="string" Value="" KeyPath="yes" />

seems to insert the values of Manufacturer and ProductName that I set as
the Manufacturer and Name attributes of the Product tag, respectively.
Good.

But if I have a shortcut to the application within the main executable
File tag, like so

<Shortcut Id="MyStartMenu" Directory="ProgramMenuDir" Name="WinForms
[ProductVersion]" WorkingDirectory="INSTALLLOCATION" Advertise="yes" />

The ProductVersion does NOT get replaced by the Version attribute of the
Product tag, even though it's a stated property on
http://msdn.microsoft.com/en-us/library/aa370905.aspx MSDN . Moreover, I
don't understand where the value for the Directory attribute in the
shortcut above gets set. I did use it as the Id attribute of a Directory
tag elsewhere in the WXS file, like so

<Directory Id="ProgramMenuDir" Name="MyApp"> ... </Directory>

but I though that if I wanted to reuse the value of that Id attribute,
that I needed to use an all caps name, as I did for the INSTALLLOCATION
value above (which is the Id of another Directory tag). And, besides, I
have another directory tag

<Directory Id="ProgramMenuFolder" Name="Programs"> ... </Directory>

which seems to point to the MSDN property ProgramMenuFolder, rather than
set it (incidentally this tag wraps the previous Directory tag).

I'm sure these are really basic questions, but for some reason, that big
learning curve that I heard about with regards to WiX is rearing its
ugly head for me. I can't seem to find documentation that explains WiX
from start to finish in way that is clear to me; the MSDN documentation
on properties doesn't clarify how they're used in a WiX-based XML, and I
didn't see this in the  http://wix.sourceforge.net/manual-wix3/main.htm
WiX manual . So links to such docs would be great too.
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/difference
-between-INSTALLDIR-and-INSTALLLOCATION-tp5347798p5369841.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
The Palm PDK Hot Apps Program offers developers who use the Plug-In
Development Kit to bring their C/C++ apps to Palm for a share of $1
Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to