最新消息:

NsVersionInfo是NSIS获取应用程序属性信息的插件

nsis 永恒心锁 1838浏览 0评论
/*
NsVersionInfo是NSIS获取应用程序属性信息的插件
NsVersionInfo可以获得资源版本里的信息,但是对中文支持不友好.
*/
!AddPluginDir "../Plugins"
Name "nsVersionInfo Test"
OutFile "test_nsVersionInfo.exe"
InstallDir "$PROGRAMFILEStest_nsVersionInfo"
ShowInstDetails show
var testexe
Section "Test"
 #strcpy $testexe "C:DeveclipseWin32SamplesverInfoTestsTest.exe"
 strcpy $testexe "$WINDIRnotepad.exe"
 nsVersionInfo::getFixedProductVersion $testexe
 pop $0
 DetailPrint "nsVersionInfo::getFixedProductVersion = $0"
 nsVersionInfo::getFixedFileVersion $testexe
 pop $0
 DetailPrint "nsVersionInfo::getFixedFileVersion = $0"
 ;WARNING : do that test with caution !!!
 ;nsVersionInfo::setFixedFileVersion $testexe 10 20 30 40
 ;pop $0
 ;DetailPrint "nsVersionInfo::setFixedFileVersion = $0"
 ;WARNING : do that test with caution !!!
 ;nsVersionInfo::setFixedProductVersion $testexe 11 22 33 44
 ;pop $0
 ;DetailPrint "nsVersionInfo::setFixedProductVersion = $0"
 nsVersionInfo::getStringFileInfo $testexe "FileDescription"
 pop $0
 DetailPrint "nsVersionInfo::getStringFileInfo (FileDescription) = $0"
 nsVersionInfo::getStringFileInfo $testexe "ProductName"
 pop $0
 DetailPrint "nsVersionInfo::getStringFileInfo (ProductName) = $0"
 nsVersionInfo::getStringFileInfo $testexe "LegalCopyright"
 pop $0
 DetailPrint "nsVersionInfo::getStringFileInfo (LegalCopyright) = $0"
 nsVersionInfo::getStringFileInfo $testexe "NonStandardString"
 pop $0
 DetailPrint "nsVersionInfo::getStringFileInfo (NonStandardString) = $0"
 nsVersionInfo::getLibVersion
 pop $0
 DetailPrint "nsVersionInfo::getLibVersion = $0"
 ;WARNING : do that test with caution !!!
 ;nsVersionInfo::setStringFileInfo $testexe "NonStandardStringUnTrucPasVu" "Une valeur ?la con"
 ;pop $0
 ;DetailPrint "nsVersionInfo::setStringFileInfo (NonStandardStringUnTrucPasVu) = $0"
 ;nsVersionInfo::setStringFileInfo $testexe "FileVersion" "42.12"
 ;pop $0
 DetailPrint "nsVersionInfo::setStringFileInfo (NonStandardStringUnTrucPasVu) = $0"
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » NsVersionInfo是NSIS获取应用程序属性信息的插件

您必须 登录 才能发表评论!