|
|
#1 |
|
Junior Member
Join Date: Oct 2006
Posts: 4
|
Uninstall in onInit w/o reboot page
In the .onInit function I uninstall the previous version before installing the next via (http://nsis.sourceforge.net/Auto-uni...installing_new):
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file but a dialog appears with two radio buttons, one to reboot now (default), the other: Manually reboot later. I would like to skip this page or have the default set to 'manullly reboot later.' Removing _?=$INSTDIR suppress the reboot page, but then installer does not wait for the uninstaller to complete before executing. |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Copy the uninstaller to the temporary directory and execute it from there. If you don't, it won't be able to delete itself and its containing directory.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2006
Posts: 4
|
Are you saying I should change the statement to:
ExecWait '$R0' If I do that, the uninstaller executes in a window on top of the installer window, instead of the installer window waiting until the uninstaller window is finsihed before appearing. The Reboot window has disappered, which is great, but I would like the uninstallation window to disapper before the installation window appears. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Oct 2006
Posts: 4
|
This is what he means:
ExecWait '$R0 _?=$TEMPBASEDIR' ;copy the uninstaller to a temp file -- no reboot page |
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Both are not what I mean. I mean you should copy the uninstaller to the temporary directory yourself before executing it. This way it'll be able to delete "itself" from the real installation directory.
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
Broadware-
Does it bother your users that it automatically uninstalls the app when the installer starts? I often start an installer just to see what version it is (or even to see what app it is) because one 'setup.exe' looks like another setup.exe. Maybe you could have the uninstaller run later in the process (like after the user has clicked on 'Install'). |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|