Maybe this can be done with a custom action but I don't understand what you mean with .properties-file, please give me more details. At what file you referee?
A java .properties file is like a windows ini file, except it can have different delimiters than the = sign between the key-value pairs. I would like an answer to this as well, as I need the ability to modify a value in a .properties file based upon text entered by the user during the install.
Essentially, I suppose I could make a program that can read the file in and modify the value based upon a passed in installer property, but it would have to be written as a C/C++ Dll or .exe to definitely run under windows. and then use that exe or dll in a custom action, but that is a good bit of work to do for what seems to be a simple thing.
The other option I came up with is to add an INI file to the project that has the same contents as the .properties file, and change my software to look for the INI instead of the .properties file, but it seems a little hokey that I have to do this just to be able to place a reference in a text file that the installer can overwrite. The real issue being that I have to add the INI through the Advanced Installer software, rather than picking an existing file, which makes it difficult to place the INI file in source control.
Ultimately, I suppose I could learn enough visual basic script to do this in a custom action, but again this is a lot of coding to do what I need. It seems that I should be able to open any text file within the installer, and place references to installer properties in the file, and the installer replaces those references during the install, much like you can do with the INI file editor.
Thank you for your quick response.
Chris Mooney
P.S. Additionally, it seems that eventually you will also need to support the modification of XML configuration files as well. A lot of software that we write is starting to go to that sort of configuration since it provides a more self-describing configuration file.
Windows Installer offer directly support only for editing INI files. For all other type of files you need to use a custom action in order to insert property references into them.
Regarding the XML file editing, we have this on our TODO list and will be available in a future version of Advanced Installer. I'm afraid that I cannot give you an ETA for it.
FOLLOW US
Get the latest news in Application Packaging