luke.batko
Posts: 8
Joined: Tue May 05, 2020 8:39 pm

calling function from windows DLL

I have configured a deferred custom action called from a dll deployed by my setup to:

[APPDIR]gsw_sshd_inst.dll

If I change (using the destination dialog) the installation folder to something else than my default installation folder then the custom action is still called from the default installation folder instead of the location selected by the user. I was hoping that [APPDIR] is going to be replaced with the path selected by the user.

Please help.
Catalin
Posts: 6598
Joined: Wed Jun 13, 2018 7:49 am

Re: calling function from windows DLL

Hello Luke,
If I change (using the destination dialog) the installation folder to something else than my default installation folder then the custom action is still called from the default installation folder instead of the location selected by the user.
Could you please give me some more details about this as I am not quite sure I understand the secnario.

First of all, it should be impossible for your .DLL file to be called from the default location, since the default location does not even exist on the machine and therefore the .DLL should not be placed there. If the .DLL was to be called from that location, the installation package should fail, since the file does not exist there.
I was hoping that [APPDIR] is going to be replaced with the path selected by the user.
The APPDIR property should indeed be replaced with the value you select from the "FolderDlg" dialog.

I've tested this using a "Launch File" custom action that runs a simple .EXE file:

LF.png
LF.png (116.19 KiB) Viewed 1120 times

and everything worked as expected, even after changing the default path to a folder such as:

Code: Select all

C:\Program Files (x86)\zzz
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”