Set a property in the installer (for example, CA001STATUS) and then use the
property in the installer flow.
Return an error from the custom action only if the error should stop the
installation and you do not need to show the user a friendly error message.
Good luck.

Dan

-----Original Message-----
From: Adriana Cass [mailto:adrya1...@gmail.com] 
Sent: Monday, October 04, 2010 9:02 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Set error code from Custom Action

Hi,

I have a custom action created in C#.
How can i return my specific error code back to installer when my
custom action fails?

       [CustomAction]
       public static ActionResult MyCA(Session session)
       {
           try
           {
               //code
           }
          catch(Exception ex)
          {
           // set my error code ????????
          }
     }

I saw that it always return 1603 when it fails. But i want to return
my error code 6004 for example.

Thank you,
Adriana

----------------------------------------------------------------------------
--
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to