/*
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
THE END
暂无评论内容