Hi Brad,
1.
How do you create a custom action that sets a property? The only way I could see to do this was to create a dll and have the dll read in the SETUPEXEDIR and then save the result I want back into the DRIVE property. Is there an easier way to do this? The Set installer property only deals with Formats.
In order to set a property you can use the "Set installer property" predefined custom action. However, in your scenario, you need to also read the
SETUPEXEDIR property and extract the drive letter from it which will be stored in the DRIVE property. So, you need, indeed, to create a DLL custom action. For example, you can create your custom action
written in C# or
written in C++ or a VBScript custom action.
2. I added the custom action Launch attached file with sequence that calls my dll after the "Wizard Dialogs Stage -> Searches" and again after the "Install Execution Stage -> Searches". This is never executed before the prerequisites are launched. How can I modify my setup to call this prior to the prerequisites?
This happens if your prerequisites are added as "pre-install" prerequisites. In this case they are launched by the EXE Bootstrapper and, indeed, they are launched before any custom action to be executed. The solution I described works only for "feature-based" and "post-install" prerequisites.
Best regards,
Eusebiu
FOLLOW US
Get the latest news in Application Packaging