Fantastic! Thant works perfectly, thank you Rob.
I had to hard-code the location of the uninstaller on the target machine,
however, because it is normally 'discovered' during uninstall:
<Property Id="FFDSHOWUNINSTALLER">
<RegistrySearch Id="FFDShowRegKey" Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ffdshow_is1"
Name="InstallLocation" Type="raw" />
</Property>
<!--
Find the FFDShow Uninstaller executable on the target system.
This is used to remove
-->
<Property Id="FFDSHOWUNINSTALLPATH" Secure="yes">
<DirectorySearch Id="FFDShowPath" Path="[FFDSHOWUNINSTALLER]">
<FileSearch Name="unins000.exe"/>
</DirectorySearch>
</Property>
This works find during UNINSTALL, but during the install-rollback, this has
already been evaluated and returned 'empty' because at install, the
'uninstaller' doesn't yet exist at the searched location.
How, if its possible, can I force the installer to _re-evaluate_ this
registry-search and directory-search, _before_ the roll-back custom action (or
at least after 'InstallFiles'), so that the Property "FFDSHOWUNINSTALLPATH" is
available for my CA with the correct location of the uninstaller?
Adam Langley
Senior Developer
Tel: +64 9 486 9010
[email protected]
www.winscribe.com
-----Original Message-----
From: Rob Mensching [mailto:[email protected]]
Sent: Friday, 16 January 2009 9:52 a.m.
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] run custom action on rollback from failure to commit
That looks much closer. Your last statement isn't _quite_ correct. The
deferred actions (rollback actions are deferred) are "scheduled" in the first
pass of the Windows Installer. That's when the condition is evaluated and
that's why the rollback action always (almost?) has the same condition as the
"forward" action. The actions are executed during the "execution" second pass
and if they weren't scheduled they don't exist. <smile/>
-----Original Message-----
From: Adam Langley [mailto:[email protected]]
Sent: Thursday, January 15, 2009 12:13
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] run custom action on rollback from failure to commit
Thanks Rob,
I do handle uninstall, but not uninstall-rollback (that will be next on the
list).
So do I want something like this?
(I assume that you are referring to the installation action as the "execution
action", which in my case is "InstallFFDShow")
<CustomAction Id="InstallFFDShow" BinaryKey="ffdshow.exe"
ExeCommand="/VERYSILENT /loadinf="ffdshow.inf"" Execute="deferred"
Impersonate="no" HideTarget="no" />
<CustomAction Id="RollbackInstallFFDShow" Property="FFDSHOWUNINSTALLPATH"
Execute="rollback" ExeCommand="/VERYSILENT" Impersonate="no" HideTarget="no" />
<CustomAction Id="UninstallFFDShow" Property="FFDSHOWUNINSTALLPATH"
Execute="deferred" ExeCommand="/VERYSILENT" Impersonate="no" HideTarget="no" />
<InstallExecuteSequence>
<Custom Action="InstallFFDShow" After="InstallFiles"><![CDATA[
$ProductComponent > 2 ]]></Custom>
<Custom Action="RollbackInstallFFDShow" Before=" InstallFFDShow
"><![CDATA[ $ProductComponent > 2 ]]></Custom>
<Custom Action="UninstallFFDShow"
Before="InstallFinalize">FFDSHOWUNINSTALLPATH AND <![CDATA[ $ProductComponent =
2 ]]></Custom>
</InstallExecuteSequence>
My 'condition' for install-rollback is the same as for my install action, I
assume that is correct, that when an install is rolled back the component still
has the same install-status (>2)?
Thanks
Adam Langley
Senior Developer
Tel: +64 9 486 9010
[email protected]
www.winscribe.com
-----Original Message-----
From: Rob Mensching [mailto:[email protected]]
Sent: Friday, 16 January 2009 5:05 a.m.
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] run custom action on rollback from failure to commit
You need to mark the rollback action @Execute="rollback" and make sure it is
scheduled *before* the execution action. Also, make sure your condition on
your rollback action is correct.
Also, do you handle uninstall and uninstall rollback?
-----Original Message-----
From: Adam Langley [mailto:[email protected]]
Sent: Wednesday, January 14, 2009 20:59
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] run custom action on rollback from failure to commit
I have a vustom action which installs some 3rd party tools...
<CustomAction Id="InstallFFDShow" BinaryKey="ffdshow.exe"
ExeCommand="/VERYSILENT /loadinf="ffdshow.inf""
Execute="deferred" Impersonate="no" HideTarget="no" />
<CustomAction Id="UninstallFFDShow" Property="FFDSHOWUNINSTALLPATH"
Execute="deferred" ExeCommand="/VERYSILENT" Impersonate="no"
HideTarget="no" />
<InstallExecuteSequence>
<Custom Action="InstallFFDShow" After="InstallFiles"><![CDATA[
$ProductComponent > 2 ]]></Custom>
<Custom Action="UninstallFFDShow"
Before="InstallFinalize">FFDSHOWUNINSTALLPATH AND <![CDATA[
$ProductComponent = 2 ]]></Custom>
</InstallExecuteSequence>
This works well, on install it runs the ffdshow.exe, and on uninstall it
runs the ffdshow uninstaller (FFDSHOWUNINSTALLPATH is an exe located via
the registry).
My question is:
How do I get the "UninstallFFDShow" to run during rollback?
Currently, if there is an exception causing a failure to commit (such as
is simulated by the FailInstallFromCommitCustomAction.msm), there is
nothing to run the ffdshow uninstaller.
What do I put in to do this?
I tried adding another <Custom> tag, which ran After="RemoveFiles", but
this did nothing...
Can anyone give me an example?
Thanks
Adam
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users