update/uninstall if already installed
Hello,
Sandboxie has an NSIS installation, and if it is already installed, it suggests to update or unintsall the program:
http://i.imgur.com/R1bqa.png
How do I do that in my installer?
Thanks!
Archive: update/uninstall if already installed
update/uninstall if already installed
Hello,
Sandboxie has an NSIS installation, and if it is already installed, it suggests to update or unintsall the program:
http://i.imgur.com/R1bqa.png
How do I do that in my installer?
Thanks!
Nothing in NSIS is automatic, so you'll have to create this functionality yourself. Use nsDialogs to create a custom page containing a dirrequest element. Set an onChange function for it, use that to check whether the app already exists in the supplied path and change the page's contents accordingly.
Is there maybe some simpler solution for an update option?
OK, I found PageReinstall in makensis.nsi...
I think it should be integrated
regarding update installer
Hi,
I have NSIS generated installer.
Now i need to modify this as update intsaller.
what i am following is uninstall the old version and reinstall the new version.
uninstall :
uninstaller has few Delete RebookOK files even though those files got deleted by the uninstaller still it asks for the roboot ( i want overcome this unnecessary reboot.)
ExecWait '"$UnInstallString" /S _?=$INSTDIR' ; calling uninstaller
INSTDIR is different in each releases like CompanyName/ProductName/2.0 is the first installation and CompanyName/ProductName/2.1 is the second installation.
While installing new version INSTDIR will be different.
If I install 2.0.1.1 and When I call ExecWait '"$UnInstallString" /S _?=$INSTDIR' it delets the complete 2.0 directory and reinstall 2.0.1.1
but when I install 2.1 (already installed is 2.0....) and When I call ExecWait '"$UnInstallString" /S _?=$INSTDIR' it is not deleting the complete 2.0 directory instead it installs 2.1... in the separate folder CompanyName/ProductName/2.1.
But if i go to the installed directory and click on uninstall.exe of corresponding versions like 2.0 or 2.1 it uninstalls properly by deleting all its files and folders.
Help is highly appreciated :)
Please advice me on this !!!
_?= tells the uninstaller what $instdir should be INSIDE the uninstaller, so normally you pass the same path as the location of uninstaller.exe. Example: ExecWait '"c:\myapp v1.2\uninstaller.exe" /S _?=c:\myapp v1.2'
my problem is uninstaller path and installation path are different.
how to tackle this situation? In this case ExecWait installation is not waiting for the uninstallation .
my case :
ExecWait '"c:\myapp\v1.2\uninstaller.exe" /S _?=c:\myapp\v1.3'