Hi Oleg-shilo,
I'm planning to protect uninstall from user. so before uninstall user need to provide password.
so I'm planning to create custom action and then that custom action will open wpf app and get password from user. after password comparison is system allowing to uninstall otherwise it will rollback the activity.
Kindly help me, I'm not able to get result from wpf app. Kindly suggest me, if you have.
Thanks in advance.
The whole idea of potentially completely uninstallable application can be question. You might be creating a _Terminator._
But...if you indeed need to, then you can do it like that:
```C#
project.BeforeInstall += args =>
{
if (args.IsUninstalling)
{
var your_app = Process.Start("
your_app.WaitForExit();
if (your_app.ExitCode != 0)
{
args.Result = ActionResult.UserExit;
MessageBox.Show("You are not authorized.");
}
}
};
```
Process.ExitCode is one of the possible IPC (inter-process communication) choices. Though there quite a few others: mutex, socket, shared file...
Thank you very much.