Hi,

I have some questions depending on Custom Actions. I have a binary file which 
is installed with a component(always installed) this file installs a service 
with ExeCommand='-install' if the service is installed proper the installer 
returns 0, but if this service has been installed already, the installer 
returns -1, but its necessary to go on with the installation routine. But if 
the exe returns anything not -1 and 0 the installation should commit a rollback 
and exits. In uninstallation step the service could have been 
deleted(uninstalled) before so the return code is -2 if everything is ok the 
return code is 0, this should continue the uninstallation.

Is it possible to execute a custom action which executes a binary(exe) and 
checks the return code? I know return ='check' checks for return code zero, but 
I don't know, if it's possible to check the return values by my own.
If this is possible it will be nice to assign the return code to condition(s) 
which executes custom actions or rollback(exits the installation).

So my questions are:
* is it possible to check the return code by my routines?
* is it possible to do some conditions with this return codes.
* which conditions are available for custom actions, and where to put them?

My code currently looks like that, which just checks for return code 0 and does 
not even commit a correct rollback of the installation if failed(not 0):

    <CustomAction Id='LauchInstall' FileKey='myexe' ExeCommand='-Install' 
Return='check'/>
    <CustomAction Id='LauchUnistall' FileKey='myexe' ExeCommand='-Uninstall' 
Return='check'/>

    <InstallExecuteSequence>
      <!-- some other customs.... -->
      <Custom Action='LauchInstall' After='InstallFinalize'>
        NOT Installed
        <!-- HERE DO SOME CONDITIONS ON RETURN CODES: or is this the wrong 
place ? -->
      </Custom>
      <Custom Action='LauchUnistall' Before="RemoveFiles">
        REMOVE
        <!-- HERE DO SOME CONDITIONS ON RETURN CODES: or is this the wrong 
place ? -->
      </Custom>
      <RemoveExistingProducts After='InstallFinalize' />
    </InstallExecuteSequence>


Thanks in advance

Martin Lierschof

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to