/build/static/layout/Breadcrumb_cap_w.png

Unable to remove install directory on Uninstall

I have a MSI package of a C#.NET app which doesn't remove the install directory when I uninstall it. Everything is removed from inside the dir. But the directory itself is still there.

I even tried adding an installer class into my programm so that I could try to delete things after the uninstall but that doesn't work either as the directory is locked untill the end of the MSI process.

0 Comments   [ + ] Show comments

Answers (6)

Posted by: Asmodeux 16 years ago
Yellow Belt
0
Found on this forum that there is something called RemoveFile Table. I checked on MSDN about it too but just can't figure out where is that thing. I'm using Visual Studio .NET 2005 to create my MSI package. Maybe I'm using the wrong tool.

Can anyone shed some light on me?
Posted by: anonymous_9363 16 years ago
Red Belt
0
My guess would be that the app is creating a file on luanch which isn't included in the MSI. Any non-empty folder which the MSI creates will be retained if it contains files which the MSI didn't install. A simple snapshot will show you if that's the case.

If it isn't, the RemoveFile table is pretty straightforward to use. VS may have a 'Table' view which will allow you to edit the tables directly, with no UI. If it doesn't, download and install the (free) Windows Installer SDK, seek out ORCA.MSI and install that. Orca is a lightweight MSI editing utility and you can certainly use that to edit this table. The SDK will also install MSI.CHM, the Windows Installer Help/Reference file and it will contain details about all the tables.
Posted by: Asmodeux 16 years ago
Yellow Belt
0
Excellent. Now I feel like I made a big step. But when I open the table with Orca, I just don't know what to write in the FileKey, Component_, DirPropperty and InstallMode columns.

Here is a screen of what Orca offers me for the RemoveFile Table

Posted by: AngelD 16 years ago
Red Belt
0
FileKey
Give it a uniq name
example: Remove_Install_Directory

Component_
Any component name; just take a value from the Component column in the Component table.
Just make sure this component is also removed during uninstall

FileName
leave this blank

DirProperty
The directory identifier for the directory not being removed during uninstall
Take the value from the Directory table where the DefaultDir column value would be the same directory name that is left behind

InstallMode
set the value to 2
Posted by: Asmodeux 16 years ago
Yellow Belt
0
Thank you very much for the clear answer. ... I see there is a transforme menu in orca, but I find it's not clear how to use it.

I applied the changes but the msi still doesnt removeve the install folder :(
Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: Asmodeux
Thank you very much for the clear answer. ... I see there is a transforme menu in orca, but I find it's not clear how to use it.

I applied the changes but the msi still doesnt removeve the install folder :(
Is the MSI a vendor-supplied one? If not, you don't *need* a transform: just edit your MSI. If it is, are you sure you're telling Windows Installer to use it? You need to explicitly tell WI to do so: double-clicking the MSI won't work. A typical command line looks like this:

MSIExec /I [path_to_and_name_of_MSI] TRANSFORMS="[path_to_and_name_of_MSI]" [other arguments]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ