I have written a VB .NET installer that installs an application. The install works as expected, but when I try to uninstall the MSI on the machine I get the error
'Error 1001. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete --> Access to the path 'C:\Program Files\WorkApps\CommandTool
ol.exe' is denied'.
When I check the install directory all of the other files have been deleted successfully, except for the one mentioned in the error. It is also worth mentioning that I have attempted to uninstall the application after I have granted EVERYONE permissions on the file and the folder.
In the Event Viewer I get the following error.
Event Type: Error
Event Source: MsiInstaller
Event Category: None
Event ID: 11001
The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Product: Command Tool -- Error 1001. Error 1001. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. --> Access to the path 'C:\PROGRAM FILES\WORKAPPS\COMMANDTOOL
OL.EXE' is denied., (NULL), (NULL), (NULL).
In the MSI I am using a custom action to control the uninstall (see code). I have tried this code using an test application and it works as expected, even in the MSI the code does seem to work with the exception of this single file mentioned above. I have also attempted to specifically delete the file which generates the error but the same problem occurs.
Protected Overrides Sub OnAfterUninstall(ByVal savedState As System.Collections.IDictionary)