Announcement

Collapse
No announcement yet.

Constructing variables

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Constructing variables

    Currently, we have a setup structure with several possible sets of data. The data sets have a user specified directory component in common, but as noted, the user specifies that part of the installation path (and hence it becomes part of %AppDir%.

    For example, an installation CD may be installed in C:\Data\JNC\US with the files of interest installed in and under that specified directory. The common piece, C:\Data\JNC needs to be placed in an environment variable, but %AppDir% is C:\Data\JNC\US. I'd like to figure out how to parse %AppDir% to construct my own variable which I can then set as the value of an environment variable.

    I suppose I could use %AppDir%.., but that seems unnecessarily ugly.

    Checking some other posts gives me the idea that I probably can't do what I would like to do, but I'll ask anyway.

    Any thoughts?

  • #2
    Re: Constructing variables

    Hi,

    Currently in Setup Factory 5.0 there is no way to parse a variable, or to 'strip' any information from a variable.

    Is their anyway that you could get the 'first part' of the path before the user adds the folder? Or is the 'first part' of the installation unknown as well?

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Constructing variables

      The first part is typically created by the user using the "browse" button, so it is unknown as well.

      I can, perhaps, use a different setup screen with a separate box for the scenario name, thereby creating a separate variable for that scenario name. The installation would then be that scenario name from the 2nd edit box appended to the path in the first edit box.

      The trouble there, however, is that the user would need to know not to traverse into the scenario name, if it happens to be present already, using the browse option.

      Ultimately, we're planning on hooking this data installation up to the application installation in a multi-CD setup with checkboxes (or similar) for the datasets available. Each dataset would itself be a multi-CD setup, with a common scenario name. It looks to be a fairly involved process overall, but for now, we can work with the /.. appended to hack the registry.

      Thanks,

      Allen

      Comment


      • #4
        Re: Constructing variables

        One possibility might be to run an executable file to perform the parsing. This leads to two problems, though:

        1. How do you get the parsed values into SF?
        The parsed values could be written to an ini file, which could be subsequently read.

        2. How can you do the parsing and read the ini file before the info is needed? For example, if you needed the parsed values for the installation of files from the SF setup archive, you're out-of-luck because while you can execute a shell command before file installation, you won't be able to read those values from an ini file until after the file installation. The two ways I see around this is, (a) install all the files to a temp directory, then copy them using the shell/file commands after reading the ini file. Or, (b) have your original setup project call a second, silent, install using the shell execute facility.

        It would be much easier if SF supported parsing, or VBS, or allowed an ActiveX type plugin. Maybe we'll see this type of thing in the future.
        -sgs

        Comment

        Working...
        X