cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
maodean
Level 2

How to get values in Product Properties and String Tables

Hi All,

I am pretty new to InstallShield. Just started yesterday.

Which function I need to use to get the following values in Install Script:
I want to get the Product Properties such as Name, Version.... in Installation Information ?
Also, Similary as above, I want to get the value of Identifier in String Tables in Installation Information ?
Thanks, I spent much time on it, But still don't figure out which function that I need to use.

Regards

Dean
Labels (1)
0 Kudos
(1) Reply
kirankumar
Level 3

Hi Dean,

How to get the product version through install script is:
VerProductGetInstalledVersion ( svVersionInstalled ),
And i have the vb script code to get the product version and product name in windows installer, just copy the code and save it as fileame.vbs and run this u will get the information.if u want to use this on install shield make it as an custom action.

VBscript code:


Set objInstaller = CreateObject("WindowsInstaller.Installer")

Set colProducts = objInstaller.Products
For Each objProduct In colProducts
strVersion = DecodeVersion(objInstaller.ProductInfo(objProduct, "Version"))
strInfo = "Product with Product Code " & objProduct & " is " & objInstaller.ProductInfo(objProduct, "ProductName") & ", version " & strVersion

WScript.Echo strInfo
Next

Function DecodeVersion(version)
version = CLng(version)
DecodeVersion = version\65536\256 & "." & (version\65535 MOD 256) & "." & (version Mod 65536)
End Function

--kirankumar
0 Kudos