#利用下拉表强行指定安装路径
!include "nsDialogs.nsh"
!include "FileFunc.nsh"
OutFile "NSIStest.exe"
Page custom CustomPage CustomPageLEAVE
Page instfiles
Function CustomPage
nsDialogs::Create 1018
Pop $0
${NSD_CreateDroplist} 0 0 100% 100% ""
Pop $r0
${NSD_OnChange} $r0 CustomPageLEAVE
${GetDrives} "hdd" GetDriveList
${NSD_CB_SelectString} $r0 "C:Program Filestest"
nsDialogs::Show
FunctionEnd
Function CustomPageLEAVE
${NSD_GetText} $r0 $1
FunctionEnd
Function GetDriveList
SendMessage $r0 ${CB_ADDSTRING} 0 "STR:$9Program Filestest "
Push 0
FunctionEnd
Section ""
MessageBox MB_OK '安装路径:$1'
SectionEnd
THE END
暂无评论内容