Uninstallation issue for removing files and folders

Add-in Express™ Support Service
That's what is more important than anything else

Uninstallation issue for removing files and folders
Installed folder does not delete after uninstallation 
Soe Thu Aung




Posts: 15
Joined: 2015-04-14
Hi,

I'm using WiX Editors to create setup file for outlook plugin project. I found that after uninstallation, installed folders are not deleted. Would like to know what is the best way to uninstall and remove previously installed folder. I also have some files and folders under AppData, would like to clean up those files also. How can I inject those clean functions in uninstallation sequence?

Regards,
Soe Thu Aung
Posted 28 May, 2015 05:37:01 Top
Andrei Smolin


Add-in Express team


Posts: 16742
Joined: 2006-05-11
Hello Soe,

For a folder to be deleted, set the AlwaysCreate property to true. Make sure that you close Windows Explorer and don't use the folder in any other way when running the uninstaller.

As to files, a file won't be deleted if it has Permanent=True on its properties or it is used by another application.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 May, 2015 07:39:23 Top
Soe Thu Aung




Posts: 15
Joined: 2015-04-14
Hi Andrei Smolin,

Thanks for quick reply. I have already set AlwaysCreate=True to Application Folder in Wix Setup project's File System Editor. Also all the files are under one component, which is already set Permanent attribute to "no" value. Also checked property value of each file in File System Editor, all set to "False". But still installed files and folders are not deleted. Is there any way to trace which steps goes wrong? I have closed all Windows Explorers and run setup.exe as Administrator. Files are solely for this app, not share to others.


<Component Id="comp_EC99A467_D996_47D5_B3F7_BC529DC19E9F" Guid="9A459884-3ED1-42D5-BD61-A76F43AA8825" Permanent="no" SharedDllRefCount="no" Transitive="no">


Regards,
Soe Thu Aung
Posted 28 May, 2015 22:52:21 Top
Andrei Smolin


Add-in Express team


Posts: 16742
Joined: 2006-05-11
Hello Soe,

Could you please send me a test project reproducing the issue? You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2015 08:47:51 Top
Soe Thu Aung




Posts: 15
Joined: 2015-04-14
Hi Andrei,

Thanks for your response. I found that I need to remove files first and then remove folder process is success. Following is the fragment of WIX XML I have used. By adding "RemoveFile", installer can remove previously installed files and folders. But there is still one issue, when I uninstall using Control Panel-->Programs and Features, installer does not remove previously installed files. I need to right click setup.exe and select Run as Administrator to uninstall. I think may be permission issue, is there any way I can fix that issue?


<Directory Id="SQLite32" Name="x86">
          <Component Id="comp_SQLite32" Guid="8A2C5F30-8499-45EC-A4BA-0B9606DD60C6" KeyPath="yes">
            <CreateFolder Directory="SQLite32" />
            [COLOR=red]<RemoveFile Id="id_8B12158F_862B_4DA2_A670_1DE5F49CAB61" Name="*.*" On="uninstall" Directory="SQLite32" /> [/COLOR]
            <RemoveFolder Id="id_0C851A7A_99C7_46F7_BAF9_910DEBC5803B" On="uninstall" Directory="SQLite32" />
          </Component>
        </Directory>
      </Directory>


Regards,
Soe Thu Aung
Posted 01 Jun, 2015 23:31:36 Top
Andrei Smolin


Add-in Express team


Posts: 16742
Joined: 2006-05-11
Hello Soe,

Could you please send me a test project reproducing the issue? I'll try to find a way to solve this.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2015 04:13:45 Top