Reputation: 345
I'm trying to read values from demo.properties file using innnosetup.Here is my demo.properties file hibernate.connection.username=James
hibernate.connection.password=Jack
hibernate.connection.url=jdbc:jtds:sqlserver://8080/clientDB
hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
I want to read this file and show values as James,Jack and 8080 in user interface.
Can anybody guide me how to get only those particular values?
Upvotes: 0
Views: 2083
Reputation: 45263
Here's a guide:
[code]
section LoadStringsFromFile()
(http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_loadstringsfromfile) to get the file content. for
loopPos()
(http://www.jrsoftware.org/ishelp/topic_isxfunc_pos.htm) to find the position of the =
signCopy()
(http://www.jrsoftware.org/ishelp/topic_isxfunc_copy.htm) extract key and value from the current line using the position of =
In case you need more functions take a look here: http://www.jrsoftware.org/ishelp/index.php?topic=scriptfunctions
A problem close to yours has been solved here: Find and read specific string from config file with Pascal Script in Inno Setup
Upvotes: 2