Archive: if installed then custom page with repair or remove


if installed then custom page with repair or remove
hello.

how to do condition in nsis installer which checking value from registry and after compare(application installed) will run custom page with repair(install once again) and remove(uninstall) options ???

any help appreciated


To read a registry string, you can use "ReadRegStr" or "ReadRegDWORD" instructions. If those don't work for you, you can use the Registry plug-in by Instructor.

To compare values, you can use either "StrCmp" or "IntCmp" instructions. If you need to compare versions, you can use one of the functions in the Version Manipulation Functions category.

Well, now, to have a page with "re-install" or "repair", and "remove" options, you need to create a new InstallOptions page.

Also, you could use some other UI's available for NSIS, like for example: Experience UI.


thx anyway but i didn't ask about how to read reg values, how to check versions, and how to do page with install options...please any1 read the question 3 times before u write the answer and before u understand the meaning...
I ask about how to write condition...
In installer we have some pages...
in function .onInit I checked the value from reg
and after compare how to do that thing

1. if reg not found then continue install its done
2. if reg found then show repair/uninstall page

and if its possible how to maintain further this uninstall page


; PAGES
!insertmacro MUI_PAGE_WELCOME
Page custom CustomPageConfig
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

how to maintain this 2. condition between these pages
any help appreciated


First of all clear your duplicate posts.
If your reg key was found you can hide installer and run uninstaller. After uninstall bring to front installer. See example folder (makensis.nsi).
Or you can (if you want) change set of sections with installer's components page. This script will help you add/remove components.
Edit:
To skip repair/uninstall (custom) page - in pre-function use Abort.