1 Attachment(s)
Re: Let user select Drive
Chris,
I would suggest to download the very nice "Learning SetupBuilder Part I" and the "Examples Package".
You have several different options. For example, see the "Combo Box 2.sb7" demo project.
Does this help?
Friedrich
Re: Let user select Drive
Many thanks, that looks perfect.
I had already gone through the learning SetUpBuilder and many of the examples, but did not look at the comboBox example as it was not a ComboBox I thought I needed :-)
I appreciate the quick reply.
Re: Let user select Drive
You are welcome :)
Friedrich
Re: Let user select Drive
Is there any more information about Enumerate Disk Drives?
(yes, I have just searched the help PDF etc).
For example, does it include mapped drives? either network drives mapped as drive letter, or folder on local drive mapped as drive letter? Does it include USB Drives currently plugged into the PC?
Using Set Variable %COMBOBOXTEXT% to FUNCTION :Get System Info (Enumerate Disk Drives)
create %COMBOBOXTEXT% as some strange variable, and Dialog (Combo Box) seems to know how to handle this variable and extract the required data from it.
But if I try and look at this variable, eg
If %COMBOBOXTEXT% Contains "C"
then this test fails (though %COMBOBOXTEXT% does contain "C:|D:| etc"
So can you point me to a bit more information about this.
(Sorry for asking about something that does work, it's just that I hate using things I don't understand :-)
1 Attachment(s)
Re: Let user select Drive
Enumerate Disk Drives—Fills a list with strings that specify valid drives in the system.
That means the variable holds all (known) available drives (mapped drives, USB, etc.).
Here is a simple demo:
www.lindersoft.com/projects/Drives.zip
It 1.) displays all available drives in a combo box and 2.) lets the user enter a drive letter. It then checks if the entered drive letter is in the list of available drives (not related to the selected drive from the combo in this example).
Friedrich
Re: Let user select Drive
Thank you. Your example works.
I had done similar, getting all drives into %ALL% and user input into %U%
And then show a message box with: Value of ALL = %ALL% >>>>> shows A:|C:|D:|E:
Value of U = %U% >>>>> shows C
But If %ALL% Contains %U% Then
does not work. ie. it think ALL does not contain C.
Since my script appears identical to yours, I am still puzzling why yours works and mine does not....
Re: Let user select Drive
Please ignore my previous message.
<NOW SOLVED>
(The % % were missing). Sorry.
Re: Let user select Drive
Re: Let user select Drive
This (hopefully) is final question on this subject.
If I share a folder on my local hard drive and then map it as a drive letter, GET SYSTEM INFO will show this as $DRIVE_REMOTE$
So to allow user to choose install onto this mapped drive (I have reason :-( or onto local hard drive root, I have to let them choose from drive types
$DRIVE_FIXED$ AND $DRIVE_REMOTE$.
Question: Is there any simple way to check if this Remote drive (mapped drive) is actually located on the local PC. And, if the remote drive is a $DRIVE_FIXED$ ?