none
Visual Studio Setup customization RRS feed

  • Question

  • Hello Experts

    I am creating setup Project for one of my Add in Project, in which Non functional requirement is to build a Installer,

    The configuration of the Installer is , it contains one windows Application EXE and one Add in setup.

    This installer installs windows application and starts Add in setup on commit of the deployment. Which in turns installs Add in. Now i need to achieve functionality to pro-grammatically  uninstall previous version of the Windows Application setup as well as the Add in which is installed.

    once again I need the functionality to uninstall Separate Add in installation from installation of the Windows EXE setup.

    I have installer.cs class. please let me know what code should i write in install /uninstall method so it can remove previously installed Add in.

    Regards,

    Bharat

    Monday, November 7, 2011 5:53 AM

Answers

  • If your setup is an MSI-based setup and the one you're firing off from a custom action is also an MSI setup then it won't work. An MSI install cannot do another MSI install from a Visual Studio custom action.

    In general the way you upgrade a setup is to use RemovePreviousVersions:

    http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/ is still correct.


    Phil Wilson
    • Marked as answer by Neddy Ren Tuesday, November 15, 2011 8:19 AM
    Wednesday, November 9, 2011 9:51 PM
    Moderator
  • Hi Bharat,

    I think you can start a Process and use the following command:

    msiexec /x "productCode"

    see more about the msiexec, you can open a command prompt and use "mesexec /?", you will get all the optionals:

    Best Regards

     


    Neddy Ren [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.

    • Marked as answer by Neddy Ren Tuesday, November 15, 2011 8:19 AM
    Wednesday, November 9, 2011 9:08 AM

All replies

  • Hi Bharat,

    I think you can start a Process and use the following command:

    msiexec /x "productCode"

    see more about the msiexec, you can open a command prompt and use "mesexec /?", you will get all the optionals:

    Best Regards

     


    Neddy Ren [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.

    • Marked as answer by Neddy Ren Tuesday, November 15, 2011 8:19 AM
    Wednesday, November 9, 2011 9:08 AM
  • If your setup is an MSI-based setup and the one you're firing off from a custom action is also an MSI setup then it won't work. An MSI install cannot do another MSI install from a Visual Studio custom action.

    In general the way you upgrade a setup is to use RemovePreviousVersions:

    http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/ is still correct.


    Phil Wilson
    • Marked as answer by Neddy Ren Tuesday, November 15, 2011 8:19 AM
    Wednesday, November 9, 2011 9:51 PM
    Moderator