cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
z_efrati
Level 4

Deleting INSTALLDIR on uninstall even though it is not empty

Hi,

I want to delete INSTALLDIR on uninstall. It is not deleted automatically, since the product writes log files in that directory, so the directory is not empty after the uninstallation had deleted all the product's files.

I believe that the way to do this is with Custom Actions. If I'm wrong, I'd be happy if someone explains to me how to do this. If I'm right then I cannot use VBScript because I cannot pass arguments to scripts (again, if I'm wrong, please explain how I pass arguments to scripts). So, it looks like I must write an EXE and call it from Custom Action, because it's the only way, right?

Thanks.
Labels (1)
0 Kudos
(1) Reply
Dan_Galender
Level 10

Actually, no. Even though you can't pass parameters to a VBScript custom action, you could set things up so that the VBScript could have access to MSI properties which is what you would need.

But an even better approach is to avoid the custom action route completely, in this case, and make use of the RemoveFile table. In that table you can specify additional files to be removed on installation or uninstallation of a component.
0 Kudos