Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Problem with not replacing content files that have been modified in reinstallation
 

Problem with not replacing content files that have been modified in reinstallation

Hi,

I have been trying to fix an issue with my VS 2008 deployment project. I built an installer using the deployment project, and use it to installmycompanyapplicationon client site.

For software update, we would build the installer again with udpate codes, and run the installer again on client site. We noticed that, content files that have been modified by client is not being replaced by the installer during upgrade. How can I fix this?

I have tried to use custom actions to write script for the beforeinstall event. I attempt to delete the content files in the local directories, so that the installer would not be able to detect the content files have been modified, and hence the files are replaced. However, I notice that the content files are already there even in a clean installation ( after performing uninstall ). How could the content files exist even before begininstall ?
yenby  Friday, July 17, 2009 9:46 AM
The "BeforeInstall" name is misleading. It's not before the install. It means "before the install custom actions", and install custom actions run at the end of install after all all the files have been installed.

This behavior is meant to ensure that content doesn't get replaced. For example, ifyou install a database that gets updated you don't want an upgrade to replace the database and lose all that data (which is what VS 2005 setups did).

I posted a way to change this here, if you want this to apply to all files (and I mean every single file):
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/4ceda905-84c9-42f4-b9b3-2137453fb598/
Phil Wilson
  • Marked As Answer byyenby Monday, July 20, 2009 3:00 AM
  •  
PhilWilson  Friday, July 17, 2009 7:37 PM
The "BeforeInstall" name is misleading. It's not before the install. It means "before the install custom actions", and install custom actions run at the end of install after all all the files have been installed.

This behavior is meant to ensure that content doesn't get replaced. For example, ifyou install a database that gets updated you don't want an upgrade to replace the database and lose all that data (which is what VS 2005 setups did).

I posted a way to change this here, if you want this to apply to all files (and I mean every single file):
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/4ceda905-84c9-42f4-b9b3-2137453fb598/
Phil Wilson
  • Marked As Answer byyenby Monday, July 20, 2009 3:00 AM
  •  
PhilWilson  Friday, July 17, 2009 7:37 PM
Yes ! It works ! Thanks alot, Phil :)
yenby  Monday, July 20, 2009 3:00 AM

You can use google to search for other answers

Custom Search

More Threads

• How do I redistribut project without overwrite some files
• How to - Include Resource Files in Deployed Project - Plz Help
• Cancel during Uninstall
• VS.NET 2005 RC1 - ClickOnce Error
• updating application
• Setup Project and deciding what files to install
• Publishing app
• How to Add publishing information in to c++.net project
• Force users to update to the latest version
• InstallerClassExtensions.InstallState file not removed by Add/Remove Programs