This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Don't want to overwrite the config file during major upgrade
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 02, 2012
12:24 AM
Don't want to overwrite the config file during major upgrade
Hi All,
I am using the InstallShield 2012 Professional edition and created a Basic MSI Project in it. I have deployed the project on various systems.
We are making some changes in the config file of the project by using TextReplacement feature of the InstallShield.
Now I have made some changes in the existing project and also few components and features removed in the upgrade version. I have created a major upgrade for the existing project.
Now when I am applying the major upgrade its uninstalling the config file as well. But I don't want the config file to be removed or overwritten during major upgrade.
Please help me out as soon as possible.
Thanks in advance.
--Sumeet Sharma
I am using the InstallShield 2012 Professional edition and created a Basic MSI Project in it. I have deployed the project on various systems.
We are making some changes in the config file of the project by using TextReplacement feature of the InstallShield.
Now I have made some changes in the existing project and also few components and features removed in the upgrade version. I have created a major upgrade for the existing project.
Now when I am applying the major upgrade its uninstalling the config file as well. But I don't want the config file to be removed or overwritten during major upgrade.
Please help me out as soon as possible.
Thanks in advance.
--Sumeet Sharma
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 02, 2012
08:36 AM
You will need to set the config file component properties to Permanent = "Yes" and NeverOverwrite = "Yes". After that installations forward will leave the config alone.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2012
01:08 AM
Thanks for your reply.
I tried Permanent = "Yes" and NeverOverwrite = "Yes" but there is one problem again.
I tell you the case....I have a project version say 1.01.0.0 and installed it on one of the system. Now I have done a major upgrade and changed its version to 1.02.0.0 and also changed the product code. I upgraded the the project with the latest version 1.02.0.0 but the config file was overwritten.
Then for testing purpose I uninstalled the 1.02.0.0 version and installed the 1.01.0.0 version again on the same system after that I again installed the 1.02.0.0 upgraded version. This time the config file was not overwritten and also no changes have been made in the config file. This is the thing which I actually want.
Now I understood that I should have been mark the config file as Permanent = "Yes" and NeverOverwrite = "Yes" in project version 1.01.0.0 only then it will work in upgrade version 1.02.0.0.
Is there any other way to avoid overwriting the config file in major upgrade version of the InstallShield project.
Thanks,
Sumeet Sharma
I tried Permanent = "Yes" and NeverOverwrite = "Yes" but there is one problem again.
I tell you the case....I have a project version say 1.01.0.0 and installed it on one of the system. Now I have done a major upgrade and changed its version to 1.02.0.0 and also changed the product code. I upgraded the the project with the latest version 1.02.0.0 but the config file was overwritten.
Then for testing purpose I uninstalled the 1.02.0.0 version and installed the 1.01.0.0 version again on the same system after that I again installed the 1.02.0.0 upgraded version. This time the config file was not overwritten and also no changes have been made in the config file. This is the thing which I actually want.
Now I understood that I should have been mark the config file as Permanent = "Yes" and NeverOverwrite = "Yes" in project version 1.01.0.0 only then it will work in upgrade version 1.02.0.0.
Is there any other way to avoid overwriting the config file in major upgrade version of the InstallShield project.
Thanks,
Sumeet Sharma
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2012
10:11 AM
There are two options you can try that might work, unless someone else has a thought.
1. Add a System search for the file and set a property. Then in the Components view for the config file, set Condition value to PROPERTY (your property name) = "".
Or
2. Write an InstallScript that copies the file at the beginning of your installation to a Temp directory and then copy back when the installation is complete. I think the source is CopyFile (szSrcFile,szTargetFile); or XCopyFile (szSrcFile,szTargetFile,nOp);. A search on the Web would probably give a full example.
Or
Add a Install Condition with a Message Box having the User backup the file this time around, and then they replace it. Moving forward it would not be the case...So, only do the condition based on a version/registry entry, (as well as finding the file, of course.).
Hope that helps...
1. Add a System search for the file and set a property. Then in the Components view for the config file, set Condition value to PROPERTY (your property name) = "".
Or
2. Write an InstallScript that copies the file at the beginning of your installation to a Temp directory and then copy back when the installation is complete. I think the source is CopyFile (szSrcFile,szTargetFile); or XCopyFile (szSrcFile,szTargetFile,nOp);. A search on the Web would probably give a full example.
Or
Add a Install Condition with a Message Box having the User backup the file this time around, and then they replace it. Moving forward it would not be the case...So, only do the condition based on a version/registry entry, (as well as finding the file, of course.).
Hope that helps...