This area is documented by the windows installer team in their blog as one
(of several) where EXE custom actions are deficient compared to DLL custom
actions. The "fix" is to use a DLL custom action that can spawn the EXE,
wait for its return, and "do the right thing" with the EXE's return status
WRT the installation.

Currently CAQuietExec doesn't do that (it exists solely to run console-apps
without a visible console), but you have access to the source code so you
can copy/rename that action and add code to perform that extra step. Or you
can talk one of us into doing it for you.

-----Original Message-----
From: Lian Jiang [mailto:lji...@microsoft.com] 
Sent: Wednesday, September 30, 2009 2:32 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] is there a way to ignore one error code instead of all?

Hi,

I have a custom action which need a reboot. If I do not ignore the return,
my installer will fail due to error 1603. But if I do ignore the return, it
is risky that this custom action fails due to other reason and the installer
does not rollback.

Is there a way to constraint this custom action to only ignore 1603 return
value and check any other values?

Here is an example of my custom actions ignoring return value:

    <CustomAction Id="AllowRemoteDesktopFirewallException"
                  Property="AllowRemoteDesktopFirewallExceptionDeferred"
                  Value='"[WindowsFolder]system32\netsh.exe" advfirewall
firewall set rule group="remote desktop" new enable=Yes'
                  Execute='immediate'/>
    <CustomAction Id="AllowRemoteDesktopFirewallExceptionDeferred"
                  BinaryKey='WixCA'
                  DllEntry="CAQuietExec"
                  Execute="deferred"
                  Return="ignore"
                  Impersonate="no" />

Appreciate your help.


Thanks
Lian
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to