Closed Torchok19081986 closed 2 months ago
This will do:
project.BeforeInstall += args =>
{
if (args.IsUninstalling)
{
var result = System.Windows.MessageBox.Show("Do you ....);
if(result == MessageBoxResult.Yes)
session["INSTALLDIR"].DeleteIfExists(); // it will delete all files and subdirs
}
};
It will also convert the exception to the ActionResult.Failure
.
thanks, i just tried it. Works like expected. This is specific for all files exists in same path as Installdir. How do i also delete files or dirs if these not in installdir, for example UNC-Path or in UserPersonal Folder ?
The same way: "<path to your folder>".DeleteIfExists()
Morning, i try to add conditinally Question at Point of Uninstallation. Ask User if he want also delete all config Files and programmcreated Dirs. But somehow i dont get Question at Uninstall. My CA for this Pupose looks following
I think , i use wrong entry point of CA. Where i should set for execution ? Step.RemoveFiles or Step.RemoveFolders not working.