Hello Augustin and welcome to Advnaced Installer forums,
Thank you for your interest in Advanced Installer.
Since you need
installer properties within your
custom action, I highly recommend you to (re)write your custom action as a
fully fledged C# custom actions as you can easily set and retrieve installer properties.
In your .DLL custom action you can retrieve the property search value using something like that:
YourVariable = session["RESULT_PROPERTY"];
In order to set a property you can use the following syntax:
session["YOUR_PROPERTY"] = "YOUR_VALUE";
Then you can go in the
“Custom Actions” page and add a predefined
Launch attached file custom action
with sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.
2. Can I read a registry value which contains the full path to a .ini file and after that read different keys from the ini file and use these as my paths to install?
In order to search through the registry you can go in the
Search page and use the
Wizard New Search toolbar button to quickly and easily set up a new search, following step-by-step directions. The result of your search will be stored in the property assigned to your search operation (by default it is
RESULT_PROPERTY).
In order to install files in a custom folder you can go in the
Files and Folders page and create a
property based folder using the
New Folder - > Property Based toolbar button. Property based folders will be resolved at install time to the values from the respective property.
You can take a look on the
How do I install files in a custom folder? article which may be useful to you.
So, here is what you have to do:
1) Retrieve the path to the .ini file from the registry – this can be done through the search operation in the
Search page.
2) Define the
property-based folder in the
Files and Folders page.
3) In your custom action you need to:
- - retrieve the property's value assigned to the search operation which contains the path of your .ini file;
- read your .ini file
- set accordingly the public properties which will be further used as paths for your property-based folders
You can
define or create a property in the
Install Parameters page.
Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging