all groups > visual studio .net setup > october 2004 >
You're in the

visual studio .net setup

group:

Update configuration file during installation with Windows Installer



Update configuration file during installation with Windows Installer RoelandKok NO[at]SPAM hotmail.com
10/13/2004 1:17:29 AM
visual studio .net setup: Hello,

I'm making a setup project for a Windows Installer, to update my
application.

The application has a configuration file (app.config) that is renamed
after the build. I would like to not replace this file by the new
configuration file during an installation, but keep it both (the new
and old one). In that way I am able to tell the user to merge both
files, or do it by myself as a Custom action.

However, how can I manage this? During an installation the old one is
replaced by the new one default. And the Custom Action 'Install' is
just called after the installation took place. So, I am not able to
rename the old config file or something like that.

Any ideas?

Greetings,
Re: Update configuration file during installation with Windows Installer Kallely Sajan [MVP]
10/13/2004 10:12:45 AM
For purposes like these, I tend to create a custom action and sequence it
before RemoveExistingProducts and InstallInitialize.

--

Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.

[quoted text, click to view]

Re: Update configuration file during installation with Windows Installer Cor Ligthert
10/13/2004 11:17:44 AM
Roeland,

That is exactly why I have usersettings in the registry and program settings
in the config.

How you will add new config settings, doing that what you want, when you
have a new release.

However maybe there comes a very good answer as well for me.

Cor

AddThis Social Bookmark Button