1

I'm new to installshield and i need to read a .properties file prior to install. Because the wizard name, headers are declared in that. The structure is like this: install.wizard.name="MyApp".

First is this possible in installshield? And second how do you do it?

thx in advance

1 Answers1

4

Take a look at the ListReadFromFile function.

There is an example on that page. Basically you need to read the file into a list, iterate through the list and do string parsing to figure out the value of the key you care about.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • And this works with the .properties extension? Because all the examples are with a .bat extension file – Glenn Vandevelde Mar 08 '12 at 20:50
  • 1
    A text file is a text file, is it not? – Christopher Painter Mar 08 '12 at 21:05
  • I managed to find a string for example "test" in my file. But now i'm struggeling to find for example install.wizard.name=MyApp. I only can enter install.wizard.name in to the ListFindString methode because the rest is not always the same. Can you use wildcards for example :ListFindString(list,"install.wizard.name*") ? – Glenn Vandevelde Mar 09 '12 at 08:28
  • Are you familiar with looping? You call ListGetFirstString then StrGetTokens to split your key from your value. If the key is a match you get the value and exit. Otherwise you call ListGetNextString and repeat the process until you find what you are looking for or reach the end of the list. – Christopher Painter Mar 09 '12 at 18:35