title: Have to delete installed application folder after uninstallation of application?
body: <p>I'm new to Wix. using Wix3.0.</p>
  
  <p>I've created one msi which is installed in "C:\Program Files\MyWix\" path and given permission as GenericWrite="yes" for the MyWix folder.</p>
  
  <p><strong>My problem is after uninstalled msi. MyWix folder and contained files are not deleted. Even i can't delete MyWix folder manually. It saying you don't have permission to delete this folder like that.</strong></p>
  
  <p>My code is given below.,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;Product Id="b3fd2c4b-7ea3-415f-975a-2f8245c5d862" Name="MyWix" Language="1033" Version="1.0.0.0" Manufacturer="MyWix" UpgradeCode="f0094887-e58c-48f7-bbf1-0e60ad7c66f9"&gt;
          &lt;Package InstallerVersion="200" Compressed="yes" /&gt;
  
          &lt;Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /&gt;
  
          &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
              &lt;Directory Id="ProgramFilesFolder"&gt;
                  &lt;Directory Id="INSTALLLOCATION" Name="MyWix"&gt;
  
            &lt;Component Id="test" Guid=""&gt;
              &lt;File Id="test1" Name="test.docx" Source="D:\RenewDCP.docx" KeyPath="yes"&gt;&lt;/File&gt;
            &lt;/Component&gt;
                  &lt;/Directory&gt;
              &lt;/Directory&gt;
          &lt;/Directory&gt;
      &lt;Component Id="MyWix" Directory="INSTALLLOCATION" Guid="{20D7541C-15A7-4c29-8FDE-14DAF191A959}"&gt;
        &lt;CreateFolder&gt;
          &lt;Permission GenericWrite="yes" User="Everyone"/&gt;
        &lt;/CreateFolder&gt;
      &lt;/Component&gt;
  
      &lt;CustomAction Id="InstallSetProp" Property="Install" Value="/installtype=transaction /action=install " /&gt;
      &lt;CustomAction Id="UnInstallSetProp" Property="Uninstall" Value="/installtype=transaction /action=uninstall" /&gt;
  
          &lt;Feature Id="ProductFeature" Title="MyWix" Level="1" ConfigurableDirectory="INSTALLLOCATION"&gt;
              &lt;!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. --&gt;
              &lt;!-- &lt;ComponentRef Id="ProductComponent" /&gt; --&gt;
        &lt;ComponentRef Id="MyWix"/&gt;
        &lt;ComponentRef Id="test"/&gt;
          &lt;/Feature&gt;
      &lt;UIRef Id="WixUI_Common"/&gt;
      &lt;Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /&gt;
      &lt;Property Id="ARPNOMODIFY" Value="1" /&gt;
      &lt;Property Id="WixAppFolder" Value="WixPerUserFolder" /&gt;
      &lt;Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /&gt;
      &lt;WixVariable Id="WixUISupportPerMachine" Value="1" /&gt;
      &lt;WixVariable Id="WixUISupportPerUser" Value="1" /&gt;
      &lt;WixVariable Id="WixUIBannerBmp" Value="Images\Banner.bmp" /&gt;
      &lt;WixVariable Id="WixUIDialogBmp" Value="Images\Dialog.bmp" /&gt;
      &lt;InstallExecuteSequence&gt;
        &lt;LaunchConditions After="AppSearch" /&gt;
        &lt;Custom Action="InstallSetProp" After="InstallFiles"&gt;$MyWix&amp;gt;2&lt;/Custom&gt;
        &lt;Custom Action="UnInstallSetProp" After="MsiUnpublishAssemblies"&gt;$MyWix=2&lt;/Custom&gt;
        &lt;RemoveExistingProducts After="InstallFinalize" /&gt;
        &lt;ScheduleReboot After="InstallFinalize" /&gt;
      &lt;/InstallExecuteSequence&gt;
      &lt;UI Id="WixUI_Advanced"&gt;
        &lt;TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /&gt;
        &lt;TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /&gt;
        &lt;TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /&gt;
        &lt;DialogRef Id="BrowseDlg" /&gt;
        &lt;DialogRef Id="DiskCostDlg" /&gt;
        &lt;DialogRef Id="ErrorDlg" /&gt;
        &lt;DialogRef Id="FatalError" /&gt;
        &lt;DialogRef Id="FilesInUse" /&gt;
        &lt;DialogRef Id="MsiRMFilesInUse" /&gt;
        &lt;DialogRef Id="PrepareDlg" /&gt;
        &lt;DialogRef Id="ProgressDlg" /&gt;
        &lt;DialogRef Id="ResumeDlg" /&gt;
        &lt;DialogRef Id="UserExit" /&gt;
  
        &lt;Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallScopeDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Order="1" Value="{}"&gt;WixAppFolder = "WixPerUserFolder"&lt;/Publish&gt;
        &lt;Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Order="2" Value="1"&gt;WixAppFolder = "WixPerMachineFolder"&lt;/Publish&gt;
        &lt;Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="2"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1"&gt;NOT Installed&lt;/Publish&gt;
        &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2"&gt;Installed&lt;/Publish&gt;
        &lt;Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
        &lt;Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg"&gt;1&lt;/Publish&gt;
      &lt;/UI&gt;
  
      &lt;/Product&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <p>plz suggest me.</p>