Are you dynamically linking against MSVCRT?  More specifically, what are the 
dependencies your CustomAction has on the OS and are they all met?  It is 
possible your CustomAction has some dependency and failing to load right off 
the bat.  Also, can you share the .wxs authoring for the CustomAction.  When is 
it being scheduled?

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 2:20 PM
To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net
Subject: Re: [WiX-users] Logging in a custom action

Yeah, the error was in the custom action. (It returned the value 3)

I had tried to attach to msiexec.exe before to debug, but didn't make any 
progress with that.

Can you show me how you fired off the MessageBox from within your CA?


This is a lot of debugging just so I can debug :)
________________________________
From: Brian Simoneau [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 4:57 PM
To: Rowland, Chris; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action

Was the error in the custom action itself?  If so, then you can always try to 
debug the custom action in Visual Studio.  I was able to do this by adding a 
MessageBox to the beginning of the custom action and then attaching to the 
MessageBox when the custom action was run.  If the error was when launching the 
custom action, there may be a missing dependency.

-Brian Simoneau
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 4:51 PM
To: Brian Simoneau; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action
After an obscene amount of headbanging, I finally managed to get it to build 
(with warnings) with the almighty T() call.

Unfortunately that resulted in a CA that caused the installer to quit due to an 
error.  If only I could log what was going on ><

Assuming the lack of wrapping my strings was not the issue, is there anything 
else (no matter how obvious, cause it might not be obvious to me) that I might 
be doing wrong?

________________________________
From: Brian Simoneau [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 3:18 PM
To: Rowland, Chris; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action

_T is a macro defined in tchar.h.  I believe this was included in earlier 
Visual Studios because my custom actions were originally written in VS2003.  It 
looks like __out and others are defined in sal.h.

-Brian Simoneau
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 3:05 PM
To: Brian Simoneau; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action
It's an immediate CA.  I tried wrapping my strings with _T() but _T is not 
defined. Another VS05 difference?

Could my definitions be causing a problem? I more or less copied them from a 
forum post I saw regarding a similar problem.

#define __out /* ? */
#define __in /* ? */
#define __inout /* ? */
#define __in_bcount(THING) /* ? */

________________________________
From: Brian Simoneau [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 2:59 PM
To: Rowland, Chris; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action

That code looks the same as what I am using except that I have _T() around my 
strings.  Are you running your custom action immediate or deferred?

-Brian Simoneau
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 2:31 PM
To: Brian Simoneau; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action
Thanks for the continuing advice.  I'm still not seeing any log out put though. 
 I've commented out the guts of my CA, so now I have just:

extern "C" UINT __stdcall VerifyLicenseDir(MSIHANDLE hInstall)
{
      WcaInitialize(hInstall, "VerifyLicenseDir");
      WcaLog(LOGMSG_STANDARD, "Enter VerifyLicenseDir");
      return WcaFinalize(ERROR_SUCCESS);
}

MSI (c) (04:F4) [14:19:38:375]: Doing action: VerifyLicenseDir
MSI (c) (04:F4) [14:19:38:375]: Note: 1: 2205 2:  3: ActionText
Action 14:19:38: VerifyLicenseDir.
Action start 14:19:38: VerifyLicenseDir.
MSI (c) (04:C8) [14:19:38:390]: Invoking remote custom action. DLL: C:\... 
Entrypoint: VerifyLicenseDir
MSI (c) (04:C0) [14:19:38:390]: Cloaking enabled.
MSI (c) (04:C0) [14:19:38:390]: Attempting to enable all disabled priveleges 
before calling Install on Server
MSI (c) (04:C0) [14:19:38:390]: Connected to service for CA interface.
Action ended 14:19:38: VerifyLicenseDir. Return value 1.

Did I feed WcaInitialize a bad 2nd argument? I was guessing it was just going 
to be used as an identifier in the log output.
Do I need to call WcaGlobalInitialize/WcaGlobalFinalize in some way as well?

Thanks again for your help.  Google doesn't reveal much on this subject :(

________________________________
From: Brian Simoneau [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 1:58 PM
To: Rowland, Chris; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action

You have to call WcaInitialize in your method before you can call WcaLog.  You 
also need to call WcaFinalize before you exit the method.  So your last line 
could look something like:
return WcaFinalize(ERROR_SUCCESS);

-Brian Simonea
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to