I’ve created a custom action dll (vb.net) to execute a file that’s installed along with my project.
How do I provide the target path to the dll? As this can be changed during the installer I cannot hard code the path within the DLL?
If this is not possible could I put the file in a temp location and execute from there?
Depending on the setup authoring tool you are using, an MSI package supports this type of custom actions:
So you should first make sure that your custom action is supported by Windows Installer.
After you have a working custom action, you can pass the file path to it through a file reference. For example:
Where “myFileId.ext” is the file ID from File table.
This reference can be saved in CustomActionData which is read by your DLL custom action or passed as a command line argument to an EXE custom action.