Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3400856
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:56:38+00:00 2026-05-18T04:56:38+00:00

I have a Custom Action that should execute during the Install portion of an

  • 0

I have a Custom Action that should execute during the Install portion of an .msi setup. I have a previous version that was installed using InstallShield (which was overkill) and wanted to move to the simpler VS Setup Proj because I do not require all the control that an .isproj provides. However, doing a straight install with my new .msi seems to install side by side with the previous version. Here’s what I have found out so far:

  1. I have my product ID
  2. I have written code that will uninstall the previous version through creating a process that uses MsiExec.exe (code will follow)
  3. Tried implementing the custom action to uninstall during setup but it seems you can only have one instance of MsiExec.exe running at a time.
  4. Have been to this post (http://stackoverflow.com/questions/197365/vs-setup-project-uninstall-other-component-on-install), which didnt help.

Custom Action code:

        //Exe used to uninstall
        string fileName = "MsiExec.exe";

        //Product ID of versions installed using InstallShield
        string productID = "{DC625BCF-5E7B-4FEF-96DD-3CDBA7FC02C1}";

        //Use /x for uninstall and use /qn to supress interface
        ProcessStartInfo startInfo = new ProcessStartInfo(fileName, string.Format("/x{0}", productID));
        startInfo.WindowStyle = ProcessWindowStyle.Normal;
        startInfo.UseShellExecute = false;

        //Start process
        Process uninstallProcess = Process.Start(startInfo);

        //Wait until uninstall is complete
        uninstallProcess.WaitForExit();

My hope is to eventually deploy my .msi via ClickOnce, so I am hoping for an option that will fit into deployment option. Currently everything is written in .NET 2.0 and VS 2005, but I do have .NET 4.0 and VS 2010 available to me if there is a new option that works.

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:56:38+00:00Added an answer on May 18, 2026 at 4:56 am

    I was able to install over the top of the previous install by making the product code of my setup the same as the code of the older version. Didn’t dawn on me to try that because when you create a new version of the setup package, VS always prompts you to change your product code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom installer action that updates the PATH environment, and creates an
Problem I have an MSI that creates and starts a Windows service during installation
I have a custom UIButton in my viewcontroller that should have either the image
I have a simple C++ DLL that implements a few custom actions for a
I have a few models that need to have custom find conditions placed on
I have a custom control that implements IPostBackEventHandler. Some client-side events invoke __doPostBack(controlID, eventArgs).
I have defined a custom list template type for SharePoint . I install it
I have custom coded several enterprise applications for mid to large organizations to use
I have custom errors configured in my web.config, but IIS 6.0 is returning the
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.