2010-06-02 77 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