DriveCombo

Got a problem you cannot solve? Try here.
saabi
Posts: 4
Joined: Thu Sep 22, 2005 5:17 am

DriveCombo

Postby saabi » Thu Sep 22, 2005 5:51 am

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.

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Thu Sep 22, 2005 6:20 am

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!

saabi
Posts: 4
Joined: Thu Sep 22, 2005 5:17 am

Postby saabi » Thu Sep 22, 2005 7:15 am

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.

saabi
Posts: 4
Joined: Thu Sep 22, 2005 5:17 am

Postby saabi » Tue Oct 18, 2005 8:18 am

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.

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Tue Oct 18, 2005 9:13 am

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.

saabi
Posts: 4
Joined: Thu Sep 22, 2005 5:17 am

Postby saabi » Tue Oct 25, 2005 7:33 am

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...


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 115 guests