当我卸载放置了自定义操作二进制文件的产品目录时。我该如何删除它。在安装时也会创建奇怪的命名目录 - unistallation:“RSCustomActions.CA.dll-”和“RSCustomActions.CA.dll-0”(我的二进制名称RSCustomActions.CA.dll)
我的WIX代码是
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="Product.Id" Name="Product">
<Directory Id="INSTALLLOCATION" Name="Product">
<!-- TEST -->
<Directory Id="Installer" Name="Installer">
<Component Id="InstallerFiles"
Guid="{0904DB36-2496-419c-A992-B7D86F068F12}">
<File Id="RSCustomActions.CA.dll" Name="RSCustomActions.CA.dll" Source="Binaries\RSCustomActions.CA.dll" />
</Component>
</Directory>
<!-- END TEST -->
<?include "Product.Files.wxi" ?>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" Name="PMenu">
<Directory Id="ProgramMenuDir" Name="Aspose">
<?include "Product.ProgramMenu.wxi" ?>
</Directory>
</Directory>
<Component Id="Main" Shared="yes" Guid="{EDD4477A-D188-469c-B8D0-4423377C03C6}" Feature="Main.InstallFeatures">
<RemoveFolder Id="DeleteProgramMenuDir" Directory="ProgramMenuDir" On="uninstall" />
</Component>
</Directory>
“Product.Files.wxi”也包含
<Component Id="Product.Remove" Guid="{C6D9D74C-66E8-442a-8E53-78A8D0E2B24D}">
<RemoveFolder Id="Product.RemoveFolder.Action" On="uninstall"/>
</Component>
请以任何方式建议我如何删除Installer文件夹和那些带有二进制名称的strage文件夹。
谢谢!
答案 0 :(得分:2)
为什么需要将CA DLL安装为产品文件?您可以简单地将它放到二进制表中并忘记它,如下所示:
<!-- This is a reference to the DLL where all custom actions reside -->
<Binary Id="CustomActions" SourceFile="$(var.Root)\CA\CustomActions.CA.dll" />
自定义动作定义是这样的:
<!-- Sample CA definition -->
<CustomAction Id="MyAction" BinaryKey="CustomActions" DllEntry="MyActionMethod" />
请注意,应在该CA程序集中定义MyActionMethod并进行适当标记。在WiX发行版的dtf.chm中有一个很好的例子。
希望这有帮助。