![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | VS2005 Setup Project - How to prevent overwrite of file? Hi, I'm trying to create a VS2005 Setup Project. I have a config file (MyApp.exe.config) that I need to deploy only the first time the app is installed in a particular location. That is the file should not be overwritten if a new version of the app is installed in the same location. I know how to deploy the file but how do I prevent overwrite? Is it something to do with the Condition property? I got completely lost in docs. Any examples? Thanks |
My System Specs![]() |
| | #2 (permalink) |
| | RE: VS2005 Setup Project - How to prevent overwrite of file? Hi flutophilus, As for the VS setup project overwriting old files(when install the same program again on a box), it is actually not ovewritting, but remove and install. VS setup program(or setup program created via installer sdk) will always ensure one instance of the same program(via a uniqueID of the setup program) on a machine. Thus, when you install the same program on a machine that has already installed it, the process is as below: ** setup program first remove the original installed instance ** setup program install a new one For your case here, I think the problem can be changed to "how to keep the certain data file of a previous installed instance when installing the same program again". I think you can consider the following means; 1. create a custom Action for your setup program to create the config file for your application, also the creation code logic will check whether the file is existing, if not, create it. 2. In the "uninstall" part of the custom action, do not remove the config file #Walkthrough: Redirecting an Application to Target a Different XML Web Service at Installation http://msdn2.microsoft.com/en-us/lib...63(VS.80).aspx Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- Quote: >From: =?Utf-8?B?Zmx1dG9waGlsdXM=?= <flutophilus@xxxxxx> >Subject: VS2005 Setup Project - How to prevent overwrite of file? >Date: Mon, 3 Mar 2008 10:21:00 -0800 Quote: >Hi, >I'm trying to create a VS2005 Setup Project. I have a config file >(MyApp.exe.config) that I need to deploy only the first time the app is >installed in a particular location. That is the file should not be >overwritten if a new version of the app is installed in the same location. >I know how to deploy the file but how do I prevent overwrite? Is it >something to do with the Condition property? I got completely lost in Quote: >Any examples? > >Thanks > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| VS2005 project components toolbox | .NET General | |||
| VS2005 Setup Project File with Property 'Permanent' is uninstalled | .NET General | |||
| VS2005 Opening project outside of IDE | Vista General | |||
| File overwrite | Vista General | |||