Here are a few suggestions that might help:

That error could mean that the program starts but is returning a
non-zero error. Change Return="check" to Return="ignore" to test this. 

You need to specify the full path to the program to run and put it in
quotes. The Directory attribute just specifies the working directory.

Generate a log and look in it make sure the temp directory that you are
looking in is the same one the installer is installing to. 

Is your action that displays a message also deferred ?

If you want to access any per-user locations, you should set your custom
action to Impersonate="yes".

Here is a working sample that does what you want to do with notepad.exe.

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
    <Product Id="B75A623F-D9A0-4229-B3C5-EFB78003379B" Name="Test"
Version="1.0.0" UpgradeCode="8327B09F-B25F-4B8B-A205-12827398F58A"
Language="0" Manufacturer="Me">
        <Package Compressed="yes" InstallScope="perMachine" />
        <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="TempFolder">
                <Component Id="mainComponent" Guid="*">
                    <File Id="exefile" Source="C:\WINDOWS\notepad.exe"
Checksum="yes" KeyPath="yes" />
                </Component>
            </Directory>
        </Directory>
        <Feature Id="mainFeature" Level="1">
            <ComponentRef Id="mainComponent" />
        </Feature>
        <CustomAction Directory="TempFolder"
ExeCommand="&quot;[#exefile]&quot;" Execute="deferred" Id="CustomAction"
Return="check" />
        <InstallExecuteSequence>
            <Custom Action="CustomAction" After="InstallFiles">not
Installed</Custom>
        </InstallExecuteSequence>
    </Product>
</Wix>

The condition on the custom action is needed because during
uninstallation, the files are removed before the custom action executes.



-----Original Message-----
From: Natalia [mailto:natalia.gladk...@arcadia.spb.ru] 
Sent: 03 July 2009 15:32
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Execute sql script using bcp.exe


I can't see the files on the disk after InstallFiles... (I've put custom
action displaying message box just after InstallFiles)

Installation fails with the message
"Error 1721. There is a problem with this Windows Installer package. A
program required for this install to complete could not be run. "

Custom action is defined as follows:

--
<CustomAction Id="CustomAction" Directory="TempFolder"
ExeCommand='FullDatabaseSetup.cmd localhost mydatabase'
Execute='deferred'
Return="check" />
--

(let's forget for now about bcp.exe)

All files should be copied to the TempFolder during installation (but I
can see that after InstallFiles they are stll not there)

I can't see what I'm doing wrong...


Natalia wrote:
> 
> Hello all,
> 
> I need to run bcp.exe (Bulk Copy Program) in my installation and I 
> have to pass parameter to it - the path to the sql script to run. This

> script is not on the local machine, it is in my package. So, I gather,

> I have to copy this script to the hard drive somehow, maybe - to the
Temp folder.
> But I have no idea how can I do this!
> 
> As I understand, the files being installed by wix are not actually 
> present on the machine before install finalize...
> 
> Any help would be greatly appreciated.
> 

--
View this message in context:
http://n2.nabble.com/Execute-sql-script-using-bcp.exe-tp3200359p3201625.
html
Sent from the wix-users mailing list archive at Nabble.com.


------------------------------------------------------------------------
------
_______________________________________________
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.


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

Reply via email to