kukomamasan
5th November 2008, 15:34
Hi again,
I want to make my installer more smooth, problem is i have an error message (message box), if the path could not be found in the registry in .oninit, telling browse to the right folder since installer could not locate the right path. I would like that message part of the welcome message(only if its not found in reg), else welcome message should say something like, path to the (program) was found, just press install to continue ect... How is that done ? i attached what i have so far.
Edit:
Damn sometime using the brain will help lol, i figured it out, it look like this :-)
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ChangeDirTextFunction
Function ChangeDirTextFunction
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\GhostRecon.exe" "path"
StrCmp $R0 "" NotPresent2 Present2
notpresent2:
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1006
SendMessage $R1 ${WM_SETTEXT} 0 `STR:Welcome To BB_AIO_180 installer, Installer could not find ghostrecon installation folder,So Browse to GhostRecon installation Folder.`
StrCpy $INSTDIR "$programfiles\Red Storm Entertainment\Ghost Recon\"
goto done2
present2:
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1006
SendMessage $R1 ${WM_SETTEXT} 0 `STR:Welcome To BB_AIO_180 Installer$\nThis Installer Found Your Ghost Recon Folder,$\nPath Should Be In The Path Window, Just Press install.` ;sets the labels text
done2:
FunctionEnd
Can i highligh the txt when path is not found, like red txt ? that will be cool.
I want to make my installer more smooth, problem is i have an error message (message box), if the path could not be found in the registry in .oninit, telling browse to the right folder since installer could not locate the right path. I would like that message part of the welcome message(only if its not found in reg), else welcome message should say something like, path to the (program) was found, just press install to continue ect... How is that done ? i attached what i have so far.
Edit:
Damn sometime using the brain will help lol, i figured it out, it look like this :-)
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ChangeDirTextFunction
Function ChangeDirTextFunction
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\GhostRecon.exe" "path"
StrCmp $R0 "" NotPresent2 Present2
notpresent2:
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1006
SendMessage $R1 ${WM_SETTEXT} 0 `STR:Welcome To BB_AIO_180 installer, Installer could not find ghostrecon installation folder,So Browse to GhostRecon installation Folder.`
StrCpy $INSTDIR "$programfiles\Red Storm Entertainment\Ghost Recon\"
goto done2
present2:
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1006
SendMessage $R1 ${WM_SETTEXT} 0 `STR:Welcome To BB_AIO_180 Installer$\nThis Installer Found Your Ghost Recon Folder,$\nPath Should Be In The Path Window, Just Press install.` ;sets the labels text
done2:
FunctionEnd
Can i highligh the txt when path is not found, like red txt ? that will be cool.