2017-05-19 20 views

答えて

2
InstallDir "$ProgramFiles\Whatever" 

!include MUI2.nsh 
!include WinMessages.nsh 
!insertmacro MUI_PAGE_WELCOME 
!define MUI_PAGE_CUSTOMFUNCTION_SHOW RestrictDirPage 
!insertmacro MUI_PAGE_DIRECTORY 
!insertmacro MUI_PAGE_INSTFILES 
!insertmacro MUI_LANGUAGE English 

Function RestrictDirPage 
!if "${MUI_SYSVERSION}" >= 2.0 
SendMessage $mui.DirectoryPage.Directory ${EM_SETREADONLY} 1 0 
EnableWindow $mui.DirectoryPage.BrowseButton 0 
!else 
FindWindow $0 '#32770' '' $HWNDPARENT 
GetDlgItem $1 $0 0x3FB 
SendMessage $1 ${EM_SETREADONLY} 1 0 
GetDlgItem $1 $0 0x3E9 
EnableWindow $1 0 
!endif 
FunctionEnd 
+0

ありがとう@アンダー! – Puneet

関連する問題