Old 2nd September 2005, 13:57   #1
lucasx24
Junior Member
 
Join Date: Sep 2005
Location: london
Posts: 13
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

Last edited by lucasx24; 2nd September 2005 at 16:05.
lucasx24 is offline   Reply With Quote
Old 2nd September 2005, 14:14   #2
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
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.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 2nd September 2005, 16:01   #3
lucasx24
Junior Member
 
Join Date: Sep 2005
Location: london
Posts: 13
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
lucasx24 is offline   Reply With Quote
Old 2nd September 2005, 17:05   #4
glory_man
Senior Member
 
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
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.
glory_man is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump