jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

ComboBox to select CDROM - default to first entry?

Hi,

I have created a custom dialog with a combo box to allow the user to select which CDROM drive to use (result is stored in an ini file for the installed program).

Using "CDROM Volume" = true correctly lists all the CDROM drives.

Problem - the combo box defaults to nothing selected.
99% of the time there will be only one entry and it will be correct.

How do I get AI to select the first entry when entering the page?

Thanks,

Nick
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: ComboBox to select CDROM - default to first entry?

Hi,
How do I get AI to select the first entry when entering the page?
I'm afraid that this is not supported by Windows Installer. However, it can be done by using a custom action. This custom action will search all the CDROM drives on the machine and set one of them as the value of the property associated with the volume combo box.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Re: ComboBox to select CDROM - default to first entry?

Hi,

Is there a built in custom action that will search for CDROM drives?

Nick
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: ComboBox to select CDROM - default to first entry?

Hi Nick,

I'm afraid that Advanced Installer doesn't have a built-in custom action for searching the drives. However, you can create your own custom action by using the Drives property of the FileSystemObject. Note that if the DriveType is 4, then the drive is a CDROM.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”