Is this bug or what?
Hi,
I am trying to disable certain elements of the Dir. selection page when the installer is not running for the 1st time. The following code does that but it also disabling the keyboard. (I mean the eneter key, and hot keys(Alt N, Alt B etc.) are not working...)
; HM NIS Edit Wizard helper defines
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\MyAPP.exe"
....
!define MUI_PAGE_CUSTOMFUNCTION_SHOW CustomDirShow
!insertmacro MUI_PAGE_DIRECTORY
....
InstallDir "$PROGRAMFILES\MyApp"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
Var IsPresent
Function .onInit
;Check if product already installed...
ReadRegStr $IsPresent HKLM "${PRODUCT_DIR_REGKEY}" ""
FunctionEnd
;Disable the Dir. selection if running in upgrade mode...
Function CustomDirShow
StrCmp $IsPresent "" +6 0
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1019 ;ID of the EDIT box in Dir. Page
EnableWindow $R1 0
GetDlgItem $R1 $R0 1001 ;ID of the Browse button in Dir. Page
EnableWindow $R1 0
FunctionEnd
-- so what's gone wrong here?
------------
NSIS:2.0.6
OS:Win98SE
------------
Thanks,
playwin2