I want add some extension after installation, so tried to add custom action for adding extension in using Wix but now I want remove the folder when performing uninstall action extension folder is not getting removed.
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="TargetProgram" Guid="f757ff43-0266-483a-8749-ec796cba4b25" >
<File Id="EXE" Source="C:\Windows\System32\cmd.exe" />
</Component>
</ComponentGroup>
<CustomAction Id="SetTARGETDIR"
Directory="TARGETDIR"
Value="Pathtoextensionadd"
Return="check" />
<InstallExecuteSequence>
<Custom Action="SetTARGETDIR" Before="InstallFinalize">Installed </Custom>
</InstallExecuteSequence>
<CustomAction Id='EXECUTE_AFTER_FINALIZE'
Directory='TARGETDIR'
Impersonate='yes'
Execute='deferred'
ExeCommand='command line argument that install extension in "Pathtoextensionadd"' Return='check' />
<InstallExecuteSequence>
<Custom Action="EXECUTE_AFTER_FINALIZE" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
Installation is done correctly.
How can I remove that "Pathtoextensionadd" folder?