Talk:Auto-uninstall old before installing new: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
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? | == Jeff's comments == | ||
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? The first example is using the value stored in the uninstall string key in the registry, which is a more robust way of doing it. | |||
Also, shouldn't you have a second parameter to iferrors? | Also, in the first example, shouldn't you have a second parameter to iferrors? | ||
<code> | <code> | ||
IfErrors uninstall_failed uninstall_succeeded | IfErrors uninstall_failed uninstall_succeeded |
Revision as of 19:15, 24 January 2007
Jeff's comments
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? The first example is using the value stored in the uninstall string key in the registry, which is a more robust way of doing it.
Also, in the first example, 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.