Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 6th June 2003, 00:15   #1
khal_nayak
Junior Member
 
Join Date: Jun 2003
Posts: 9
Question Page calling command

how to call or take the user back to a specific page of the installer by just specifing some command in the section?
I mean when u specify some command in a section and when the user selects the components and clicks next, the installation starts. What i want is that if the user selects a specific section then during installation, a msgbox should appear on clicking which the user be send to some previous page of the installer, eg:license, welcome, component. So then what command is there to make the user jump to diffrent pages?
khal_nayak is offline   Reply With Quote
Old 6th June 2003, 01:02   #2
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
None really that I know of.
You may be able to go to the next or previous page by sending a WM_COMMAND message to the window with the ID of the next or previous button. Never tried it, so I don't know if it will work.
BTW, like your nick.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 6th June 2003, 09:37   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
You can add another page after the instfiles page and skip it if the user hasn't selected the right component.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 6th June 2003, 10:02   #4
khal_nayak
Junior Member
 
Join Date: Jun 2003
Posts: 9
is it possible to disable the next button on the components page if the user doesnt select the appropriate install type from the drop down list?
khal_nayak is offline   Reply With Quote
Old 6th June 2003, 10:06   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
It's not possible to disable it, but it's possible to not allow the user to continue. Call Abort from the leave function of the page and the user won't be able to move on.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 6th June 2003, 16:08   #6
khal_nayak
Junior Member
 
Join Date: Jun 2003
Posts: 9
im not so good at scripting the NSIS so can u plz type in that part of the script so i know what u exactly mean.
Secondly, in my installer there r some exe files which while installing update some older version of them on the computer but the problem is u cant update a dll or exe file if it is already running in the background or foreground so then is it possible to detect that such files r running and that the installer can close such running programs and then update the file and then make it run again using exec? Like what the msn messenger installer has, it closes the msn that is running in the system tray and then updates the exe file and then runs it again?
khal_nayak is offline   Reply With Quote
Old 7th June 2003, 09:25   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
As for the leave function:

code:
Page components "" "" compLeave
#...
!include Sections.nsh
Function compLeave
# make sure ${mySec} is defined!
SectionGetFlags ${mySec} $0
IntOp $0 $0 & ${SF_SELECTED}
StrCmp $0 ${SF_SELECTED} ok
# the user didn't select the required section,
# don't let him leave the page
Abort
ok:
FunctionEnd



In case you're using the MUI see the MUI readme about defining a leave function for the components page.

As for updating in use DLLs, use the UpgradeDLL macro.

I don't know how to close messenger yet. There is a recent thread about it. I really recommend you don't use the process termination method though, it's far from being the ideal way. There are also some other less recent threads about closing programs, some linked from that thread.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 7th June 2003, 15:52   #8
khal_nayak
Junior Member
 
Join Date: Jun 2003
Posts: 9
thanx m8, i finally got the script working my way.
Plz keep me informed if u get any news bout some way to close running exe files and progs.
khal_nayak is offline   Reply With Quote
Reply
Go Back   Winamp 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