Archive: Redirecting to install success.


Redirecting to install success.
Hi,

I want to redirect the user to 'installation success' screen if the installer founds the application is already installed in the system. Please tell me what is the script for it.

Also, please tell me how add repair feature to the installer.


Thanks in advance.

Regards,
John.


the first part you can accomplish by first checking for the existing installation, and setting a variable, then in all following pages skip that page if that variable indicates that the program has already been installed.
http://nsis.sourceforge.net/Skipping_Pages

the second part is more complex - NSIS does not have a built-in repair/modify mechanism, so you would have to write your own. See also:
http://forums.winamp.com/showthread.php?t=318825
The option offered there - uninstall and re-install - is a perfectly valid method and seems more stable than some of the 'repair' jobs I've encountered from installers in the past. You can always make your uninstaller and installer accept a command-line flag which only uninstalls / installs required files for the functionality of your program (skipping any non-required files such as documentation, examples, tutorials, etc.) so that you can perform a limited uninstall/install for this specific purpose.


Originally posted by Animaether
The option offered there - uninstall and re-install - is a perfectly valid method and seems more stable than some of the 'repair' jobs I've encountered from installers in the past.
Do however note that since it is you know knows most about your own software, your specific solution need not require an uninstallation at all. In my installers it suffices to plainly extract and overwrite all required files, and creating any required registry keys.

(Also note that you do not need an uninstaller to perform a 'pre-uninstall' step in your repair code. You can delete files etc just as easily in the installer.)

True - if you know the exact list of files from your installation whether that is your current version or a version from 2 years ago and you know specifically which files should be removed, modified, overwritten, etc. then you can use your knowledge of those lists to perform an installation that is exactly tailored to the specifics of your project and in particular to a 'repair' installation. Including, but not limited to, simply ignoring the existing installation and re-installing with a complete overwrite.


Thanks!