Custom action using EXE file that needs DLLs - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Smadash
Posts: 16
Joined: Thu Aug 06, 2009 9:44 pm

Custom action using EXE file that needs DLLs

I am trying create a custom action that involves running one of the executable files.
The specific executable depends on a couple of DLLs that are also included within the installation package.
When I press that button on my new dialog the executable would not run.
I suspect that the reason is that the DLLs are not available at this point since the files were not copied to the target directory yet.
If I change the EXE file to a file that does not need any other DLLs from the installation package the EXE is launched and runs properly.
Is there a way to overcome this problem or do I need to create a static library version of the DLLs.

Thanks
Asher
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Custom action using EXE file that needs DLLs

Hi Asher,
When I press that button on my new dialog the executable would not run.
You are trying to execute during "InstallUISequence" (when installation dialogs are shown) and in this stage your files are not copied on the target machine.
In this case you can use a static DLL or you can add your files as temporary files. In this way the files are copied on the target machine after the InstallUISequence -> MigrateFeatureStates standard action and removed after InstallExecuteSequence -> InstallFinalize.
I suspect that the reason is that the DLLs are not available at this point since the files were not copied to the target directory yet.
Yes ,it is correct. It must be scheduled after the files have been deployed on the target computer.

Another solution could be to place the custom action under InstallExecuteSequence -> InstallFiles standard action after the files are copied.
The custom action that you are using should be set as "Deferred with no impersonation" in the Custom Action Properties page.
Please note the custom action is executed automatically after "InstallFiles" stage and not when you press the button.

Best regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”