Add stuff to a form
I'd like to add a label or a text box into the form which shows the destination folder to install, but I don't know how? Please help. thanks.
24 posts
Function SomePrePageFunction
# clear variable R9, just in case
# we'll be using it to store the list of drives
StrCpy $R9 ""
# call the GetDrives function
${GetDrives} "ALL" "CallBackFunc"
# $R9 now contains e.g. "|C:\|D:\|E:\"
# chop the first "|" off
StrCpy $R9 $R9 -1 1
# now you have a list of drives in the format a listbox requires
# if you're using MUI, you can then write it to your
# InstallOptions file using the following:
!insertmacro MUI_INSTALLOPTIONS_WRITE "InstallOptions.ini" "Field 1" "ListItems" $R9
# please keep in mind that you need to put in the correct ini filename
# and the correct Field number
# initialize the dialog
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "InstallOptions.ini"
# and show it
!insertmacro MUI_INSTALLOPTIONS_SHOW
SectionEnd
Function CallBackFunc
# add the drive to the drives list
StrCpy $R9 "$R9|$9"
Push $0
FunctionEnd