Select a drive only

Got a problem you cannot solve? Try here.
Post Reply
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Select a drive only

Post by alibaba »

Hi,

I need a dialog where the customer can only select a drive. He should not select a path, because the install path is always <selected_drive>\Application .
How can I realize it with InstallAware? Anyone an idea, hint?

Thanks in advance
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Select a drive only

Post by FrancescoT »

Dear Alibaba,

the first that comes to my mind is;

- Use the "GetLogicalDriveStrings" WINAPI to retrive a strings that specify valid drives in the system.
http://msdn.microsoft.com/it-it/library ... s.85).aspx
- Then fill a Combobox using a script varible that contains the driver list.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Select a drive only

Post by alibaba »

Thank you Francesco, I did not know this function yet. I tried it but the string with the Drive list alsways contains only the "A:\" drive. I tried a lot, but always the same. :(

Thank you anyway!
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Select a drive only

Post by FrancescoT »

Dear Alibaba,

Yes, I see what you mean.

This happens because the function returns a series of null-terminated strings, one for each valid drive in the system.

Unfortunately it is not possible to parse via IA script, each Null - Termination that delimits the returned drive string.

Alternatively, you could create a specialized DLL or EXE that calls the "GetLogicalDriveStrings" WINAPI and then to execute it from your script.
There are many examples available from the web on how to use the function.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Select a drive only

Post by alibaba »

Thank you very much for your Test. I can now stop my tests and will try to create a DLL.

Best Regards!
Post Reply