PDA

View Full Version : Send Installer property to dll by custom action



yonitr
12-05-2004, 02:21 AM
Hi,
I'm calling a dll with a custom action. The dll is expecting a path. I need to send it the [INSTALLDIR] value.
In the Custom Action Wizard-> Function Definition-> Arguments- I specify the Constant String, but it doesn't translate [INSTALLDIR] to the real value. Maybe that's not the way to do it.
How can I send the dll the [INSTALLDIR] value ("C:\Program Files\Common Files\...")?

Thanks

Christopher Painter
12-05-2004, 08:30 AM
Read this example on how to call MessageBoxA.

http://helpnet.installshield.com/robo/projects/InstallShieldXHelpLib/IHelpDLLFunctionStdEx.htm

Basically its a property not a constant, and lose the brackets. They aren't needed since we already know its a property.

yonitr
12-06-2004, 09:20 AM
Hi,
INSTALLDIR property is not included in the Property Manager and when I try to send it as "in property" to MessageBoxA in the custom action it creates a new property in the property table with the value 0. I did succeeded with ProductVersion, but not with INSTALLDIR.
I need to send the path to INSTALLDIR with: [INSTALLDIR]/someFolder/someFile.txt
How can I do that?

Thanks

Christopher Painter
12-06-2004, 10:46 AM
[INSTALLDIR] is in the directory table not the property table. But there is a way to link the two together. Just let it add the property then delete the property. If you put the custom action on the next button of the custom dialog install you will see that it does indeed resolve the data from the contents of INSTALLDIR from the directory table.

jlalande
12-23-2004, 02:22 PM
I also need to do what yonitr needs to do.

You mention "a way to link the two together. Just let it add the property then delete the property." What is "it"? What is adding the property then deleting it?

Thanks
John