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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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?
Answered 03/27/2008 by: Asmodeux
Yellow Belt

Please log in to comment
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.
Answered 03/27/2008 by: VBScab
Red Belt

Please log in to comment
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

Answered 03/27/2008 by: Asmodeux
Yellow Belt

Please log in to comment
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
Answered 03/28/2008 by: AngelD
Red Belt

Please log in to comment
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 :(
Answered 03/28/2008 by: Asmodeux
Yellow Belt

Please log in to comment
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]
Answered 04/02/2008 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity