====== getFileInfoMap.opsiinc ====== read file info from a interesting file ...\\ Tested with opsi 4.0.4\\ requiredWinstVersion >= 4.11.2.\\ By //[[opsi@gei.de|GEI]] 2014/11/11 20:00// placed in global library, such as %ScriptDrive$/lib ... call with set $InterestingFile$ = "ownCloud-1.6.3-setup.exe" include_insert %ScriptDrive%/lib/getfileinfomap.opsiinc === === ; This sourcecode is partly owned by uib.de ; and published under the Terms of the General Public License. ; credits: http://www.opsi.org/en/credits/ ; ; written by GEI (Detlef Krummel opsi@gei.de) ; FILE "%ScriptDrive%\lib\getfileinfomap.opsiinc" requiredWinstVersion >="4.11.2" ; for debugging setLogLevel = 7 DefStringList $FileInfoMap_List$ Set $FileInfoMap_List$ = getFileInfoMap($InterestingFile$) setLogLevel = 6 ; ---------------- sample values ----------------------------------------------------------------------------- ; 0)Language name 0=Englisch (USA) 1)Language ID 0=1033 2)file version=281500746714761 ; 3)file version with dots=1.6.3.3721 4)product version=281500746714761 5)Comments= ; 6)CompanyName=ownCloud 7)FileDescription= 8)FileVersion=1.6.3.3721 ; 9)InternalName= 10)LegalCopyright= 11)LegalTrademarks= ;12)OriginalFilename= 13)PrivateBuild= 14)ProductName=ownCloud ;15)ProductVersion= 16)SpecialBuild= DefVar $FileInfoMap_LanguageName0$ Set $FileInfoMap_LanguageName0$ = getValue("Language name 0",$FileInfoMap_List$) DefVar $FileInfoMap_LanguageId0$ Set $FileInfoMap_LanguageId0$ = getValue("Language ID 0",$FileInfoMap_List$) DefVar $FileInfoMap_FileVersion0$ Set $FileInfoMap_FileVersion0$ = getValue("file version",$FileInfoMap_List$) DefVar $FileInfoMap_FileVersionWithDots$ Set $FileInfoMap_FileVersionWithDots$ = getValue("file version with dots",$FileInfoMap_List$) DefVar $FileInfoMap_ProductVersion$ Set $FileInfoMap_ProductVersion$ = getValue("product version",$FileInfoMap_List$) DefVar $FileInfoMap_Comments$ Set $FileInfoMap_Comments$ = getValue("Comments",$FileInfoMap_List$) DefVar $FileInfoMap_CompanyName$ Set $FileInfoMap_CompanyName$ = getValue("CompanyName",$FileInfoMap_List$) DefVar $FileInfoMap_FileDescription$ Set $FileInfoMap_FileDescription$ = getValue("FileDescription",$FileInfoMap_List$) DefVar $FileInfoMap_FileVersion$ Set $FileInfoMap_FileVersion$ = getValue("FileVersion",$FileInfoMap_List$) DefVar $FileInfoMap_InternalName$ Set $FileInfoMap_InternalName$ = getValue("InternalName",$FileInfoMap_List$) DefVar $FileInfoMap_LegalCopyright$ Set $FileInfoMap_LegalCopyright$ = getValue("LegalCopyright",$FileInfoMap_List$) DefVar $FileInfoMap_LegalTrademarks$ Set $FileInfoMap_LegalTrademarks$ = getValue("LegalTrademarks",$FileInfoMap_List$) DefVar $FileInfoMap_OriginalFilename$ Set $FileInfoMap_OriginalFilename$ = getValue("OriginalFilename",$FileInfoMap_List$) DefVar $FileInfoMap_PrivateBuild$ Set $FileInfoMap_PrivateBuild$ = getValue("PrivateBuild",$FileInfoMap_List$) DefVar $FileInfoMap_ProductName$ Set $FileInfoMap_ProductName$ = getValue("ProductName",$FileInfoMap_List$) DefVar $FileInfoMap_ProductVersion$ Set $FileInfoMap_ProductVersion$ = getValue("ProductVersion",$FileInfoMap_List$) DefVar $FileInfoMap_SpecialBuild$ Set $FileInfoMap_SpecialBuild$ = getValue("SpecialBuild",$FileInfoMap_List$)