cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
John_Morley
Level 3

Custom Action is not running.....

Hi,

I specify two Custom Actions in my Install, one is 'After File Transfer', and does not seem to be running, and the other is 'After Setup Is Complete', and does seem to be working properly. Both Custom Actions are executables that I wrote, and I've got some diagnostics in each of them to let me know they are being run. One runs successfully, and the other does not. Neither needs to wait for completion or anything like that.

Is there some kind of Install time logging that will tell me if my CA is being launched? Or, how do I troubleshoot this issue?

Thanks,

John
Labels (1)
0 Kudos
(5) Replies
DebbieL
Level 17

Yes, you can have a verbose log created by running the installation from the command line and specifying something like this:

Setup.exe /v"/l*v \"c:\MyLog.log\""

or

msiexec /i "C:\package.msi" /l*v "d:\MyLog.log"

The log is a good place to start when troubleshooting something like this.
0 Kudos
John_Morley
Level 3

Hi Debbie,

I can see that my Custom Action that isn't working is being invoked in the install log. Here is the pertinent section

MSI (s) (5C:5C) [15:59:49:182]: Doing action: InstallTIMDrivers
Action 15:59:49: InstallTIMDrivers.
Action start 15:59:49: InstallTIMDrivers.
InstallTIMDrivers:
Action ended 15:59:49: InstallTIMDrivers. Return value 1.

I can explore the installation disk and run the executable manually and it works fine, so I'm not sure why ISE is not able to run it as a CA??

My CA that is working shows up like this in the log:

MSI (c) (34:48) [15:59:57:794]: Doing action: CopyFiles
Action 15:59:57: CopyFiles.
Action start 15:59:57: CopyFiles.
MSI (c) (34:48) [15:59:57:794]: PROPERTY CHANGE: Adding CopyFiles property. Its value is 'CopyFiles'.
Action ended 15:59:57: CopyFiles. Return value 0.

I note that the return value for the non-working CA is '1', while the working CA returns '0'. Is that significant?

Thanks,

John
0 Kudos
DebbieL
Level 17

Well, the Windows Installer documentation for logging indicates that return value 0 is "function not called" and 1 is "an action completed successfully."
http://msdn.microsoft.com/en-us/library/aa369778%28v=VS.85%29.aspx
That seems odd, given your observations of which action seemed to work, and which one did not.

Do these custom actions require anything that is installed with the product? How did you configure the settings for these actions in your project?

Can you try posting the entire log file? The snippets do not contain enough information to diagnose the problem.

Thanks!
0 Kudos
John_Morley
Level 3

Hi Debbie,

Each executable does require some additional files. One executable copies some customer specific data files from the installation CD to the target system (this one works!), and the other installs some hardware drivers on the target machine (and doesn't work!)......

The Custom Action that doesn't work can be invoked manually from the installation CD and works just fine, but does nothing (apparently) when run as a CA from the installer.

The full log file is an attachment.

Thanks,

John
0 Kudos
hidenori
Level 17

The verbose log for the installation does not provide much information that helps identifying your issue. So I would recommend that you debug your code by logging your own debug messages for your custom action using the MsiProcessMessage API with INSTALLMESSAGE_INFO or displaying your own debug messages using the MessageBox API.

Hope that helps.
0 Kudos