views:

346

answers:

2

During uninstallation of the Visual Studio Integration Package that I am writing, I need to run "devenv.exe /setup" to update the VS UI and remove the package info from the splash/help screen.

However, it must run after all the add-in and package files have been deleted. My current setup (using an Installer class custom action called during the Uninstall step) causes devenv.exe to run too early, before the files have actually been deleted. This means the splash screen info does not update.

Any ideas? I just need devenv to run at the end of install, somehow - I am not bound to custom actions.

A: 

You could write your custom action as Commit execution. This means that it will only run after a successful uninstallation. Condition it as REMOVE="ALL" to make sure it's only run on uninstall.

William Leara
this doesn't seem to work. I am already using my Installer class during Commit (install) and when it runs on rollback, it is run before the files are deleted.
muusbolla
What do you mean "rollback"? Rollback only happens when there is an error during an install and MSI has to undo all the changes it's made to the system. This is not the same as uninstall -- are you talking about rollback or uninstall?
William Leara
A: 

The trick, it turns out, was to use the new Deployment Tools Foundation from MS to wrap my managed functions into an unmanaged DLL, eschewing the Installer class completely. I then use Orca (MSI editor) to add the custom action at a specific time in the install.

The Installer class only supports "deferred" custom actions, which must be run at a specific time.

muusbolla