Hi,
I am fuzzy about how to trigger my custom action after the user selected an installation folder, and how to go back (if that should be necessary) to the FolderDlg dialog if the write check fails. Can you shed some light on this?
A good approach is to use an UI Custom Action through a DoAction
control event. This control event can be added in the "Published Events" tab for the "Next" button on the "FolderDlg" dialog (in the "Dialogs" page). This way, when the user clicks on the "Next" button, the custom action will be executed.
To make sure that the user cannot proceed with a folder for which he doesn't have write access, you can use a property. The property can be set inside your custom action and then used to condition the "NewDialog" control event used for the "Next" button. When the user will click on "Next", the NewDialog control event will run only if the condition is met, therefore you can stop the user from advancing. You can also show a custom message from your custom action to inform the user why he cannot continue.
Please note that the control events can be managed only in an Enterprise project. If you cannot create this type of projects, the only solution is to run the custom action once and abort the installation if the user doesn't have the appropriate permissions. In this case the custom action can be scheduled under "InstallExecuteSequence" -> "CostFinalize" to make sure that it is executed after the installation folder has been set.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging