~ MASTER ~
26th August 2011 19:45 UTC
Can I run a program?
Hi,
I wonder if i can run exe program, or cmd file before finish page display (after files copy complete) ?
another thing, I want to add customize page show check-box for what the user want to install, then the program install only what the user have checked (like components but i want to change the design)
I have created the page using Dialog Designer, but when click next then back, all check-box return to default, also i don't know how to control install sections according to what user have choose
I'm waiting for an answer, thanks
MSG
26th August 2011 21:32 UTC
Simply place an Exec, ExecWait, or whatever suitable command at the end of your last section. Or, if your sections can be deselected by the user, add a hidden section as the last section: Section "-LastSection" LastSection
As for remembering the checkbox state, there's an excellent tutorial in the nsDialogs readme: http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html
~ MASTER ~
28th August 2011 17:55 UTC
Thanks, Exec and ExecWait work great :D
still have a problem remembering the checkbox state, maybe i haven't got the idea yet
this is .insdinc file code:
; ===============================================
; this file was generated with NSISDialogDesigner
; ===============================================
; handle variables
Var hCtl_any
Var hCtl_any_box1
Var hCtl_any_box1_state
; dialog create function
Function fnc_any_Create
; === any (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_any
${If} $hCtl_any == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Confirm install" "Dialog subtitle..."
; === box1 (type: Checkbox) ===
${NSD_CreateCheckbox} 32 30 104 24 "test"
Pop $hCtl_any_box1
${If} $hCtl_any_box1_state == ${BST_CHECKED}
${NSD_Check} $hCtl_any_box1
${EndIf}
#${NSD_SetState} $hCtl_any_box1_state
FunctionEnd
Function fnc_any_CreateLeave
${NSD_GetState} $hCtl_any_box1 $hCtl_any_box1_state
FunctionEnd
; dialog show function
Function fnc_any_Show
Call fnc_any_Create
nsDialogs::Show $hCtl_any
FunctionEnd
it's not work, what is the wrong i did :confused:?!
and thanks for help :up:
~ MASTER ~
29th August 2011 01:42 UTC
yeah, now it's work very great :D:D:D
how i do it? for these who want to know, I used onclick with if/else
and it's work whatever you click back or next ;)
MSG, thanks for help me especially about ExeWait as i have not heard about this command before, and It's help me alot :)
best regards