Click here to Skip to main content
16,004,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


Question:

How do I ensure that all program files are uninstalled when a user goes through add/remove programs?

Scenario:

My setup and deployment project does not remove the following things:

1. Project.exe<br />
2. Project.exe.config<br />
3. The application folder.<br />

None of these things have the permanent attribute nor are they tagged as system files.

So how do I garauntee that all files and folders are removed if the user chooses to uninstall the application?
Posted
Updated 2-Feb-12 16:09pm
v2

1 solution

Hard to say based on your information, but a typical reason would be this: some of the executable modules is loaded in memory because some process using it is being executed at the moment of uninstallation.

There can be different reasons for that; one of them could be a bug in some application: non-terminated threads keeping the process running. If the application is a System Service, it could be kept permanently executed. So, such cases can be investigated and resolved: a bug could be fixed, the application can receive notification on the uninstallation and terminate; after all, a process can be terminated by brute force (which is no nice though), in .NET it could be done via Process.Kill (again, avoid it by all means; there are graceful methods based on sending a notification to a target process).

—SA
 
Share this answer
 
Comments
LanFanNinja 3-Feb-12 1:58am    
+5
Sergey Alexandrovich Kryukov 3-Feb-12 3:48am    
Thank you.
--SA
Member 8231963 3-Feb-12 19:04pm    
Thanks i have noticed that when i uninstall the app not only are the files that i mentioned still on the target machine but also the process msiexec is still running.

Knowing that this is the process used for installation and uninstallation could this be causing my issues? if so how can i fix it?

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