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!

craig27527
Posts: 5
Joined: Tue Feb 07, 2017 9:27 pm

Getting the installer directory from a custom action DLL

I have a custom action that calls into a C++ DLL in order to read some xml files and do some processing. That all works great, however, I can't figure out how from the DLL to get the directory that the installer was run from. Right now I have the xml files on the root of the C drive. I need to be able to put them in the same directory as my installer.exe. These files are very dynamic and can not be included as an internal resource.

Thanks in advance for any help.

Craig
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Getting the installer directory from a custom action DLL

Hello Craig,

To achieve this you can try to get the property value, from your custom action code, of the "SOURCEDIR" or "SETUPEXEDIR" properties.

Let us know if you have any further question.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
craigd27527
Posts: 2
Joined: Fri Mar 03, 2017 5:31 pm

Re: Getting the installer directory from a custom action DLL

That worked perfectly!!! Thanks!! :D :D
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Getting the installer directory from a custom action DLL

You're always welcome Craig.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”