我想要显示在部分描述,版本的可执行文件安装的设置?
LangString DESC_SecSoftware ${LANG_ENGLISH} "Software PX"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${DescText} "Software test"
!insertmacro MUI_FUNCTION_DESCRIPTION_END如何读取test.exe的文件版本?
可以读取这样的文件版本:
${GetFileVersion} "C:\ftp\programm.exe" $ProgramVersion用!include "FileFunc.nsh"
但这条路必须是绝对的。我无法读到安装中包含的fileVersion惠奇。
发布于 2013-06-21 10:22:35
${GetFileVersion}宏将允许您在执行安装的机器上读取运行时上的文件版本,并且该文件肯定不在安装程序.exe之外。
相反,您可以使用在编译时执行GetDllVersionLocal ()的,并从程序员主机上的原始.exe获得版本。
!include "logiclib.nsh"
ShowInstDetails show
OutFile "exeversion.exe"
!define exe_to_read "some.exe"
Section
DetailPrint "getting version $EXEPATH"
GetDllVersionLocal "${exe_to_read}" $R0 $R1 ;the two values were read during compilation
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
StrCpy $0 "$R2.$R3.$R4.$R5"
DetailPrint "version read: $0"
SectionEndhttps://stackoverflow.com/questions/17230035
复制相似问题