最新消息:

下拉表强行指定安装路径

nsis 永恒心锁 1533浏览 0评论
#利用下拉表强行指定安装路径
!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
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 下拉表强行指定安装路径

您必须 登录 才能发表评论!