Wix RemoveFile and RemoveFolder for removing leftovers

后端 未结 1 363
刺人心
刺人心 2021-01-20 17:45

I have following wix file that is supposed to call the Custom Action during the installation. The custom action will create some files required for program. As Wix will only

1条回答
  •  爱一瞬间的悲伤
    2021-01-20 18:11

    You can only use the RemoveFolder element to remove empty folders, so that won't help much. If you have a CustomAction that creates files in your application directory, I suggest you don't create RemoveFile elements for those. Oftentimes, you're going to create subfolders with disposable data in your application directory and you'd have to create removal elements for every file that is added to the directory. The lazy way to go about this is to make use of the RemoveFolderEx Element. As described on that page, you have to use the Remember property pattern to make this work. Here is an example how to implement these two techniques:

    
    
      
        
            
              
              
            
            
              
              
            
        
        
          
        
        
        
        
          
          REMOVAL_CMD
        
        
          
          REMOVAL_CMD
        
      
    
    

    0 讨论(0)
提交回复
热议问题