+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Let user select Drive

  1. #1

    Default Let user select Drive

    I have several things I can't get to work in SetupBuilder, but rather than spend time on those I will explain what I am trying to do and you can probably tell a better way.

    I want to display a dialog asking user which Drive Letter they want to install onto. And to validate their entry to check it is a local harddrive on this PC.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default 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
    Attached Images Attached Images  

  3. #3

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

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Let user select Drive

    You are welcome

    Friedrich

  5. #5

    Default 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 :-)

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default 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
    Attached Images Attached Images  

  7. #7

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

  8. #8

    Default Re: Let user select Drive

    Please ignore my previous message.
    <NOW SOLVED>

    (The % % were missing). Sorry.

  9. #9
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Let user select Drive



    Friedrich

  10. #10

    Default 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$ ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •