Larsen
10th March 2006 09:25 UTC
VIAddVersionKey ProductName $(^Name)
Hello,
I use $(^Name) for several things and it is always replaced with the defined name (name is define before all other things).
Why can´t I use it with "VIAddVersionKey ProductName"? When I open the properties of the setupfile, it shows $(^Name) instead of "My Application Name".
btw: Why is this variable not in the usual format ${name}?
Lars
Takhir
10th March 2006 09:47 UTC
This thread can help to explain http://forums.winamp.com/showthread....hlight=%5EName
Larsen
10th March 2006 10:32 UTC
I´m not sure, if that post also applies to this problem.
Please have a look at the attached script:
InstallDir is defined with $(^Name) and this works. "VIAddVersionKey ProductName $(^Name)" is defined thereafter so $(^Name) definitely should have a value.
kichik
10th March 2006 10:45 UTC
VIAddVersionKey defines a string that's read by Windows. The string goes into the version information resource in the executable itself. It can not contain any language strings because Windows read it. The installer isn't running, so it can't translate the language string.
Larsen
10th March 2006 10:53 UTC
Sorry, I still don´t understand that.
Isn´t $(^Name) replaced on compile-time with the appropriate string defined by ´Name "My Application"´???
kichik
10th March 2006 11:00 UTC
No. $(^Name), as the parenthesis suggest, is a language string. Language strings are replaced at runtime according to the language selected by $LANGUAGE.
Larsen
10th March 2006 11:13 UTC
Aaah, I see. So this answers my second question why the format doesn´t look like ${...} I guess.
Could you add $(^Name) in the helpfile index? I already searched for it before posting but couldn´t find anything useful.
Shouldn´t there be a hint on parenthesis in "4.10 Multiple Languages"?
Thanks. You´re doing a great job here =)
kichik
10th March 2006 11:24 UTC
$(^Name) is actually mentioned exactly on 4.10. That same section also links to LangString which tells you about the difference between {} and ().
Larsen
10th March 2006 11:39 UTC
oooops, sorry. Perhaps I should think about glasses...