Jump to content
Excelsior Forums

Recommended Posts

I need to setup the installer not to overwrite a config file during (re)installation or an upgrade.  Is this feature part of the commercial version?


Share this post

Link to post
Share on other sites

Excelsior Installer and Delivery always overwrite all package files during installation. There is no trivial way to disable such behavior for some files.

As the workaround you can use Install Callback DLL. Your own callback DLL will be invoked once just before copying files and once after the copying process is finished. So you can save config file before installation and restore it after installation. But this way requires a bit of programming.

The other way is to include "default" config in package and rename it to "application" config during installation. For example, an application uses "app.cfg" file. We create "default.cfg" and include it in the installation package. We also include the special batch file "setup.bat" in the package:

@echo off

if not exist app.cfg  rename  default.cfg  app.cfg 

This batch file should be selected as "Run always" post-install action within the Packager. 

"Run always" action is started just after copying application files to the destination location. If "app.cfg" will exist then nothing will be done. Otherwise "default.cfg" will be renamed into "app.cfg".

In this case to remove "app.cfg" during uninstallation you should use the feature "Remove all files from installation folder(s) upon uninstall".

Best regards

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now