I am trying to find a way to set the ODBC connection from an external "setup.ini" which also holds information about the startmenu shortcut to create. So I would like dynamically create the ODBC and the Shortcut. Anybody knows how to accomplish this.
Thank you fo your answer. What I want is, generate an setup file (msi). In the source directory in which the msi file resides I want to place an setup.ini textfile with paramaters for the ODBC connection and shortcutname for the program to install.
During the installationproces the msi has to read the setup.ini file values and create based on the parameters the ODBC DSN in the registry and create the shortcut in the Startmenu under Programs on de target machine.
I am installing just a bunch of dll 's and MSI 's but no executables. Most of the configuration is done by our consultants but they need an msi who can create odbc and shortcuts dynamically. They configure on site the ODBC en shortcut trough the setup.ini file. Later a user will be able to launch the msi by himself without worrying how to configure the odbc and create a shortcut to the program(runtime)
I'm afraid we don't have predefined support for this. However, in order to achieve what you want you can develop your own custom action which will read the related parameters from .ini file and will copy them into installer properties. Then, you can use the related properties to configure your project accordingly. You can take a look on our "How could I read an "external" .INI file?" thread which could be useful for you.
It took a while but I can not achieve that my added vbscript trough an custom action finds my external setup.ini file for reading several settings.
What I have done so far is the following.
- A file/copy action for the setup.ini file with the [SOURCEDIR] property (explained in the helpfile)
- The vbscript launches trough the custom action "Launch attached file" with the default properties.
As far I understand from your previous explanation and the helpfile. The setup.ini is copied to de application folder [APPDIR]. The "Launch attached file" (vbscipt) action should also run in the [APPDIR] and find the copied setup.ini for reading and execute with the parameters from the setup.ini file.
The problem whatever I do, the script cannot find the setup.ini, despite the fact that in my opinion the script is also run from the [APPDIR]
There is no need to copy the setup.ini file into the APPDIR. You can simply place the setup.ini file alongside your MSI before you launch the MSI and, you can use the SOURCEDIR property to get the path of the parent folder of your setup.ini file.