Install only into one of several directories with specific existing file?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • RichardShaw
    Forum Member
    • Aug 2000
    • 4

    Install only into one of several directories with specific existing file?

    NOTE TO FORUM LEADER:
    I have simplified this message and reposted it as a new message titled, "Can search allow manual browse even if file is found?"
    You can delete the following message, which is now largely redundant. (I don't have the rights to delete it.)
    --------------------
    What is the best way to allow the user to install only into one of possibly several directories with a specific existing file?

    I am wracking my brains on this one. I've read the help files and am stumped. A minor enhancement to Setup Factory would solve my problem.

    Background:
    I am making a setup file for a software UPGRADE.
    I need the setup to only install into a directory that already contains a file with a certain name.
    This file will usually be found in one of several paths, but could be in an idiosyncratic path chosen by the customer when the program was originally installed.
    The tricky part is that there may be several copies of the file. The upgrade program should be able to install into any of the directories that contain this file name, but only into one of those directories.

    Clearly, to only allow installation into a directory with a specific file, I am using File Search variables. I use the following:
    ----------
    Variables:
    ----------
    In File Search Variables:

    Variable: %TVEXEDir%
    File Name: TVNB.EXE
    Look In: Priority Paths Only (so that I will not slow down the install)
    Store this in Variable: Folder
    Priority Search Paths: F:\TV;F:\;I:\
    Default Value: (blank/none)
    Allow Manual Browse if file cannot be located: (checked)

    Then, I use a second File Search variable to test whether the user has found the required file:

    Variable: %TVEXEFound%
    File Name: TVNB.EXE (Executable file)
    Look In: Priority Search Paths Only
    Store this in Variable: TRUE
    Priority Search Paths: %TVEXEDir% (the directory that the first search ended in, or blank)
    Default Value: FALSE
    Allow Manual Browse if file cannot be located: (UNchecked)

    If the logical value of the second search variable is FALSE, I display an abort screen which only allows the user to "Cancel". Otherwise, I proceed with the installation.

    The problem is, the setup program could find the specified file in the Priority Search Paths, but the user could have another installation of the specified file which I want him/her to be able to select.

    In Setup Factory 5, the File Search Variable options only allow the user to browse if the specified file is NOT found. ("Allow manual browse if file can not be located").

    I believe that what I need is one of the following:

    1. The option in the File Search Variable to allow the user to continue to browse other directories for the specified file, even if the specified file name has already been found. Essentially, "Allow manual browse regardless of whether the file has been located". The existing search mechanism would properly enforce the requirement that the install could only select a directory with the specified file in it. The only differences are:
    A. This option would be allowed even if the specified file had already been found.
    B. The wording would be slightly different. For example, "You have found the required file. To accept this location, click . To continue to browse elsewhere, click ."

    2. Another option would be a new option to restrict the "Install Folder" screen Browse so that it would only allow selection of a directory with a specified existing file.

    3. Another option would be a new option that would allow a screen to use, as a logical condition, whether or not a specified file is contained in a specific path (which could be contained in a varible such as %AppDir% or %SearchDir%).

    4. Create a new kind of screen called a "Search Variable" screen that would test to see if a specific named file (possibly stored in a variable) is contained in a specific directory path (stored in a variable), and setting a new variable to TRUE or FALSE, which would allow subsequent screens to be enabled or disabled based on the value of this logical variable. This would allow the setup to abort if, for example, an "Install Folder" screen was used to select a directory path which did not contain the specified file.

    By far the easiest to use would be option 1 (above).

    Am I missing something? If the above are the only ways to accomplish what I need, is one of them a feature that Indigo Rose could implement soon? Or is there some trick, some workaround, that will accomplish what I need. It does not have to be elegant.

    I have tried the following, which do NOT work for the reasons given:

    1. After searching the Priority Search Paths, allow the user to get an "Install Folder" screen allowing him/her to browse, using the directory found during the search as a default. This is close, but is not good because the "Install Folder" browse allows the user to select a directory where the desired file may not exist.

    2. Enable the "Allow manual browse if file can not be located" on the File Search Variable screen. If the required file is already found, this does not allow the user to contine browsing for another directory which may also contain the specified file.

    Do you have any suggestions? The tricky part is allowing a browse which requires a specified file to be found, but even if it is, allows the user to browse for the same file in other directories.


    [This message has been edited by RichardShaw (edited 08-28-2000).]
Working...
X