hi joe,

you can try using:

if "%errorlevel%"=="0" EXIT 0
if "%errorlevel%"=="1" EXIT %errorlevel%

Quits the CMD.EXE program (command interpreter) or the current batch
script.

EXIT [/B] [exitCode]

  /B          specifies to exit the current batch script instead of
              CMD.EXE.  If executed from outside a batch script, it
              will quit CMD.EXE

  exitCode    specifies a numeric number.  if /B is specified, sets
              ERRORLEVEL that number.  If quitting CMD.EXE, sets the process
              exit code with that number.

for the batch file. specify the exitCode as 0 for success... this way, you 
can check for error. not sure whether batch file for error checking is the 
right code. Do try and give the right feedback. Then, you can set ur wix 
script return of custom action as check.

-Tony

--------------------------------------------------
From: "Joe Osman" <[EMAIL PROTECTED]>
Sent: Tuesday, November 25, 2008 11:37 AM
To: "General discussion for Windows Installer XMLtoolset." 
<wix-users@lists.sourceforge.net>
Subject: Re: [WiX-users] Uninstall error:"A program 
requiredforthisinstalltocomplete could not be run"

> Thinks Tony.
> If I put it to Ignore, how can I check for errors in the exe execution?
>
> Han Sheng wrote:
>> Hi joe,
>>
>> you put ur custom action as check. If your exe returns a value > 0, it 
>> means
>> it fails. Try changing the return value to ignore.
>>
>> - Tony
>>
>> --------------------------------------------------
>> From: "Joe Osman" <[EMAIL PROTECTED]>
>> Sent: Tuesday, November 25, 2008 7:20 AM
>> To: "General discussion for Windows Installer XMLtoolset."
>> <wix-users@lists.sourceforge.net>
>> Subject: [WiX-users] Uninstall error :"A program required for this 
>> installto
>> complete could not be run"
>>
>>
>>> I am installing a .cmd file and I run it during the installation using a
>>> Custom Action. When I run the uninstall I get the following error 
>>> message:
>>> "There is a problem with this Windows Installer package. A program
>>> required for this install to complete could not be run. Contact your
>>> support personnel or package vendor"
>>>
>>> I suspect that the installer is trying to execute this file after it has
>>> been removed but I couldn't find a way to solve it. Below is the code.
>>> Thank s for your help.
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>>>    <Product Id="{E8E89B9D-D37A-46b3-A6EE-DFEFDDFCF89B}"
>>> Name="ProductInstall" Language="1033" Version="1.0.0.0"
>>> Manufacturer="T1" UpgradeCode="8bf3db65-ec81-4456-ac12-7740ee1a1c61">
>>>        <Package InstallerVersion="200" Compressed="yes" />
>>>        <Media Id="1" Cabinet="ProdInstall.cab" EmbedCab="yes" />
>>>
>>>        <Directory Id="TARGETDIR" Name="SourceDir">
>>>            <Directory Id="ProgramFilesFolder">
>>>                <Directory Id="INSTALLLOCATION" Name="ProdInstall">
>>>                    <Directory Id="SetUP" Name="Setup">
>>>                        <Component Id="CreateDataBaseCmd" DiskId="1"
>>> Guid="{0771B8C9-36E4-4d04-9757-3B61296D0EAD}">
>>>                            <File Id="CreateDataBase"
>>> Source="CreateDataBase.cmd"  />
>>>                        </Component>
>>>                    </Directory>
>>>                </Directory>
>>>            </Directory>
>>>        </Directory>
>>>
>>>        <Feature Id="ProductFeature" Title="DemoProdInstall" Level="1">
>>>            <ComponentRef Id="CreateDataBaseCmd" />
>>>        </Feature>
>>>
>>>        <CustomAction Id="DoSomething"
>>>              FileKey="CreateDataBase"
>>>              ExeCommand="-switch"
>>>              Execute="deferred"
>>>              Return="check"
>>>              HideTarget="no"
>>>              Impersonate="no" />
>>>        <InstallExecuteSequence>
>>>            <Custom Action="DoSomething" Before="InstallFinalize" />
>>>        </InstallExecuteSequence>
>>>    </Product>
>>> </Wix>
>>>
>>>
>>> =======================================================================
>>> This email, including any attachments, is only for the intended
>>> addressee.  It is subject to copyright, is confidential and may be
>>> the subject of legal or other privilege, none of which is waived or
>>> lost by reason of this transmission.
>>> If the receiver is not the intended addressee, please accept our
>>> apologies, notify us by return, delete all copies and perform no
>>> other act on the email.
>>> Unfortunately, we cannot warrant that the email has not been
>>> altered or corrupted during transmission.
>>> =======================================================================
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's 
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great 
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the 
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>
> =======================================================================
> This email, including any attachments, is only for the intended
> addressee.  It is subject to copyright, is confidential and may be
> the subject of legal or other privilege, none of which is waived or
> lost by reason of this transmission.
> If the receiver is not the intended addressee, please accept our
> apologies, notify us by return, delete all copies and perform no
> other act on the email.
> Unfortunately, we cannot warrant that the email has not been
> altered or corrupted during transmission.
> =======================================================================
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's 
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great 
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the 
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to