[wix-users] Quiet Execution CA Documentation Issue

Edwin Castro egcastr at gmail.com
Fri Mar 30 14:05:40 PDT 2018


Does the installs out in the wild uninstall and upgrade correctly as is?
You should check as you might be in hot water if this stop is required
before RemoveFiles and it isn't running.

I'd recommend you set the condition in this newer MSI correctly as it will
help in uninstalls of this version (uninstalls and upgrades to an even
newer future version).

Remember that when you upgrade from the older version to this newer
version, the "uninstall" actions from the older version are the actions
that run during RemoveExistingProducts so if those installs out in the wild
are "broken" then you'll need to find a strategy to fix them before you can
upgrade to the newer version.

--
Edwin G. Castro


On Fri, Mar 30, 2018 at 12:50 PM, Joel McBeth <Joel.McBeth at zuerchertech.com>
wrote:

> I don’t know where I got InstallExecute from, I thought it was a built in
> action. The point I am at now is I have the SetProperty action scheduled
> after InstallInitialize. Also the command action is only intended to run on
> an update so the file should already exist. I’ve added a condition on
> WIX_UPGRADE_DETECTED for that. Although I think it would make sense to do
> it on an uninstall instead since I only do major upgrades, unfortunately I
> already have installs out in the wild that won’t do this on uninstall.
>
>
>
> This is what I am at now:
>
>     <SetProperty Id="StopSolr" Value=""[INSTALLDIR]bin\solr.cmd"
> stop -all" Before="StopSolr" Sequence="execute">
>
>       <!--<![CDATA[WIX_UPGRADE_DETECTED]]>-->
>
>     </SetProperty>
>
>     <CustomAction Id="StopSolr" BinaryKey="WixCA"
> DllEntry="WixQuietExec64" Execute="deferred" Return="check"
> Impersonate="no" />
>
>
>
>     <InstallExecuteSequence>
>
>       <Custom Action="StopSolr" After="InstallInitialize">
>
>         <!--<![CDATA[WIX_UPGRADE_DETECTED]]>-->
>
>       </Custom>
>
>     </InstallExecuteSequence>
>
>
>
> Which seems to run where I want it, I think. Unfortunately, I can’t get it
> to run the custom action as 64-bit even with the platform set to x64. But
> that’s an entirely different issue I’m still looking into.
>
>
>
> The bit about [#solr.cmd.file.id] is a good idea, I will have to try
> that. I was trying to find a better way to get that path, to make sure the
> file actually exists and I was unable so I just used INSTALLDIR.
>
>
>
> *From:* Edwin Castro [mailto:egcastr at gmail.com]
> *Sent:* Friday, March 30, 2018 13:00
> *To:* WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> *Cc:* Joel McBeth <Joel.McBeth at zuerchertech.com>
> *Subject:* Re: [wix-users] Quiet Execution CA Documentation Issue
>
>
>
> 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