NSIS:从互联网上获取文本并输入;BrandingText";

NSIS:从互联网上获取文本并输入;BrandingText";,nsis,Nsis,我想添加联机文本文件中的文本,并按以下方式插入: BrandingText "14.05.01" 或 NSIS是否提供了这种可能性?是的,这是可能的。我使用从网站访问文件: #get txt file (silently) inetc::get /NOCANCEL /SILENT "https://valeo.googlecode.com/svn/trunk/versao.txt" "$TEMP\versao.txt" /end #you may check the return value

我想添加联机文本文件中的文本,并按以下方式插入:

BrandingText "14.05.01"


NSIS是否提供了这种可能性?

是的,这是可能的。我使用从网站访问文件:

#get txt file (silently)
inetc::get /NOCANCEL /SILENT "https://valeo.googlecode.com/svn/trunk/versao.txt" "$TEMP\versao.txt" /end
#you may check the return value with: 'Pop $0' and 'StrCmp $0 "OK" 0 Error'
#read file content
FileOpen $4 "$TEMP\versao.txt" r
# read until the end of line and save it to $1
FileRead $4 $1 
#close the file
FileClose $4 
# Now do what you want with $1
更新:


是的,这个代码进入一个函数。但是这没有问题,只需按照说明进行操作。

如果BrandingText不在节或函数中,如何使用此代码。而上述代码不能出现在节或函数之外?
#get txt file (silently)
inetc::get /NOCANCEL /SILENT "https://valeo.googlecode.com/svn/trunk/versao.txt" "$TEMP\versao.txt" /end
#you may check the return value with: 'Pop $0' and 'StrCmp $0 "OK" 0 Error'
#read file content
FileOpen $4 "$TEMP\versao.txt" r
# read until the end of line and save it to $1
FileRead $4 $1 
#close the file
FileClose $4 
# Now do what you want with $1