Ok, I followed up on this and having files left behind after uninstall when an
managed app is using it is a known issue with ngen.exe itself. While the images
still appear to be there, they will not be loaded so in effect they are deleted
from the cache but the file still exists on disk.
I know this isn't quite the answer you were hoping for but at least we know its
not an installer/CA problem. Its in ngen itself and the way it manages its
state.
From: Doug Payne
Sent: Wednesday, October 10, 2007 10:06 AM
To: Peter Marcu; wix-users@lists.sourceforge.net
Subject: RE: NGen and uninstalling
Thanks for your response, Peter,
The images are not removed after reboot.
I did notice one odd thing, though, after initial install and reboot, THE
IMAGES (*.NI.* FILES) WERE IN THE Native Image folder, but ngen reported their
status as pending, even though I specified Priority="0" for all the assemblies
in the .wxs file. I ran 'ngen update', which fixed this problem, but the images
were still not removed from the cache during uninstall if the dependent
applications were running.
--Doug
From: Peter Marcu
Sent: Wednesday, October 10, 2007 9:37 AM
To: Doug Payne; wix-users@lists.sourceforge.net
Subject: RE: NGen and uninstalling
Hi Doug,
Can you verify for me whether or not the images are removed after a reboot? My
suspicion is that because the file is in use, the OS cant remove it and
schedules a "Pending File Rename Operation" on the file which will be executed
on a reboot.
If they are not removed on reboot, let me know and I'll dig deeper.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Payne
Sent: Tuesday, October 09, 2007 3:41 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] NGen and uninstalling
Hello,
I would like some help understanding how the native image element and related
custom actions work in Wix 2.0. Specifically, I would like some advice on how
to debug a problem I am seeing when uninstalling my product. I am using this
element to add assemblies to the Native Image Cache during install, and remove
them during uninstall. This works well unless one of the applications relying
on these assemblies is running when the product is reinstalled or removed. In
that case, even if Restart Manager is able to close the applications, the files
sometimes remain in the Native Image folder after uninstall. From the verbose
log, I see that the ExecNetFX CA fires, and ngen.exe is indeed called once for
each assembly which is to be removed. (Unlike during the installation process,
I do not see the actual command line being used for ngen.)
I verified:
* NetFxScheduleNativeImage is run after InstallValidate. Numerous 2715
errors are logged, indicating the specified file key could not be found in the
file table. The second parameter for these messages, the file key itself is
either blank or not logged. Regardless, the CA sets the
NetFxExecuteNativeImageUninstal and NetFxExecuteNativeImageCommitUninstal
propeties. It returns 1
* NetFxExecuteNativeImageCommitUninstall runs next, and returns 1.
* NetFxExecuteNativeImageUninstall is skipped.
* NetFxExecuteNativeImageCommitInstall runs next, and returns 1.
* NetFxExecuteNativeImageInstall is skipped.
* The NetFX custom action is then invoked, which appears to run NGen once
for each assembly, presumably to uninstall the files from the cache.
* The ExecNetFx CA then runs. I don't know what it does, but this is
followed in the log by 40 lines of the form " RollbackCleanup: File:
C:\Config.Msi\4f516.rbf".
I also tried using a custom actionw which shuts down the applications before
Restart Manager sees them. This is to prevent the user from allowing the
applications to run during uninstall. This did not help, as images remained in
the cache after setup completed.
Has anyone else seen this problem? If so, how did you handle it? Thanks for
your time.
--Doug
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users