how to code the uninstallation of outlook office customization during the uninstall action of the setup project RRS feed

  • Question

  • Hi,

    I created an outlook addin earlier just for 2007 but now it is also targeting outlook 2010 and will be run on vista, xp and win7 systems, well I also prepared its installation project using MSI.

    Now when the project get installed, it creates two programs one with the name which I used for the setup project and one for the name of Outlook Addin. So for uninstalling I've to remove both program separately.

    Now I want to write some custom action which should execute on uninstall event of the setup project which should remove the other program(outlook addin) appearing in the control panel programs list, so what should I remove, just the registries ? of that addin, or something else, can you provide me some sample code.

    I'm giving example - that I created Addin  project with Name A-addin, now other is setup project using windows installer with A-setup, when you install A-setup , it get installed and when you open outlook, then its office customization A-addin get installed, so when you you remove A-setup, it does not remove program A-addin automatically. So I'm looking for the way to remove it from system programmatically. as I found something in the following code for uninstalling any application without user interface.


    This is related to also one of the my threads if you want to get some broad idea about the problem.




    Mehnaz Anwar
    Saturday, July 16, 2011 2:04 PM


  • Hi Mehnaz13,
    Thanks for posting in the MSDN Forum.
    My solution is create a *.bat file, in the file you can use "msiexec.exe /uninstall [ProduceCode]" and include it into your msi project. In the project you can create a shortcut to link to this bat file.
    By the way, it will not appear two install item if you add "|vstolocal" at the and of the "Manifest" string.
    If you have any questions please feel free to let me know.
    Have a good day,

    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, July 19, 2011 12:08 PM