[wix-users] Quiet Execution CA Documentation Issue
Edwin Castro
egcastr at gmail.com
Fri Mar 30 09:59:49 PDT 2018
The scheduling for //SetProperty/@Id="StopSolr" must happen after
CostFinalize since that is when directory and file paths are completely
resolved. I don't have a lot of experience with InstallUISequence because I
build only MSI packages without UI but if the StopSolr property is not used
beyond the StopSolr custom deferred action then scheduling it only in
InstallExecuteSequence makes sense.
The scheduling for //Custom/@Action="StopSolr" doesn't seem right...
InstallExecute is not a standard action... Is it a custom action you
defined? For it to run deferred it must be scheduled between
InstallInitialize and InstallFinalize. For the solr.cmd file to be
available, this custom action must be scheduled after InstallFiles. Is the
perhaps meant to run during uninstall instead of installs? If so, you'll
want to condition this appropriately and schedule before RemoveFiles.
Side note: if solr.cmd is installed by your MSI, then consider using [#
solr.cmd.file.id] instead of [INSTALLDIR]\bin\solr.cmd where
solr.cmd.file.id is the file id for solr.cmd. [#solr.cmd.file.id] will
resolve to the full path of the file given by solr.cmd.file.id. For details
see:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368609.aspx
--
Edwin G. Castro
On Fri, Mar 30, 2018 at 8:05 AM, Joel McBeth via wix-users <
wix-users at lists.wixtoolset.org> wrote:
> I was following the document for Quiet Execution Custom Action, found
> here: http://wixtoolset.org/documentation/manual/v3/
> customactions/qtexec.html
>
> I'm trying to run a batch file stored in the [INSTALLDIR] for my
> application and the Deferred section it covers this. It documents how to
> use a property. However with the example provided I am finding that it
> gives me the error:
>
> Found an ActionRow with a non-existent Before action:
> <action name>.
>
> The document says that the SetProperty must run immediate while the custom
> action runs deferred. The default sequence for SetProperty is 'both' and
> the command line custom action is only defined in the
> InstallExecuteSequence. To fix this error I set the sequence for
> SetProperty to execute.
>
> So I end up with:
>
> <SetProperty Id="StopSolr" Value=""[INSTALLDIR]\bin\solr.cmd"
> stop -all" Before="StopSolr" Sequence="execute" />
> <CustomAction Id="StopSolr" BinaryKey="WixCA" DllEntry="WixQuietExec"
> Execute="deferred" Return="check" Impersonate="no" />
>
> <InstallExecuteSequence>
> <Custom Action="StopSolr" Before="InstallExecute"/>
> </InstallExecuteSequence>
>
> Am I doing this correctly? Is that just something missing from the example
> in the document?
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
More information about the wix-users
mailing list