Old 9th July 2015, 11:56   #1
hanen.jomaa
Junior Member
 
Join Date: Mar 2013
Posts: 23
set File Version VIProductVersion

Hi,

can you help me please,

I want to have the properties File Version empty ?

How can I do that please ?
hanen.jomaa is offline   Reply With Quote
Old 9th July 2015, 14:33   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
The version info resource has a fixed block ( https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx / https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx ) where the file and product version is stored, https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx says that the size of the fixed block can be 0 but NSIS does not support that, your only option is to use 0.0.0.0. It might be possible to use !packhdr and Resource Hacker to get around this NSIS limitation.

You can also set the file version string (VIAddVersionKey) to "" but you cannot control if a 3rd-party application displays the string version number or the number from the fixed block...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st August 2015, 00:12   #3
erundil
Junior Member
 
Join Date: Apr 2011
Posts: 20
Question

Another question.
VIProductVersion sets the Product Version in the file properties window and does not require MUI2.nsh.
Is it possible to set other file properties without MUI2?

What I need specifically is:
File language (must be English), File Description, File Version, Product Name, Legal Copyright and Original Filename.

I know that everything from the list except language can can be set by VIAddVersionKey but it requires MUI2.
erundil is offline   Reply With Quote
Old 31st August 2015, 01:42   #4
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Interesting, Windows 10 does show the language in the details tab. The ones I've checked all say 'Language Neutral'. Perhaps it's a feature not implemented in earlier versions of windows.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 31st August 2015, 13:41   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
MUI is not required to set VI* attributes. VIAddVersionKey /LANG=0 "foo" "bar" will set the string using the neutral language id (in recent NSIS versions) or you can use /LANG=1033 for English etc. (${LANG_ENGLISH} is 1033 and is set by LoadLanguageFile, not MUI) Unless you are setting the version info for multiple languages then the language id used should not matter, Windows will fall back to neutral or English if it does not find something that matches your Windows UI language.

The language is not a real string entry, it is generated by the Windows file properties tab. I believe even Windows 95 does this but the real version tab was removed in Vista and the version info might come from the property system these days.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st August 2015, 14:41   #6
erundil
Junior Member
 
Join Date: Apr 2011
Posts: 20
Quote:
Originally Posted by JasonFriday13 View Post
Interesting, Windows 10 does show the language in the details tab. The ones I've checked all say 'Language Neutral'. Perhaps it's a feature not implemented in earlier versions of windows.
It's there in Windows 7 too.

Quote:
Originally Posted by Anders View Post
MUI is not required to set VI* attributes. VIAddVersionKey /LANG=0 "foo" "bar" will set the string using the neutral language id (in recent NSIS versions) or you can use /LANG=1033 for English etc. (${LANG_ENGLISH} is 1033 and is set by LoadLanguageFile, not MUI) Unless you are setting the version info for multiple languages then the language id used should not matter, Windows will fall back to neutral or English if it does not find something that matches your Windows UI language.

The language is not a real string entry, it is generated by the Windows file properties tab. I believe even Windows 95 does this but the real version tab was removed in Vista and the version info might come from the property system these days.
Thanks for the quick reply! That's everything I needed to know.
erundil is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump