Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
If a user starts uninstallation of application. but while uninstallation, if he presses cancel button, it shows a popup for yes/no, if the user takes a time to input, installation completes. I want to stop uninstallation. but in my case uninstallation completes.
Does anyone have any idea how can I implement it?

What I have tried:

I am showing a pop up on cancel click. But I don't why it is not stopping uninstallation.
Posted
Updated 21-Jun-16 3:43am
Comments
Sergey Alexandrovich Kryukov 21-Jun-16 2:52am    
Normal MSI does it automatically. What installation toolkit do you use?
—SA
dheeraj Jha 21-Jun-16 3:11am    
WIX
Sergey Alexandrovich Kryukov 21-Jun-16 3:36am    
Very, very good. I've used it not very long time ago; it creates MSI which does it all automatically.
—SA
dheeraj Jha 21-Jun-16 4:39am    
Actually, prob is, On click 'cancel' I am asking for confirmation "Yes/No". If the user inputs immediately, It is working as expected.
But if the user waits for 3-4 min and then input Yes. It uninstalls by the time.

My expectation is, it should wait till user input.
Sergey Alexandrovich Kryukov 21-Jun-16 9:28am    
Sorry, never heard of such things. It's even hard to believe. I never had problems with cancellation of installation.
—SA

1 solution

The normal use case of an installation/deinstallation is to install/deinstall the full package and avoid a crappy state. Thats why the user gets asked and than will performed all steps. That also results in a clean and defined state of the app and the computer. That is a very important issue - so you better not change it.

If you want to tweak it my only idea is after the deinstallation call the installation again. But I wont do it, beause it confuses.

Normally the user knows how to reinstall the software by installing it again ;-)
 
Share this answer
 
Comments
dheeraj Jha 22-Jun-16 2:13am    
Thanks, KarstenK
I also came to this conclusion, not to give this 'cancel' option to the user once uninstallation started.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900