Old 4th August 2010, 13:47   #1
reachb4
Junior Member
 
Join Date: May 2009
Posts: 14
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.
reachb4 is offline   Reply With Quote
Old 4th August 2010, 15:08   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
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.
Animaether is offline   Reply With Quote
Old 4th August 2010, 15:37   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by Animaether View Post
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.)
MSG is offline   Reply With Quote
Old 4th August 2010, 15:54   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
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.
Animaether is offline   Reply With Quote
Old 5th August 2010, 20:45   #5
reachb4
Junior Member
 
Join Date: May 2009
Posts: 14
Thanks!
reachb4 is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump