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

  • Home
  • SEARCH
  • 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 3426528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:43:37+00:00 2026-05-18T06:43:37+00:00

I have a Visual Studio 2010 Deployment Project with the following settings: DetectNewerInstalledVersion =

  • 0

I have a Visual Studio 2010 Deployment Project with the following settings:

DetectNewerInstalledVersion = True
InstallAllUsers = True
RemovePreviousVersions = True

The project I am building has several DLLs that due to the legacy way that serialization was implemented the file versions for this project can not be incremented (which we are in the process of changing).

How can I get the setup project to remove the existing files entirely (or at least overwrite with all the new files)?

Maybe I need to script an uninstall in the installer (can someone link me to do this, I can’t find)

I have looked around and for any existing questions and they all say “increment your file versions”, however for me this is not currently an option.

  • 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-18T06:43:37+00:00Added an answer on May 18, 2026 at 6:43 am

    The setup project created with Visual Studio (2008 and 2010) will only replace files if the version number has been incremented. The obvious solution would be to just increment all version numbers; but as you said this is not feasible for you.

    The behavior of the .msi file is basically determined by the moment when the RemoveExistingProducts action is executed. Installers created with VS 2008 schedule this action after the new product has been installed. Modified assemblies whose version has not been incremented therefore don’t get replaced. Some more details about the update behavior are described in this thread:

    RemovePreviousVersions=True but previous version is not removed from the target machine

    To change the behavior, you can patch the created .msi file so that the RemoveExistingProducts action is executed before the new product gets installed (this actually has been the behavior if you created the setup with Visual Studio 2005). Patching can e.g. be done using a small VBScript that runs as a post-built step:

    Dim objInstaller
    Dim objDatabase
    Dim objView
    Dim objResult
    
    Dim strPathMsi 
    
    If WScript.Arguments.Count <> 1 Then
        WScript.Echo "Usage: cscript fixRemovePreviousVersions.vbs <path to MSI>"
        WScript.Quit -1
    End If
    
    strPathMsi = WScript.Arguments(0)
    
    Set objInstaller = CreateObject("WindowsInstaller.Installer")
    Set objDatabase = objInstaller.OpenDatabase(strPathMsi, 1)
    Set objView = objDatabase.OpenView("UPDATE InstallExecuteSequence SET Sequence=1450 WHERE Action='RemoveExistingProducts'")
    
    WScript.Echo "Patching install sequence: UPDATE InstallExecuteSequence SET Sequence=1450 WHERE Action='RemoveExistingProducts'"
    objView.Execute
    objDatabase.Commit
    
    WScript.Quit 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using visual studio 2010. I have a website project that I would
I'm currently migrating a project to Visual Studio 2010 and am trying to figure
Background: I am using the deployment tools in Visual Studio 2010. I right clicked
I really like the new SQL Server Database projects in Visual Studio 2010. I
I have a visual C# 2010 express install. Built a .NET 4.0 dll that
We have a VS 2010 solution that includes a few class library projects, a
we've recently stumbled across the excellent Dispatch for ASP FTP deployment plug in. It
My company provides a large .NET service-oriented solution. The services layer interact with a
I'll start with appologies; I wasn't sure if this was best posted here of
I need to deploy some Crystal Reports XI .dlls (craxdrt.dll, crviewer.dll) to client computers.

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.