Page 1 of 1

DriveCombo

Posted: Thu Sep 22, 2005 5:51 am
by saabi
I've replaced the FolderTree component on the destination dialog with a DriveComboBox component and saved it (the dialog) as a new one.
Drivecombo is needed because, users are allowed to select only the drive where they want to install the application, but the name of the destination folder is not editable (FolderText is disabled).
The problem is, when the Combo changed, only the drive appears in the (eg.: C:\\ or D:\\) FolderText component instead of "drivename + destination folder " (eg.: C:\\eFuvarKIT or D:\\eFuvarKIT).
DriveCombo Object Behavior looks like this:
receives information... : Install Folder
writes information: TARGETDIR

FolderText Object Behavior:
receives...: Installation Folder
writes...: TARGETDIR

The Target Folder field at the Project Properties contains: eFuvarKIT, so TARGETDIR is initialized to eFuvarKIT.
First time the FolderText shows C:\\eFuvarKIT, but after the combo changed it shows only the drive name.

And one another question: how can I filter the list of drives in a drivecombo (Users shouldn't see the CDROM & Network drives in the list).

Thank you in advance if you can give me any suggestions!

Bye,
NagySz.

Posted: Thu Sep 22, 2005 6:20 am
by sinan
This behavior is normal (by design). I suggest you don't display the folder field at all. You can always properly add the folder to the TARGETDIR variable, once the drive has been selected visually.

I would also suggest to check for forbidden paths at this step (after the dialog). The drive combo cannot filter drives, but you can always check to see paths are valid.

Or, of course, you could even make your own combo box, and display only the desired paths you wish to allow, and have the user choose from there. Many possibilities!

Posted: Thu Sep 22, 2005 7:15 am
by saabi
Many thanks for your quick answer & suggestions!


"
Or, of course, you could even make your own combo box, and display only the desired paths you wish to allow, and have the user choose from there. Many possibilities!
"

This last one is a very good idea! :)

Bye,
NSz.

Posted: Tue Oct 18, 2005 8:18 am
by saabi
This last one is a very good idea! :)



Yes, its a good idea... but how can I pick up the available drives on a system and how can I determine which is a network or CDROMdrive and which isn't?

Bye,
NSz.

Posted: Tue Oct 18, 2005 9:13 am
by sinan
You can use the Call DLL Function plug-in command in InstallAware to call the GetDriveType WinAPI function. This function tells you what type a drive is.

Posted: Tue Oct 25, 2005 7:33 am
by saabi
sinan wrote:You can use the Call DLL Function plug-in command in InstallAware to call the GetDriveType WinAPI function. This function tells you what type a drive is.


Ok. Thanx.
I'll try this soon...