下拉表强行指定安装路径

#利用下拉表强行指定安装路径
!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
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容