have problems trying to understand functions
here is what i am trying to do:
On the componet page i want them to be able to select and unselect windows media player install. but i want the installer to check to see what version of windows and to run the correct install function (WMP is one of many sections i would like them to be able to choose from)
here is what i have (witch doesnt work because you cant have functions in sections)
Subsection "video programs" SEC03
section "vobsub" SEC31
sectionend
section "quicktime" SEC32
sectionend
Section "Windows Media Player 9" SEC33
Function MPinstall
Call GetWindowsVersion
Pop $R0
StrCmp $R0 "XP" XPinstall Wininstall
xpinstall
File "C:\Documents and Settings\PMoriarty\My Documents\windows stuff\MPsetupxp.exe
ExecWait "$instdir\MPsetupxp.exe"
Delete "$instdir\MPsetupxp.exe"
Wininstall
File "C:\Documents and Settings\PMoriarty\My Documents\windows stuff\MPsetup.exe"
ExecWait "$instdir\MPsetup.exe"
Delete "$instdir\MPsetup.exe"
FunctionEnd
SectionEnd
Section divx SC34
Subsectionend
i have all my functions twords the end of the script and am useing the windows version check thats in the appendix part of nsis manual.
any help would be appriciated.