Q: Apply property changes from an input file at runtime?
Is it possible to set an MSI public property at runtime from input read from a file rather than by specifying PROPERTY=VALUE on the command line? For instance, say 20 properties need to be applied to the package from the command line. Can they be read from an input file?
There may be an easier way to do what I'm trying to do but I'm not sure. If so, please let me know. Here's what I'm trying to do and why:
My installation (basic MSI project) will have 20 or so user selectable features each of which launches a child installation from the source media (I have a lot of products to install). The location and name of the setup executables as well as their command line options are stored as public properties of the parent installation and then launched using custom actions. The child setups stored in different folders on the source media will change as new versions are released. This may cause the location of the executable, name of the executable, or the executable command line options to change as well. I don't want to have to open the ISDev project, change the default property settings, then recompile and repackage the MSI database every time one of the child setups changes. Instead, it would be much easier to be able to set the properites at runtime by reading them from an input file.
Did you try the file operation functions in InstallScript?
Sorry, I should have been more clear. I do not want an InstallScript solution.
Can this be done using a VBScript file?
In VBScript, you can use FileSystemObject object to achieve what you want (open a text file, read line by line, and close the file). You can then use Session.Property to assign the value read to a property. However, FileSystemObject object is available with Windows Scripting Host 5 and later.