Talk:Auto-uninstall old before installing new

From NSIS Wiki
Revision as of 19:13, 24 January 2007 by 216.158.51.82 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

In the second example, doesn't that assume that the old version's uninstaller is called 'uninst.exe' and that it resides in the same directory we're trying to install the new version into?

Also, shouldn't you have a second parameter to iferrors?

 IfErrors uninstall_failed uninstall_succeeded
   uninstall_failed:
     ;You can either use Delete /REBOOTOK in the uninstaller or add some code
     ;here to remove the uninstaller. Use a registry key to check
     ;whether the user has chosen to uninstall. If you are using an uninstaller
     ;components page, make sure all sections are uninstalled.
   uninstall_succeeded:
     ;now you won't do the above deletion or whatever if the uninstall succeeded.