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.
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)
Please log in to answer
Posted by:
Asmodeux
16 years ago
Posted by:
anonymous_9363
16 years ago
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.
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
Posted by:
AngelD
16 years ago
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
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
Posted by:
anonymous_9363
16 years ago
ORIGINAL: AsmodeuxIs 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:
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 :(
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.
so that the conversation will remain readable.