Announcement

Collapse
No announcement yet.

Why specify the ini file in code when I passed it via the /S:{inifilename} argument?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why specify the ini file in code when I passed it via the /S:{inifilename} argument?

    When I am running my installer silently I am passing the name of the ini file as part of the argument. However in code when I call INIFile.GetValue I still have to pass the name of the ini file. This means I have to read and parse the command line arguments even though the documentation makes me think this is a "known" value.

    Is there a constant, or global variable that I am not finding in the documentation somewhere, or do I need to read and parse the command line arguments myself?

  • #2
    When you pass the optional /S:"full-path-to-inifile" as a command line argument, you can set session variables with predefined values, if you follow the instructions in the documentation. You will see if and how the variables were set in the logfile (check how the destination folder is being set, for example).

    Using INIFile.GetValue() at runtime allows you to read data from any inifile on the user's system, which can contain any kind of information.

    Ulrich

    Comment


    • #3
      Can you point me to this in the documentation, or an example, I have been looking for several hours now and I am not seeing how this would work.

      Comment


      • #4
        Originally posted by Russ.Harding View Post
        Can you point me to this in the documentation, or an example, I have been looking for several hours now and I am not seeing how this would work.
        Please explain what "this" means. Are you
        • Unable to set session variables, such as %AppFolder%, via the INI file?
        • Unable to parse command line parameters?
        • Unable to extract values from a specific INI file somewhere on the target system?
        Please show the code you are using, so I can understand and advise.

        Ulrich

        Comment


        • #5
          I'm still on the original question. Do I need to parse the command line arguments in order to get the name of the ini file passed to the command line /S argument, or is there a built in function or variable that already provides me the name of the ini file.

          Alternatively, as I understand your response to my original question, "When you pass the optional /S:"full-path-to-inifile" as a command line argument, you can set session variables with predefined values", setup facory will somehow populate session variables from the ini file. If this is the case, and these values are auto populated, can you point me to where in the documentation this is described. I have spent quite a bit of time reading and I have not found where this is documented.

          Comment


          • #6
            Do I need to parse the command line arguments in order to get the name of the ini file passed to the command line /S argument, or is there a built in function or variable that already provides me the name of the ini file.
            If for some reason you need the name of the file passed as an argument for further processing, then you need to parse the command line and retrieve the name from the table. Usually, if you pass an INI file as an argument to the /S command line parameter, this file would be processed, setting the desired session variables, and then you would be done with it. The INIFile actions are for the storage and retrieval of any values, not necessarily used as session variables.

            Alternatively, as I understand your response to my original question, "When you pass the optional /S:"full-path-to-inifile" as a command line argument, you can set session variables with predefined values", setup facory will somehow populate session variables from the ini file. If this is the case, and these values are auto populated, can you point me to where in the documentation this is described. I have spent quite a bit of time reading and I have not found where this is documented.
            You can find this in the help file, where the command line options are explained: https://www.indigorose.com/webhelp/s...ne_Options.htm

            Ulrich

            Comment

            Working...
            X