Is it possible to catch the uninstall event and execute some code when the program starts uninstalling?
program is installed by autoinstall. i already try to use this
public override void Uninstall(
IDictionary savedState
)
but it said that method can not be overriden becouse it does not exist.
If you are talking about Setup projects in Visual Studio then look at this thread: Install directory from deployment projects. You can execute code on the install and uninstall using the Installer class.
You should be able to do this using a System.Management listener for deletion of instances of Win32_Product. Take a look at this, you would need to use Win32_Product and __InstanceDeletionEvent though.
This applies to software installed using Windows Installer, at least. For others, you may have to brute force the registry settings or the like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With