Click to See Complete Forum and Search --> : MsiGetProperty not working in a VS7 Deployment Project.


Brad Younie
March 25th, 2003, 09:50 AM
I wrote a DLL that has one function that will be called by an installer to perform a custom action.

The function merely does an MsiGetProperty call to get the value of [TARGETDIR], then writes the value to a text file for me to verify that it worked.

I put the "Primary Output" of the dll project into a Merge Module project in Visual Studio 7.

I then created a Custom Action to call the one function.

I built the merge module and inserted it into an InstallShield Developer 7 project, and built it.

When I run the installer, the custom action is fired off because the text file gets created and some text is written.

However, the value of the property does NOT get written. The return code shows that the call to MsiGetProperty succeeded, and I have verified that 0 bytes are written to my string buffer.

What makes it trickier is that if I remove the merge module from the InstallShield project, add the file and create the custom action within IS, it all works fine and it successfully gets the property's value.

This tells me that it is not a problem with my dll, but instead with how Visual Studio 7 generates its merge modules.

Can anyone shed some light on this dilemma?

a_anushree@hotmail.com
August 7th, 2006, 02:27 PM
Hi,

I am also getting same problem. Any luck?

anushree