Thanks Erik. I finally figured it out (with your help). Here's my new example.
<CustomAction Id="CA1" Property="CA1_PROP" Value="[SystemFolder]cmd.exe" /> <CustomAction Id="CA2" Property="CA1_PROP" ExeCommand="/c dir "[INSTALLDIR]" > c:\dir2.txt" /> <InstallExecuteSequence> <Custom Action="CA1" After="InstallFinalize" /> <Custom Action="CA2" After="CA1" /> </InstallExecuteSequence> I could have sworn that back in my InstallShield days that I just had type 51 custom actions (without a corresponding type 50) Thanks again. Dale -----Original Message----- From: Erik Garcia [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 9:33 AM To: Dale Quigg Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Custom action to run cmd.exe after InstallFinalize I think the problem here is that you're misunderstanding what a CA51 does. It's returning ERROR_SUCCESS because it's doing exactly what you told it to do. You're setting the property CA2_CMD to a value. Try looking at Custom Actions 50 or 18 and see if either of these will accomplish what you need on top of (or rather after) your 51. -Erik G. On 6/1/07, Dale Quigg <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to build a custom action that invokes cmd.exe after > InstallFinalize. > > In my sample .wxs project, I have CA1, CA2, CA3. CA1 and CA3 are VbScript > custom actions (I know... don't use VbScript custom actions). CA2 is where I > try to invoke cmd.exe. > > Here's a snippet from my .wxs. > > <CustomAction BinaryKey="vbCA" VBScriptCall="CA1" Return="asyncWait" > Id="CA1" Execute="immediate"/> > <CustomAction Id="CA2" Property="CA2_CMD" Value="cmd.exe /c notepad.exe > c:\foo.txt" /> > <CustomAction BinaryKey="vbCA" VBScriptCall="CA3" Return="asyncWait" > Id="CA3" Execute="immediate"/> > <Binary Id="vbCA" SourceFile="ca.vbs" /> > > <InstallExecuteSequence> > <Custom Action="CA1" > After="InstallFinalize"></Custom> > <Custom Action="CA2" After="CA1"></Custom> > <Custom Action="CA3" After="CA2"></Custom> > </InstallExecuteSequence> > > > In my verbose install log, I see; > Action ended 8:08:52: CA1. Return value 0. > MSI (s) (0C:D0) [08:08:52:769]: Doing action: CA2 > MSI (s) (0C:D0) [08:08:52:769]: Note: 1: 2205 2: 3: ActionText > Action start 8:08:52: CA2. > MSI (s) (0C:D0) [08:08:52:769]: PROPERTY CHANGE: Adding CA2_CMD > property. Its value is 'cmd.exe /c notepad.exe c:\foo.txt'. > Action ended 8:08:52: CA2. Return value 1. > MSI (s) (0C:D0) [08:08:52:769]: Doing action: CA3 > > As far as I can tell, CA2 doesn't even really run (notepad.exe does not > appear). > > The .msi CustomAction table looks like this; > Action Type Source Target > CA1 134 vbCA CA1 > CA2 51 CA2_CMD cmd.exe /c notepad.exe c:\foo.txt > CA3 134 vbCA CA3 > > I've been working on this for about 4 hours and still haven't figured out > what I'm doing wrong. > > Any help or working examples greatly appreciated. > Dale > ------------------------------------------------------------------------ - > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > Here's a snippet from my .wxs. > > > > <CustomAction BinaryKey="vbCA" VBScriptCall="CA1" Return="asyncWait" > Id="CA1" Execute="immediate"/> > > <CustomAction Id="CA2" Property="CA2_CMD" Value="cmd.exe /c notepad.exe > c:\foo.txt" /> > > <CustomAction BinaryKey="vbCA" VBScriptCall="CA3" Return="asyncWait" > Id="CA3" Execute="immediate"/> > > <Binary Id="vbCA" SourceFile="ca.vbs" /> > > > > <InstallExecuteSequence> > > <Custom Action="CA1" > After="InstallFinalize"></Custom> > > <Custom Action="CA2" After="CA1"></Custom> > > <Custom Action="CA3" After="CA2"></Custom> > > </InstallExecuteSequence> > > > > > > In my verbose install log, I see; > > > > Action ended 8:08:52: CA1. Return value 0. > > MSI (s) (0C:D0) [08:08:52:769]: Doing action: CA2 > > MSI (s) (0C:D0) [08:08:52:769]: Note: 1: 2205 2: 3: ActionText > > Action start 8:08:52: CA2. > > MSI (s) (0C:D0) [08:08:52:769]: PROPERTY CHANGE: Adding CA2_CMD > property. Its value is 'cmd.exe /c notepad.exe c:\foo.txt'. > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users