2010-06-02 78 views
1

当我卸载放置自定义操作二进制文件的产品目录时。我怎样才能删除它。也奇怪命名的目录是在安装时创建 - unistallation: “RSCustomActions.CA.dll-” 和 “RSCustomActions.CA.dll-0”(我的二进制名称RSCustomActions.CA.dll)如何删除卸载时的自定义操作二进制文件?

我的维克斯代码

<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> 

请提出任何办法,我怎么可以删除安装程序文件夹,并用二进制名称那些strage文件夹。

谢谢!

回答

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" /> 

注意MyActionMethod应在CA装配定义并适当标记。在WiX发行版的dtf.chm中有一个很好的例子。

希望这会有所帮助。

+0

谢谢,严。你的建议解决了我的问题。 – 2010-06-04 10:08:05