Groups | Blog | Home
all groups > visual studio .net setup > august 2006 >

visual studio .net setup : Installer Reinstalls Configuration File


daveboyd
8/22/2006 5:58:03 PM
In vs 2003 the installer subproject builds an MSI file that includes several
configuration files. These files have a setting that causes the installer to
rebuild the files from the original distribution whenever the user changes
them. What setting is required to get the installer to ignore changes to
these user configuration files after installation?

Phil Wilson
8/24/2006 6:17:26 PM
I don't exactly understand what you mean - are you saying that the user
installs the app from the MSI file, and then changes some files, after which
the files get restored from the MSI file, replacing the changed files? If
so, this is normal repair situation.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]

daveboyd
8/25/2006 5:35:01 AM
Yes, I want to have some distributed files in my application that are not
"repaired".

Just to be clear, the "normal repair situation", seems to be invoked
whenever the user changes a distributed file (installed by the MSI file) and
then invokes the program. Instead of simply starting the program the
"repair" is invoked and the users changes are lost by the installer replacing
it with the original file and only then the program is started.

This is extremely confusing to the user who has followed directions to edit
and set the configuration file to his/her specific share.

I naively assumed there is a setting in the VS installation build area to
not do this "repair" behavior for specific files which I asked about in my
original post. Sorry that was unclear.

While this is interesting and admirable behavior for files that are critical
for the application to run correctly, how do I distribute a configuration
file that can be changed by the user without invoking this dictatorial big
brother?

Thanks,

Dave Boyd

[quoted text, click to view]
Phil Wilson
8/25/2006 11:09:09 AM
Well repair is normal in some circumstances, but it doesn't completely
explain what you're seeing, although it's involved somewhere. Repair will
restore deleted files but it will not replace user-modified files. My tests
with a setup and repair do not cause a modified text file to be replaced. So
something else is going on. If the user removed a file, then a repair would
kick in, snd this would restore missing files and run install custom actions
again. If you have an install custom action that initializes the file, that
would explain what you're seeing.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
[quoted text, click to view]

daveboyd
8/25/2006 12:09:01 PM
Phil,

I am doing a post build process on the MSI file with Orca. Could this be
the source of the problem? I don't have the details at hand, but they were
conveyed to me via some earlier dicussion group help (about January or
February).

daveboyd



[quoted text, click to view]
Phil Wilson
8/31/2006 8:00:43 AM
That doesn't seem likely to me. See if this helps:
http://installsite.org/pages/en/msifaq/a/1037.htm
--
Phil Wilson
[Microsoft MVP-Windows Installer]

[quoted text, click to view]

AddThis Social Bookmark Button