Thanks for your reply Dov. I am using WiX 3.0.5419.0. My VM has 1.5GB RAM and 
is otherwise idle, so I hope that it's not a memory issue!

I have been investigating this further and have been able to reproduce the 
issue with a very simple installer:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Product Id="aebcd909-cac6-4f5c-acaa-3ff9626aa63d" Name="MyInstaller" 
Language="1033" Version="1.0.0.0" Manufacturer="MyInstaller" 
UpgradeCode="dc580afa-5bd9-492f-87ac-cc7df3bc4e74">
    <Package InstallerVersion="200" Compressed="yes" />
    <Binary Id="CustomActions" 
SourceFile="$(var.MyCustomAction.TargetDir)\$(var.MyCustomAction.TargetName).CA.dll"
 />
    <CustomAction Id="MyCustomAction" BinaryKey="CustomActions" 
DllEntry="MyCustomAction" />
    <InstallExecuteSequence>
      <Custom Action="MyCustomAction" After="FindRelatedProducts" />
    </InstallExecuteSequence>
  </Product>
</Wix>

My custom action code is as follows:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Deployment.WindowsInstaller;

namespace MyCustomAction
{
    public class CustomActions
    {
        [CustomAction]
        public static ActionResult MyCustomAction(Session session)
        {
            return ActionResult.Success;
        }
    }
}

The CustomAction.config file is just the default one generated by Votive.

The Windows Installer log (generated by calling msiexec with /l*v) shows the 
following:

MSI (s) (38:F8) [05:44:09:180]: Doing action: MyCustomAction
MSI (s) (38:F8) [05:44:09:180]: Note: 1: 2205 2:  3: ActionText 
Action ended 5:44:09: FindRelatedProducts. Return value 0.
MSI (s) (38:E8) [05:44:09:212]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSI5986.tmp, Entrypoint: MyCustomAction
MSI (s) (38:84) [05:44:09:212]: Generating random cookie.
MSI (s) (38:84) [05:44:09:212]: Created Custom Action Server with PID 5216 
(0x1460).
MSI (s) (38:08) [05:44:09:368]: Running as a service.
MSI (s) (38:08) [05:44:09:368]: Hello, I'm your 32bit Impersonated custom 
action server.
Action start 5:44:09: MyCustomAction.
SFXCA: Extracting custom action to temporary directory: 
C:\Windows\Installer\MSI5986.tmp-\
SFXCA: Binding to CLR version v2.0.50727
Calling custom action MyCustomAction!MyCustomAction.CustomActions.MyCustomAction
CustomAction MyCustomAction returned actual error code 1603 (note this may not 
be 100% accurate if translation happened inside sandbox)
Action ended 5:44:09: MyCustomAction. Return value 3.

Are there any other options for debugging/tracing what could be going wrong?

Thanks!

Mike

-----Original Message-----
From: Dov Kleinman [mailto:d...@microsoft.com] 
Sent: 04 May 2010 15:15
To: General discussion for Windows Installer XML toolset.; Michael Bednarek 
Subject: Re: [WiX-users] .NET Custom Action fails intermittently on some 
machines

Hi,

I'm facing the same problem for quite some time. Same OS (W2K8R2), same 
conditions (VM) without a decent explanation.
I have an immediate custom action gathering some info and finally setting a 
property. Sometimes it fails without a reasonable explanation.
Investigating the DFT source code suggests it may correlate to the amount of 
memory the machine has available. Do you get more failures while decreasing the 
allocated VM memory? 
What WiX build number are you using? Maybe this flaw sneaked-in in a certain 
build and if we track it we can resolve it.

Thanks,
Dov





-----Original Message-----
From: Michael Bednarek [mailto:michael.bedna...@eu.citrix.com] 
Sent: Tuesday, March 02, 2010 11:46 AM
To: Michael Bednarek; General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] .NET Custom Action fails intermittently on some 
machines

Update: I installed/uninstalled the product 100 times on a particular machine 
(using a script) and the problem with my custom action occurred just once out 
of those 100 attempts....

From: Michael Bednarek
Sent: 02 March 2010 08:37
To: General discussion for Windows Installer XML toolset.
Subject: .NET Custom Action fails intermittently on some machines

Hi all,

Our product fails to install (seemingly at random) once every so often. Once 
this failure occurs on a given machine, it is not usually possible to reproduce 
the problem again (re-installing the product will work fine).

The machines on which the install fails are VMs which all come from the same 
base image (Windows 2008 R2 x64).

The install always fails during one of our custom actions, which is written in 
.NET using DTF. The custom action (called "SetUserLanguage") is quite simple: 
it detects the .NET current culture and puts the two-letter language code of 
the culture (e.g. "en") into a property called "UserLanguage". According to the 
MSI logs, this code is running successfully - we see our own log statements 
appearing, and we see MSI report that the "UserLanguage" property has been set. 
However, an error seems to occur somewhere between the .NET code completing, 
and the MSI continuing with the next action.

Here's the pertinent part of the MSI log:

---
MSI (s) (6C:08) [08:29:01:854]: Doing action: SetUserLanguage
MSI (s) (6C:08) [08:29:01:886]: Creating MSIHANDLE (33847) of type 790542 for 
thread 4616
MSI (s) (6C:38) [08:29:01:886]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSI3B7B.tmp, Entrypoint: SetUserLanguage
MSI (s) (6C!40) [08:29:02:276]: Creating MSIHANDLE (33848) of type 790531 for 
thread 4672
Action start 8:29:01: SetUserLanguage.
MSI (s) (6C!40) [08:29:02:276]: Closing MSIHANDLE (33848) of type 790531 for 
thread 4672
MSI (s) (6C!40) [08:29:02:525]: Creating MSIHANDLE (33849) of type 790531 for 
thread 4672
SFXCA: Extracting custom action to temporary directory: 
C:\Windows\Installer\MSI3B7B.tmp-\
MSI (s) (6C!40) [08:29:02:525]: Closing MSIHANDLE (33849) of type 790531 for 
thread 4672
MSI (s) (6C!40) [08:29:02:806]: Creating MSIHANDLE (33850) of type 790531 for 
thread 4672
SFXCA: Binding to CLR version v2.0.50727
MSI (s) (6C!40) [08:29:02:822]: Closing MSIHANDLE (33850) of type 790531 for 
thread 4672
MSI (s) (6C!40) [08:29:02:993]: Creating MSIHANDLE (33851) of type 790531 for 
thread 4672
Calling custom action CustomActions!CustomActions.CustomActions.SetUserLanguage
MSI (s) (6C!40) [08:29:02:993]: Closing MSIHANDLE (33851) of type 790531 for 
thread 4672
MSI (s) (6C!40) [08:29:02:993]: PROPERTY CHANGE: Adding UserLanguage property. 
Its value is 'en'.
Detected culture as en-US and converted to language en
MSI (s) (6C:38) [08:29:03:024]: Closing MSIHANDLE (33847) of type 790542 for 
thread 4616
CustomAction SetUserLanguage returned actual error code 1603 (note this may not 
be 100% accurate if translation happened inside sandbox)
Action ended 8:29:03: SetUserLanguage. Return value 3.
Action ended 8:29:03: INSTALL. Return value 3.
---

Does anyone have any ideas why our custom action (or DTF) might be failing, and 
how we could investigate further?

Thanks!

Mike Bednarek





------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to