Archive: Problems with handling the "NEXT" button on Directory page


Problems with handling the "NEXT" button on Directory page
Hello!

(first post, so I'm a newbie at this) :)

Anyway, I'm creating an installer, that will "upgrade" a software avaiable on a cd-rom to a folder. Simply, it copies all files that are usable from the earlier version from a cd-rom, and then extract the new files from the installer itself.

This all works great, but of course, I need to use two directory pages, one for source, and one for destination.

I have written an "verify" function, that works, and allows users to choose "valid" folders. I'm using "onVerifyInstDir" and ti works, for example the "ok" button in the browse folder dialog is disabled / enabled as it should be.

The problem however appears, when I use cd-rom as source. If I do not set "MUI_DIRECTORYPAGE_VERIFYONLEAVE" to false (I'm using modern ui), the "next" button will always be disabled when a cd-rom station is chosen. (no matter what I set with enablewindow, it goes back to disabled).

And, the other way around, If I set verifyonleave, even if I disable the button, it will go back to enabled once I press "cancel" in the "browse folder" window.

So, is there a way to completly "override" the basic functionality that is enabling/disabling the next button?

Thanks for a great forum and a great software!


Re: Problems with handling the "NEXT" button on Directory page

Originally posted by airria
I'm creating an installer, that will "upgrade" a software avaiable on a cd-rom to a folder. Simply, it copies all files that are usable from the earlier version from a cd-rom, and then extract the new files from the installer itself.
I don't know the answer to your problem, but I pressume the installer is also on the CD-ROM, am I right? couldn't you guess the source folder and only ask for destination?

Are you really, really sure that you can't make the installer look for the source files automatically?

It won't let you use the CD drive, because a CD is read only.
Use InstallOptions to create your own Directory page by using the DirRequest control.

-Stu


Re: Re: Problems with handling the "NEXT" button on Directory page

Originally posted by n0On3
I don't know the answer to your problem, but I pressume the installer is also on the CD-ROM, am I right? couldn't you guess the source folder and only ask for destination?

Are you really, really sure that you can't make the installer look for the source files automatically?
No. The installer is not on the CD-ROM. It's not possible to guess the source folder, as it can be anywhere (cd-rom or any folder).

I can make it search for the source files, but running locate to search through an harddrive takes a lot of time.


Originally posted by Afrow UK
It won't let you use the CD drive, because a CD is read only.
Use InstallOptions to create your own Directory page by using the DirRequest control.
Yes, but it does allow me to use the cd-drive if I set:
MUI_DIRECTORYPAGE_VERIFYONLEAVE to false. But then it automatically enables the button as soon as I disable it.

InstallOptions is of course a possibility, but it requires lot of code just to resize the browse button. (saw some example in one of your posts, I think)


Anyway, currently I added the function that verifies the folder on _LEAVE for the page. If the folder is not ok, it gives an error messagebox and runs Abort.

So, this solved my problem, but not in the way I wanted. :)

Thanks for both suggestions!