I'm using MUI
How disable directory field on MUI_PAGE_DIRECTORY?
Thank you
How disable directory field on MUI_PAGE_DIRECTORY?
38 posts
if i understand you correctly, this makes no sense at all. either leave the directory page or use it as is.
This has been asked before. Use EnableWindow in the show function.
What item_id of directory field?
Next code not work:
!define MUI_PAGE_CUSTOMFUNCTION_SHOW MyFuncDir
!insertmacro MUI_PAGE_DIRECTORY
Function MyFuncDir
FindWindow $hwnd "#32770" "" $HWNDPARENT
GetDlgItem ${TEMP} $hwnd 1202
EnableWindow ${TEMP} 0
FunctionEnd
Thank you
Next code not work:
!define MUI_PAGE_CUSTOMFUNCTION_SHOW MyFuncDir
!insertmacro MUI_PAGE_DIRECTORY
Function MyFuncDir
FindWindow $hwnd "#32770" "" $HWNDPARENT
GetDlgItem ${TEMP} $hwnd 1202
EnableWindow ${TEMP} 0
FunctionEnd
Thank you
1019
Thank you very much !!!
Where I can find all item_id?
Thank you
Where I can find all item_id?
Thank you
See resource.h or use a resource hacker to view the dialogs in the Contrib\UIs folder.
Thank you Joost Verburg
All works perfectly
All works perfectly
hello, I'm trying to do it to...
I do not completely understand what to do, and this code does not work...
can you mr anonym please give the complete code working ?
I do not completely understand what to do, and this code does not work...
can you mr anonym please give the complete code working ?
-Stu!define MUI_PAGE_CUSTOMFUNCTION_SHOW MyFuncDir
!insertmacro MUI_PAGE_DIRECTORY
Function MyFuncDir
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1019
EnableWindow $R1 0
FunctionEnd
thx very much...
this deactivates the field, but, not the "browse" button --> I still can change the $INSTDIR
have you got the value of the "browse" button --> though I can really disable the choice ?
(I think with just this value I could now do it 😛 )
why doing this and not skipping this page ?
--> because of the "proceed" button... (uninstall or reinstall or install)
this page is juste before the instfiles page, so I have to show that you're going to install or uninstall (and not only display a next page)
---> because of the reinstallation :
you reinstall and I show where is your software, (I don't want them ta change the INSTDIR if they reinstall)
this deactivates the field, but, not the "browse" button --> I still can change the $INSTDIR
have you got the value of the "browse" button --> though I can really disable the choice ?
(I think with just this value I could now do it 😛 )
why doing this and not skipping this page ?
--> because of the "proceed" button... (uninstall or reinstall or install)
this page is juste before the instfiles page, so I have to show that you're going to install or uninstall (and not only display a next page)
---> because of the reinstallation :
you reinstall and I show where is your software, (I don't want them ta change the INSTDIR if they reinstall)
where can I find this value ?
what is resource.h ?
what is resource.h ?
up 😁
i'me certainly annoying, but this is the last thing missing to me to finish my installer...
the question is :
how to disable the "browse" button in the MUI directory page ???
i'me certainly annoying, but this is the last thing missing to me to finish my installer...
the question is :
how to disable the "browse" button in the MUI directory page ???
try this and then drag the finder over the browse button and look for the 'Control ID' once the window details have been found.
-daz
-daz
well I'vbe done what you aksed me to do...
I have a control ID :
000003E9
and now ? 😛
because the control ID of the install dir text is
000003FB
and this is not the value I entered to disable it...
I have a control ID :
000003E9
and now ? 😛
because the control ID of the install dir text is
000003FB
and this is not the value I entered to disable it...
year 3FB in hex = 1019 in decimal !
super...
3E9 = 1001
I'm gonna try 1001 !
super...
3E9 = 1001
I'm gonna try 1001 !
this is the perfect code to disable directory page :
thx to everybody !
!define MUI_PAGE_CUSTOMFUNCTION_SHOW MyFuncDir
!insertmacro MUI_PAGE_DIRECTORY
...
Function MyFuncDir
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1019
EnableWindow $R1 0
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1001
EnableWindow $R1 0
FunctionEnd
thx to everybody !
heh, forgot to say it's all in hexadecimal. glad it's working now 🙂
-daz
-daz
Ok, I know this is a bit off topic, but I just have to ask:
A MUI DIRECTORY page basiclaly just has 2 options: a text field for a description and a place to enter a path. There are no other options a user can click on, etc. that will make the select direcotry part become usable. Which leads to ask why even bother displaying the page in the first place?
I'm sure you have your reasons; I'm just being curious...
A MUI DIRECTORY page basiclaly just has 2 options: a text field for a description and a place to enter a path. There are no other options a user can click on, etc. that will make the select direcotry part become usable. Which leads to ask why even bother displaying the page in the first place?
I'm sure you have your reasons; I'm just being curious...
1) if you have already installed
if you lanch the installer (and the uninstaller too for me)
they can propose you to reinstall, and if you want to reinstall
you choose your components (add, remove)
you go now to the directory page
and with a disabled directory page you can announce where the software will be reinstalled-modified
for a difficulty reason, and too because it's not logical, I don't want them to change the install dir
---> disabling directory page
2) the directory page button is the install button...
So if you skip it, no more "install button"... just next buttons...
and it's more "clear" to disable the fields of the directory page than to change the buttons of another page
these are my reasons 😉
ps : I'll come back and give all my script file when the software will be released... 10th february 2005
if you lanch the installer (and the uninstaller too for me)
they can propose you to reinstall, and if you want to reinstall
you choose your components (add, remove)
you go now to the directory page
and with a disabled directory page you can announce where the software will be reinstalled-modified
for a difficulty reason, and too because it's not logical, I don't want them to change the install dir
---> disabling directory page
2) the directory page button is the install button...
So if you skip it, no more "install button"... just next buttons...
and it's more "clear" to disable the fields of the directory page than to change the buttons of another page
these are my reasons 😉
ps : I'll come back and give all my script file when the software will be released... 10th february 2005
nice truck with winspy.
Function MyFuncDir
FindWindow $hwnd "#32770" "" $HWNDPARENT
but how do you find de window(here 32770) or 8002hex ?
#32770 is a standard classname for all dialog windows created by windows. if you do the same over a messagebox you should see the classname is the same. but basically it's just how the OS is designed
-daz
-daz
i tried the code given by superwan
i still cant disable the browse button and the install location field.
pls help me out
i still cant disable the browse button and the install location field.
pls help me out
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1019
EnableWindow $R1 0
GetDlgItem $R1 $R0 1019
EnableWindow $R1 0
Hello there, I recently posted This Thread and now I see, the page can be disabled, but how can I disable it dinamically? I mean, if installRegKey returns that there is a previous installation, then disable the controls, but if it's a fresh installation let the user choose.
Thanks!
Cërf.
Thanks!
Cërf.
Why not simply skip the directory page if it's not needed? If you really want to disable it, add an if block around the above code:
!include LogicLib.nsh
#...
${If} $INSTDIR != ""
# disable
${EndIf}
If you're using the $hwnd var, you need to declare it first:
-dandaman32
That could be the source of your problems.Var hwnd
-dandaman32
Thanks Hichik!
You're right, now my problem is that I can't seem to find out (and this is embarrasing) how to assign $INSTDIR a default value, when it's a fresh installation.
Thanks again, Cërf.
You're right, now my problem is that I can't seem to find out (and this is embarrasing) how to assign $INSTDIR a default value, when it's a fresh installation.
Thanks again, Cërf.
!include LogicLib.nsh
#...
${If} $INSTDIR != ""
# disable controls here
StrCpy $INSTDIR "c:\some\default\folder"
${EndIf} --additional note: you don't have to convert from hex to dec. If WinSpy gives you e.g. the value 403, simply use 0x403 in your NSIS script instead of 1027.
Thanks Animaether!