View Full Version : How can I know if "Remove" button was pressed in add/remove program?

07-27-2008, 10:04 AM
Hi All,
I'm using basic MSI project. When I'm pressing on remove button in add/remove program, not all the files are deleted. I've tried several methods - none worked.
Is there a way to know that the reove button was pressed (I'm planning to put a script that will delete the entire folder if he recognizes such action)?


07-27-2008, 10:58 AM
I usually delete files at uninstall by -

1) Using removefile table, http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx

2) Using a custom action of filedelete script, condition it - REMOVE

Have you tried both ?

07-28-2008, 02:49 AM
Hi, and thanks for replying,

Regarding your question:

1. I've inserted 2 files that weren't deleted to removeFile
table, gave them a value of 2 in installMode - but they
still remained around after I uninstalled the product.

2. Don't really know what do you mean, can you elaborate?
I've tried to create a script that would delete the entire
folder, and tried to use the condition if (REMOVE="ALL")
but whenever the program got to this section, it crashed.
(tried to use this condition in the "install exe condition"
in my custom condition - but the program never got
into my script