Archive: VIAddVersionKey ProductName $(^Name)


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


This thread can help to explain http://forums.winamp.com/showthread....hlight=%5EName


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.


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.


Sorry, I still don´t understand that.

Isn´t $(^Name) replaced on compile-time with the appropriate string defined by ´Name "My Application"´???


No. $(^Name), as the parenthesis suggest, is a language string. Language strings are replaced at runtime according to the language selected by $LANGUAGE.


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 =)


$(^Name) is actually mentioned exactly on 4.10. That same section also links to LangString which tells you about the difference between {} and ().


oooops, sorry. Perhaps I should think about glasses...