Archive: Install options problem


Install options problem
I have been trying to make it work for some time, but I can only seem to fail ;).

I am trying to make an old style installer that popups and then displays a page with a empty input field and a button next to it.
When the button is pressed it reads the value of the field and executes that with some other options.

Can anyone give me a working sample?


I don't know if it's enough, but I learned a lot from testnotify.nsi in ${NSISDIR}\Contrib\InstallOptions


I have managed to get the input fields and buttons from there, but I cannot make those interact


test.nsi


SetCompressor lzma
!packhdr tmp.dat "upx -9 tmp.dat"
Name "Notify"
OutFile "Notify.exe"
XPStyle on

Page Custom Custom
Page InstFiles

Function .onInit

WriteIniStr $EXEDIR\notify.ini "Field 4" "State" "cmd.exe"
WriteIniStr $EXEDIR\notify.ini "Field 5" "State" "compmgmt.msc"
WriteIniStr $EXEDIR\notify.ini "Field 6" "State" "devmgmt.msc"
WriteIniStr $EXEDIR\notify.ini "Field 7" "State" "gpedit.msc"
WriteIniStr $EXEDIR\notify.ini "Field 8" "State" "secpol.msc"
WriteIniStr $EXEDIR\notify.ini "Field 9" "State" "services.msc"

FunctionEnd

Function Custom
InstallOptions::dialog "$EXEDIR\notify.ini"
Pop $R0
FunctionEnd


Section ""
SectionEnd


notify.ini

[Settings]
NumFields=9
State=2

[Field 1]
Type=Groupbox
Text=Execute with Admin priviliges
Left=4
Right=264
Top=1
Bottom=140

[Field 2]
Type=Button
Left=201
Right=261
Top=11
Bottom=24
Text=Execute
Flags=NOTIFY

[Field 3]
Type=FileRequest
State=Choose File
Left=8
Right=198
Top=11
Bottom=24

[Field 4]
Type=Link
Text=* Run Users and Passwords
Left=10
Right=120
Top=32
Bottom=40

[Field 5]
Type=Link
Text=* Run Computer management
Left=10
Right=120
Top=43
Bottom=51

[Field 6]
Type=Link
Text=* Run Device manager
Left=10
Right=120
Top=52
Bottom=60

[Field 7]
Type=Link
Text=* Run Group Policy editor
Left=10
Right=120
Top=62
Bottom=70

[Field 8]
Type=Link
Text=* Run Local Security Settings
Left=10
Right=120
Top=72
Bottom=80

[Field 9]
Type=Link
Text=* Run Services
Left=10
Right=120
Top=81
Bottom=89


how do I get the links to go to a section, run that section and then return? I can not use goto.

Ok, got it working, now how do I read the content of the password field in the classic look?