All good with NSIS 3.0, except for one thing: for add a Version Information to the installer, now it depends of Resource Hacker to add version information to the installer (or at least, that's the impression that shows in this new tutorial).
Exist another variables for add or edit version info of the installer without use Resource Hacker?
Compiling NSIS Examples: Can't open output file
10 posts
Did you actually test v3 or are you just wasting everybody's time with pointless questions? If you did test then you forgot to include example code and compiler error messages!Originally Posted by eliotime3000 View PostAll good with NSIS 3.0, except for one thing: for add a Version Information to the installer, now it depends of Resource Hacker to add version information to the installer (or at least, that's the impression that shows in this new tutorial).
Exist another variables for add or edit version info of the installer without use Resource Hacker?
That wiki page is from 2005, what makes you think anything has changed in v3? In fact, NSIS3 added the !getdllversion instruction that lets you extract information at compile-time with no external tools. v3 still has the same VI* attributes you use to set the version information.
I've tested NSIS v3, and the VersionInfo variable that is avariable on the example files is not working.Originally Posted by Anders View PostDid you actually test v3 or are you just wasting everybody's time with pointless questions? If you did test then you forgot to include example code and compiler error messages!
That wiki page is from 2005, what makes you think anything has changed in v3? In fact, NSIS3 added the !getdllversion instruction that lets you extract information at compile-time with no external tools. v3 still has the same VI* attributes you use to set the version information.
Did you even try !getdllversion?
Example (NSIS 3):
Example (NSIS 3):
Name "get version"On my machine this gives: Explorer.exe version is 6.2.14393.206, which is the Windows 10 Anniversary Update version.
OutFile "get version.exe"
RequestExecutionLevel user
Page instfiles
!getdllversion "$%windir%\explorer.exe" expv_
!echo "!echo: Explorer.exe version is ${expv_1}.${expv_2}.${expv_3}.${expv_4}"
Section one
MessageBox MB_OK "Explorer.exe version is ${expv_1}.${expv_2}.${expv_3}.${expv_4}"
SectionEnd
Technically not correct, the version should be 10.0.14393.206 but Windows lies even when you try to extract version info from resources these days. Should hopefully not be an issue on files outside %windir%.Originally Posted by JasonFriday13 View Post
On my machine this gives: Explorer.exe version is 6.2.14393.206, which is the Windows 10 Anniversary Update version.
If you believe something is not working then you really should post a small example so we can verify if something is broken or not...Originally Posted by eliotime3000 View PostI've tested NSIS v3, and the VersionInfo variable that is avariable on the example files is not working.
I'm using the script file named VersionInfo.nsi that is included on NSIS 3.0 final, and the output shows me the following (via HM NIS Edit 2.0.3):Originally Posted by Anders View PostIf you believe something is not working then you really should post a small example so we can verify if something is broken or not...
😔 I don't understand why the compiling engine does not generate the installer with the VersionInfo variables.Command line:
"C:\Program Files\NSIS\makensis.exe" /NOTIFYHWND 393820 "C:\Program Files\NSIS\Examples\VersionInfo.nsi"
Processing config: C:\Program Files\NSIS\nsisconf.nsh
Processing script file: "C:\Program Files\NSIS\Examples\VersionInfo.nsi" (ACP)
Processed 1 file, writing output (x86-ansi):
Output: "C:\Program Files\NSIS\Examples\VersionInfo.exe"
Can't open output file
Error - aborting creation process
I was a bit confused since you started off by linking to something on the wiki and now you are talking about something that ships with NSIS.
Now that you have posted the compiler output we can finally get somewhere. The compiler is telling you exactly what the problem is:
You can:
A) Give everyone write permission to the Examples directory
or
B) Copy the .nsi to somewhere you have write access
or
C) Copy the code you need and paste it into your own .nsi
Now that you have posted the compiler output we can finally get somewhere. The compiler is telling you exactly what the problem is:
This happens if you install NSIS in a directory where you don't have write access.Originally Posted by eliotime3000 View PostI'm using the script file named VersionInfo.nsi that is included on NSIS 3.0 final, and the output shows me the following (via HM NIS Edit 2.0.3):
Output: "C:\Program Files\NSIS\Examples\VersionInfo.exe"
Can't open output file
Error - aborting creation process
You can:
A) Give everyone write permission to the Examples directory
or
B) Copy the .nsi to somewhere you have write access
or
C) Copy the code you need and paste it into your own .nsi
1.- Solved the Issue of the example code. Now i'm trying to solve the problem that I have with the usage of the VersionInfo on my NSI script. The simplest solution was simply skip the following line:
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"And just paste (and edit) the rest of the script:Thanks a lot. And I apologize by claim about NSIS 3.0 release.;Version Information
VIProductVersion "1.2.3.4"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Test Application"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Fake company"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Test Application is a trademark of Fake company"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Fake company"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3"
And you failed to post compiler error/warnings again! My guess is that you are using MUI or something else that already loaded the language file. The language file is only loaded in that example so LANG_ENGLISH is defined to the correct language code...Originally Posted by eliotime3000 View PostNow i'm trying to solve the problem that I have with the usage of the VersionInfo on my NSI script. The simplest solution was simply skip the following line:
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"