Did you link dynamically to the CRT? If that is the case the CRT DLL's are 
going to be on your normal system, but not on the "clean" system. You typically 
want to link statically to the CRT for custom action DLL's to avoid the 
dependency.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Bardon
Sent: Monday, April 02, 2007 5:20 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Problem with simple custom action DLL

I've run into a strange problem with a custom action DLL that works just
fine on one system, but not on the "clean" test system that I've been
working with (a fresh XP install in virtual server).  On my dev machine,
and my second "not so clean" XP machine (has VS installed), the msi
works fine, and the DLL returns 1 in the log.  On the virtual machine
though, I get a return code of 3 in the log, with no extra information.
I took things down to the simplest level, and tried this DLL code:

UINT __stdcall TestFn(MSIHANDLE hInstall)
{
        return ERROR_SUCCESS;
}

Again, method gets called fine on Server 2003 and XP, but not in the
fresh XP virtual machine.  There shouldn't be anything that changes in a
virtualized environment, so is there something else I'm missing?  The
Wix code to run the CA looks like this:

<InstallUISequence>
        <Custom Action="GetInstallProperties" Before="AppSearch"/>
</InstallUISequence>
<Binary Id="CTTCustomAction"
SourceFile="..\..\..\bin\MSICustomAction.dll" />
<CustomAction Id="GetInstallProperties" BinaryKey="CTTCustomAction"
DllEntry="TestFn" Return="check" Execute="immediate"/>


Any idea what would stop a DLL from working on the second system?
Doesn't look like there's anything useful in the log except the return
code, and since my method returns SUCCESS, that tells me that my DLL
probably isn't being called correctly.  Is there a prerequisite for even
running CA DLLs?

Thanks,

Chris

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to