MsiProcessMessage() is probably what you're looking for. I don't know what
the DTF equivalent is.
http://msdn.microsoft.com/en-us/library/aa370354%28v=vs.85%29.aspx


-----Original Message-----
From: bharat jasti [mailto:bharat.ja...@gmail.com] 
Sent: 12 April 2011 14:29
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Setup wizard ended prematurely because of an error

Hello Uwe,

Thanks for the info. This is my action script code:

*public class CustomActions
    {
        [CustomAction]
        public static ActionResult MySimpleAction(Session session)
        {
            try
            {
                File.AppendAllText(@"c:\tmp\time.txt", ";Installation: " +
DateTime.Now.ToString());
            }
            catch (Exception)
            {
                return ActionResult.Failure;
            }
            return ActionResult.Success;
        }
    }*The above custom script is creating a text file under tmp folder. It
works fine when tmp folder exists without error. But when I remove temp
folder to check the error message to display, setup is ending prematurely.

Following are my CustomAction and Install Sequence

* <CustomAction Id="myActionId"
          BinaryKey="myAction"
          DllEntry="MySimpleAction"
          Execute="deferred"
          Return="check" />

      <InstallExecuteSequence>
        <Custom Action="myActionId" After="InstallInitialize"></Custom>
      </InstallExecuteSequence>*


Thanks & Regards,
Bharat Jasti
Team IT
Rainbow Design Services



On Tue, Apr 12, 2011 at 5:08 AM, Uwe Ernst <uwe.er...@gmail.com> wrote:

> Hi Bharat,
>
> your CustomAction probably throws an uncatched exception. Methods
> capable of throwing exceptions should be executed from within a
> try-catch block. There you can show the user your own error message or
> create the missing directory. My experience is, that exceptions are not
> transported from the c# method to the installer runtime, so you always
> have to take care of possible exceptions.
>
>
> Regards Uwe
>
> Am 12.04.2011 00:02, schrieb bharatj:
> > Hello All,
> >
> > I have written my first action script using C#. It has to create a text
> > under temp folder. If temp folder exists action script runs successfully
> and
> > WIX MSI works perfect. If temp folder doesnt exist action script returns
> > failure and Setup ends prematurely. It is not showing the intended
> message
> > like " Unable to create file ".
>
>
>
>
-----------------------------------------------------------------------------
-
> Forrester Wave Report - Recovery time is now measured in hours and minutes
> not days. Key insights are discussed in the 2010 Forrester Wave Report as
> part of an in-depth evaluation of disaster recovery service providers.
> Forrester found the best-in-class provider in terms of services and vision.
> Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
-----------------------------------------------------------------------------
-
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to