Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Reusing uninstaller page for reinstall (http://forums.winamp.com/showthread.php?t=271662)

dans 23rd May 2007 18:06

Reusing uninstaller page for reinstall
 
Hey,
I'm a newbie. I made an installer, and now I'd like to improve the way it reinstalls (uninstalls previous installation and installs). I have three solutions:

- a pop-up question "Would you like to reinstall" in onInit that if yes deletes the files etc but does not show progress (seems to user that program disappeared/stopped working)

- like the above but it pops up the old uninstaller with execwait. I don't like this because a dumb user could be confused with the two windows and mess up the reinstallation process.

- I tried to solve these problems by having a solution where the uninstall stuff was done in the install section if a previous install was detected, but it was still asking for the new installation's directory before uninstalling which was kind of messy.

What I actually want to do is pop up the question if a previous installation is detected, then an uninstallation page (with progress etc), then ask for instdir, then install. Is there an "easy" way to do this?

Sorry if this question was answered before, I did search.
Thanks in advance!

Afrow UK 23rd May 2007 18:57

Have a section which is hidden and not checked by default (Section /o "" SecUninstall) that uninstalls the old installation. If an old version is found to be installed, all you need to is select the section (use !insertmacro SelectSection ${SecUninstall} from Sections.nsh) and give it a name (SectionSetText) so that the section is displayed on the components page.

Stu


All times are GMT. The time now is 04:40.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.