cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jaysullivan
Level 3

Setting a public property based on an external INI file

Hi,

Is there any way to get InstallShield to set the value for a public property by reading the value from an external INI file? I know you can use command-line parameters to pass in values for public properties, but for a variety of reasons, we prefer to have an INI outside of Setup.EXE that our clients can edit in order to set values for a few properties.

If this isn't something you can do through the Installation Designer (on a Basic MSI project), would it be possible to do with InstallScript? I've never written any InstallScript since we've been using InstallShield Express, but we're looking at upgrading to InstallShield Pro.

If the only way to do this is with InstallScript, can anyone point me to the functions that I should be looking at which can open and read an external file and then set a public property?

Thanks,
Jay
Labels (1)
0 Kudos
(1) Reply
Stefan_Krueger
Level 9

Windows Installer has built in functionality to read from INI files, but it is restricted to INI files in the Windows folder, so that won't help you.

So you will need to create a custom action for this purpose. This could be a DLL, a VBScript or an InstallScript. For InstallScript look at the functions GetProfString() to read the value and MsiSetProperty to store the value in a property.
SETUPEXEDIR is a property that holds the path where setup.exe is located. You can read this value using MsiGetProperty (be sure to initialize the size parameter before calling the function)
Stefan Krueger
InstallSite.org
0 Kudos